# This file was auto-generated by Fern from our API Definition.

import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.pagination import AsyncPager, SyncPager
from ..core.request_options import RequestOptions
from ..types.execution_configuration import ExecutionConfiguration
from ..types.test_tool_response import TestToolResponse
from ..types.tool import Tool
from ..types.update_tool_request import UpdateToolRequest
from .raw_client import AsyncRawToolsClient, RawToolsClient
from .types.tools_list_request_type import ToolsListRequestType

# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)


class ToolsClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawToolsClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> RawToolsClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawToolsClient
        """
        return self._raw_client

    def list(
        self,
        *,
        filter: typing.Optional[str] = None,
        type: typing.Optional[ToolsListRequestType] = None,
        enabled: typing.Optional[bool] = None,
        tool_server_id: typing.Optional[str] = None,
        limit: typing.Optional[int] = None,
        page_key: typing.Optional[str] = None,
        request_timeout: typing.Optional[int] = None,
        request_timeout_millis: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> SyncPager[Tool]:
        """
        List all tools available to the authenticated user, with optional filtering and pagination.

        Parameters
        ----------
        filter : typing.Optional[str]
            A regular expression against tool names and descriptions to filter the results.

        type : typing.Optional[ToolsListRequestType]
            Filter tools by type.

        enabled : typing.Optional[bool]
            Filter tools by enabled status.

        tool_server_id : typing.Optional[str]
            Filter tools by the tool server they belong to.

        limit : typing.Optional[int]
            The maximum number of tools to return in the list.

        page_key : typing.Optional[str]
            Used to retrieve the next page of tools after the limit has been reached.

        request_timeout : typing.Optional[int]
            The API will make a best effort to complete the request in the specified seconds or time out.

        request_timeout_millis : typing.Optional[int]
            The API will make a best effort to complete the request in the specified milliseconds or time out.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        SyncPager[Tool]
            List of available tools.

        Examples
        --------
        from vectara import Vectara

        client = Vectara(
            api_key="YOUR_API_KEY",
            client_id="YOUR_CLIENT_ID",
            client_secret="YOUR_CLIENT_SECRET",
        )
        response = client.tools.list(
            filter="rag.*",
            enabled=True,
            tool_server_id="tsr_rag_search",
        )
        for item in response:
            yield item
        # alternatively, you can paginate page-by-page
        for page in response.iter_pages():
            yield page
        """
        return self._raw_client.list(
            filter=filter,
            type=type,
            enabled=enabled,
            tool_server_id=tool_server_id,
            limit=limit,
            page_key=page_key,
            request_timeout=request_timeout,
            request_timeout_millis=request_timeout_millis,
            request_options=request_options,
        )

    def create(
        self,
        *,
        name: str,
        title: str,
        description: str,
        code: str,
        request_timeout: typing.Optional[int] = None,
        request_timeout_millis: typing.Optional[int] = None,
        language: typing.Optional[typing.Literal["python"]] = OMIT,
        execution_configuration: typing.Optional[ExecutionConfiguration] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> Tool:
        """
        Create a new tool that agents can use. Currently supports Lambda tools for user-defined functions.
        Lambda tools allow you to write custom code that agents can execute in a secure sandbox.

        Parameters
        ----------
        name : str
            The unique name of the tool (used as the function identifier).

        title : str
            Human-readable title of the tool displayed in the UI.

        description : str
            A detailed description of what the function does, when to use it, and what it returns.

        code : str
            The Python 3.12 code for the function.

            **Required**: Must define a `process()` entry point function. Use type annotations on parameters for automatic schema discovery.

            **Parameters**: Passed as keyword arguments matched to the function signature.

            **Return types**: Can return any JSON-serializable type (strings, numbers, booleans, lists, or objects).

            **Example: Returning a number**
            ```python
            def process(x: int, y: int) -> int:
                return x + y
            ```

            **Example: Returning a string**
            ```python
            def process(name: str) -> str:
                return f"Hello, {name}!"
            ```

            **Example: Returning a boolean**
            ```python
            def process(value: int, threshold: int) -> bool:
                return value > threshold
            ```

            **Example: Returning a list**
            ```python
            from typing import List

            def process(items: List[str]) -> List[str]:
                return sorted(items)
            ```

            **Example: Returning an object (dict)**
            ```python
            def process(order_count: int, total_revenue: float, days_active: int = 1) -> dict:
                score = (order_count * 10 + total_revenue * 0.1) / days_active
                return {'score': round(score, 2), 'rating': 'high' if score > 100 else 'low'}
            ```

            For complex types, use the `typing` module:

            ```python
            from typing import List, Dict

            def process(items: List[str], config: Dict[str, float]) -> dict:
                count = len(items)
                multiplier = config.get('multiplier', 1.0)
                return {'count': count, 'adjusted': count * multiplier}
            ```

        request_timeout : typing.Optional[int]
            The API will make a best effort to complete the request in the specified seconds or time out.

        request_timeout_millis : typing.Optional[int]
            The API will make a best effort to complete the request in the specified milliseconds or time out.

        language : typing.Optional[typing.Literal["python"]]
            The programming language. Currently only 'python' (Python 3.12) is supported.

        execution_configuration : typing.Optional[ExecutionConfiguration]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        Tool
            The tool has been created successfully.

        Examples
        --------
        from vectara import Vectara

        client = Vectara(
            api_key="YOUR_API_KEY",
            client_id="YOUR_CLIENT_ID",
            client_secret="YOUR_CLIENT_SECRET",
        )
        client.tools.create(
            name="calculate_customer_score",
            title="Customer Score Calculator",
            description="Calculate a customer score based on order history and revenue. Returns a score between 0-100.",
            code="def process(order_count: int, total_revenue: float, days_active: int = 1) -> dict:\n    score = (order_count * 10 + total_revenue * 0.1) / days_active\n    return {'score': round(score, 2)}\n",
        )
        """
        _response = self._raw_client.create(
            name=name,
            title=title,
            description=description,
            code=code,
            request_timeout=request_timeout,
            request_timeout_millis=request_timeout_millis,
            language=language,
            execution_configuration=execution_configuration,
            request_options=request_options,
        )
        return _response.data

    def get(
        self,
        tool_id: str,
        *,
        request_timeout: typing.Optional[int] = None,
        request_timeout_millis: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> Tool:
        """
        Retrieve the details of a specific tool by its ID, including its configuration and capabilities.

        Parameters
        ----------
        tool_id : str
            The unique identifier of the tool to retrieve.

        request_timeout : typing.Optional[int]
            The API will make a best effort to complete the request in the specified seconds or time out.

        request_timeout_millis : typing.Optional[int]
            The API will make a best effort to complete the request in the specified milliseconds or time out.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        Tool
            The requested tool details.

        Examples
        --------
        from vectara import Vectara

        client = Vectara(
            api_key="YOUR_API_KEY",
            client_id="YOUR_CLIENT_ID",
            client_secret="YOUR_CLIENT_SECRET",
        )
        client.tools.get(
            tool_id="tol_rag_search",
        )
        """
        _response = self._raw_client.get(
            tool_id,
            request_timeout=request_timeout,
            request_timeout_millis=request_timeout_millis,
            request_options=request_options,
        )
        return _response.data

    def delete(
        self,
        tool_id: str,
        *,
        request_timeout: typing.Optional[int] = None,
        request_timeout_millis: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> None:
        """
        Permanently delete a tool and all its associated configuration. This action cannot be undone.

        Parameters
        ----------
        tool_id : str
            The unique identifier of the tool to delete.

        request_timeout : typing.Optional[int]
            The API will make a best effort to complete the request in the specified seconds or time out.

        request_timeout_millis : typing.Optional[int]
            The API will make a best effort to complete the request in the specified milliseconds or time out.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        None

        Examples
        --------
        from vectara import Vectara

        client = Vectara(
            api_key="YOUR_API_KEY",
            client_id="YOUR_CLIENT_ID",
            client_secret="YOUR_CLIENT_SECRET",
        )
        client.tools.delete(
            tool_id="tol_rag_search",
        )
        """
        _response = self._raw_client.delete(
            tool_id,
            request_timeout=request_timeout,
            request_timeout_millis=request_timeout_millis,
            request_options=request_options,
        )
        return _response.data

    def update(
        self,
        tool_id: str,
        *,
        request: UpdateToolRequest,
        request_timeout: typing.Optional[int] = None,
        request_timeout_millis: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> Tool:
        """
        Update an existing tool's configuration.

        Parameters
        ----------
        tool_id : str
            The unique identifier of the tool to update.

        request : UpdateToolRequest

        request_timeout : typing.Optional[int]
            The API will make a best effort to complete the request in the specified seconds or time out.

        request_timeout_millis : typing.Optional[int]
            The API will make a best effort to complete the request in the specified milliseconds or time out.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        Tool
            The tool has been updated successfully.

        Examples
        --------
        from vectara import UpdateMcpToolRequest, Vectara

        client = Vectara(
            api_key="YOUR_API_KEY",
            client_id="YOUR_CLIENT_ID",
            client_secret="YOUR_CLIENT_SECRET",
        )
        client.tools.update(
            tool_id="tol_rag_search",
            request=UpdateMcpToolRequest(),
        )
        """
        _response = self._raw_client.update(
            tool_id,
            request=request,
            request_timeout=request_timeout,
            request_timeout_millis=request_timeout_millis,
            request_options=request_options,
        )
        return _response.data

    def test(
        self,
        tool_id: str,
        *,
        input: typing.Dict[str, typing.Optional[typing.Any]],
        request_timeout: typing.Optional[int] = None,
        request_timeout_millis: typing.Optional[int] = None,
        timeout_seconds: typing.Optional[int] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> TestToolResponse:
        """
        Execute a Lambda tool with test inputs to verify it works correctly.
        This endpoint allows users to test their functions before using them with agents.
        The function is executed in a secure sandbox environment with the same constraints as production.

        Parameters
        ----------
        tool_id : str
            The unique identifier of the Lambda tool to test.

        input : typing.Dict[str, typing.Optional[typing.Any]]
            The input parameters to pass to the function. Must match the tool's input schema.

        request_timeout : typing.Optional[int]
            The API will make a best effort to complete the request in the specified seconds or time out.

        request_timeout_millis : typing.Optional[int]
            The API will make a best effort to complete the request in the specified milliseconds or time out.

        timeout_seconds : typing.Optional[int]
            Maximum execution time in seconds. If not specified, uses the tool's configured timeout.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        TestToolResponse
            Test execution completed successfully.

        Examples
        --------
        from vectara import Vectara

        client = Vectara(
            api_key="YOUR_API_KEY",
            client_id="YOUR_CLIENT_ID",
            client_secret="YOUR_CLIENT_SECRET",
        )
        client.tools.test(
            tool_id="tol_python_function_123",
            input={"number": 42, "text": "Hello, world!"},
        )
        """
        _response = self._raw_client.test(
            tool_id,
            input=input,
            request_timeout=request_timeout,
            request_timeout_millis=request_timeout_millis,
            timeout_seconds=timeout_seconds,
            request_options=request_options,
        )
        return _response.data


class AsyncToolsClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawToolsClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> AsyncRawToolsClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawToolsClient
        """
        return self._raw_client

    async def list(
        self,
        *,
        filter: typing.Optional[str] = None,
        type: typing.Optional[ToolsListRequestType] = None,
        enabled: typing.Optional[bool] = None,
        tool_server_id: typing.Optional[str] = None,
        limit: typing.Optional[int] = None,
        page_key: typing.Optional[str] = None,
        request_timeout: typing.Optional[int] = None,
        request_timeout_millis: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncPager[Tool]:
        """
        List all tools available to the authenticated user, with optional filtering and pagination.

        Parameters
        ----------
        filter : typing.Optional[str]
            A regular expression against tool names and descriptions to filter the results.

        type : typing.Optional[ToolsListRequestType]
            Filter tools by type.

        enabled : typing.Optional[bool]
            Filter tools by enabled status.

        tool_server_id : typing.Optional[str]
            Filter tools by the tool server they belong to.

        limit : typing.Optional[int]
            The maximum number of tools to return in the list.

        page_key : typing.Optional[str]
            Used to retrieve the next page of tools after the limit has been reached.

        request_timeout : typing.Optional[int]
            The API will make a best effort to complete the request in the specified seconds or time out.

        request_timeout_millis : typing.Optional[int]
            The API will make a best effort to complete the request in the specified milliseconds or time out.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncPager[Tool]
            List of available tools.

        Examples
        --------
        import asyncio

        from vectara import AsyncVectara

        client = AsyncVectara(
            api_key="YOUR_API_KEY",
            client_id="YOUR_CLIENT_ID",
            client_secret="YOUR_CLIENT_SECRET",
        )


        async def main() -> None:
            response = await client.tools.list(
                filter="rag.*",
                enabled=True,
                tool_server_id="tsr_rag_search",
            )
            async for item in response:
                yield item

            # alternatively, you can paginate page-by-page
            async for page in response.iter_pages():
                yield page


        asyncio.run(main())
        """
        return await self._raw_client.list(
            filter=filter,
            type=type,
            enabled=enabled,
            tool_server_id=tool_server_id,
            limit=limit,
            page_key=page_key,
            request_timeout=request_timeout,
            request_timeout_millis=request_timeout_millis,
            request_options=request_options,
        )

    async def create(
        self,
        *,
        name: str,
        title: str,
        description: str,
        code: str,
        request_timeout: typing.Optional[int] = None,
        request_timeout_millis: typing.Optional[int] = None,
        language: typing.Optional[typing.Literal["python"]] = OMIT,
        execution_configuration: typing.Optional[ExecutionConfiguration] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> Tool:
        """
        Create a new tool that agents can use. Currently supports Lambda tools for user-defined functions.
        Lambda tools allow you to write custom code that agents can execute in a secure sandbox.

        Parameters
        ----------
        name : str
            The unique name of the tool (used as the function identifier).

        title : str
            Human-readable title of the tool displayed in the UI.

        description : str
            A detailed description of what the function does, when to use it, and what it returns.

        code : str
            The Python 3.12 code for the function.

            **Required**: Must define a `process()` entry point function. Use type annotations on parameters for automatic schema discovery.

            **Parameters**: Passed as keyword arguments matched to the function signature.

            **Return types**: Can return any JSON-serializable type (strings, numbers, booleans, lists, or objects).

            **Example: Returning a number**
            ```python
            def process(x: int, y: int) -> int:
                return x + y
            ```

            **Example: Returning a string**
            ```python
            def process(name: str) -> str:
                return f"Hello, {name}!"
            ```

            **Example: Returning a boolean**
            ```python
            def process(value: int, threshold: int) -> bool:
                return value > threshold
            ```

            **Example: Returning a list**
            ```python
            from typing import List

            def process(items: List[str]) -> List[str]:
                return sorted(items)
            ```

            **Example: Returning an object (dict)**
            ```python
            def process(order_count: int, total_revenue: float, days_active: int = 1) -> dict:
                score = (order_count * 10 + total_revenue * 0.1) / days_active
                return {'score': round(score, 2), 'rating': 'high' if score > 100 else 'low'}
            ```

            For complex types, use the `typing` module:

            ```python
            from typing import List, Dict

            def process(items: List[str], config: Dict[str, float]) -> dict:
                count = len(items)
                multiplier = config.get('multiplier', 1.0)
                return {'count': count, 'adjusted': count * multiplier}
            ```

        request_timeout : typing.Optional[int]
            The API will make a best effort to complete the request in the specified seconds or time out.

        request_timeout_millis : typing.Optional[int]
            The API will make a best effort to complete the request in the specified milliseconds or time out.

        language : typing.Optional[typing.Literal["python"]]
            The programming language. Currently only 'python' (Python 3.12) is supported.

        execution_configuration : typing.Optional[ExecutionConfiguration]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        Tool
            The tool has been created successfully.

        Examples
        --------
        import asyncio

        from vectara import AsyncVectara

        client = AsyncVectara(
            api_key="YOUR_API_KEY",
            client_id="YOUR_CLIENT_ID",
            client_secret="YOUR_CLIENT_SECRET",
        )


        async def main() -> None:
            await client.tools.create(
                name="calculate_customer_score",
                title="Customer Score Calculator",
                description="Calculate a customer score based on order history and revenue. Returns a score between 0-100.",
                code="def process(order_count: int, total_revenue: float, days_active: int = 1) -> dict:\n    score = (order_count * 10 + total_revenue * 0.1) / days_active\n    return {'score': round(score, 2)}\n",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create(
            name=name,
            title=title,
            description=description,
            code=code,
            request_timeout=request_timeout,
            request_timeout_millis=request_timeout_millis,
            language=language,
            execution_configuration=execution_configuration,
            request_options=request_options,
        )
        return _response.data

    async def get(
        self,
        tool_id: str,
        *,
        request_timeout: typing.Optional[int] = None,
        request_timeout_millis: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> Tool:
        """
        Retrieve the details of a specific tool by its ID, including its configuration and capabilities.

        Parameters
        ----------
        tool_id : str
            The unique identifier of the tool to retrieve.

        request_timeout : typing.Optional[int]
            The API will make a best effort to complete the request in the specified seconds or time out.

        request_timeout_millis : typing.Optional[int]
            The API will make a best effort to complete the request in the specified milliseconds or time out.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        Tool
            The requested tool details.

        Examples
        --------
        import asyncio

        from vectara import AsyncVectara

        client = AsyncVectara(
            api_key="YOUR_API_KEY",
            client_id="YOUR_CLIENT_ID",
            client_secret="YOUR_CLIENT_SECRET",
        )


        async def main() -> None:
            await client.tools.get(
                tool_id="tol_rag_search",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get(
            tool_id,
            request_timeout=request_timeout,
            request_timeout_millis=request_timeout_millis,
            request_options=request_options,
        )
        return _response.data

    async def delete(
        self,
        tool_id: str,
        *,
        request_timeout: typing.Optional[int] = None,
        request_timeout_millis: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> None:
        """
        Permanently delete a tool and all its associated configuration. This action cannot be undone.

        Parameters
        ----------
        tool_id : str
            The unique identifier of the tool to delete.

        request_timeout : typing.Optional[int]
            The API will make a best effort to complete the request in the specified seconds or time out.

        request_timeout_millis : typing.Optional[int]
            The API will make a best effort to complete the request in the specified milliseconds or time out.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        None

        Examples
        --------
        import asyncio

        from vectara import AsyncVectara

        client = AsyncVectara(
            api_key="YOUR_API_KEY",
            client_id="YOUR_CLIENT_ID",
            client_secret="YOUR_CLIENT_SECRET",
        )


        async def main() -> None:
            await client.tools.delete(
                tool_id="tol_rag_search",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.delete(
            tool_id,
            request_timeout=request_timeout,
            request_timeout_millis=request_timeout_millis,
            request_options=request_options,
        )
        return _response.data

    async def update(
        self,
        tool_id: str,
        *,
        request: UpdateToolRequest,
        request_timeout: typing.Optional[int] = None,
        request_timeout_millis: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> Tool:
        """
        Update an existing tool's configuration.

        Parameters
        ----------
        tool_id : str
            The unique identifier of the tool to update.

        request : UpdateToolRequest

        request_timeout : typing.Optional[int]
            The API will make a best effort to complete the request in the specified seconds or time out.

        request_timeout_millis : typing.Optional[int]
            The API will make a best effort to complete the request in the specified milliseconds or time out.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        Tool
            The tool has been updated successfully.

        Examples
        --------
        import asyncio

        from vectara import AsyncVectara, UpdateMcpToolRequest

        client = AsyncVectara(
            api_key="YOUR_API_KEY",
            client_id="YOUR_CLIENT_ID",
            client_secret="YOUR_CLIENT_SECRET",
        )


        async def main() -> None:
            await client.tools.update(
                tool_id="tol_rag_search",
                request=UpdateMcpToolRequest(),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.update(
            tool_id,
            request=request,
            request_timeout=request_timeout,
            request_timeout_millis=request_timeout_millis,
            request_options=request_options,
        )
        return _response.data

    async def test(
        self,
        tool_id: str,
        *,
        input: typing.Dict[str, typing.Optional[typing.Any]],
        request_timeout: typing.Optional[int] = None,
        request_timeout_millis: typing.Optional[int] = None,
        timeout_seconds: typing.Optional[int] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> TestToolResponse:
        """
        Execute a Lambda tool with test inputs to verify it works correctly.
        This endpoint allows users to test their functions before using them with agents.
        The function is executed in a secure sandbox environment with the same constraints as production.

        Parameters
        ----------
        tool_id : str
            The unique identifier of the Lambda tool to test.

        input : typing.Dict[str, typing.Optional[typing.Any]]
            The input parameters to pass to the function. Must match the tool's input schema.

        request_timeout : typing.Optional[int]
            The API will make a best effort to complete the request in the specified seconds or time out.

        request_timeout_millis : typing.Optional[int]
            The API will make a best effort to complete the request in the specified milliseconds or time out.

        timeout_seconds : typing.Optional[int]
            Maximum execution time in seconds. If not specified, uses the tool's configured timeout.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        TestToolResponse
            Test execution completed successfully.

        Examples
        --------
        import asyncio

        from vectara import AsyncVectara

        client = AsyncVectara(
            api_key="YOUR_API_KEY",
            client_id="YOUR_CLIENT_ID",
            client_secret="YOUR_CLIENT_SECRET",
        )


        async def main() -> None:
            await client.tools.test(
                tool_id="tol_python_function_123",
                input={"number": 42, "text": "Hello, world!"},
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.test(
            tool_id,
            input=input,
            request_timeout=request_timeout,
            request_timeout_millis=request_timeout_millis,
            timeout_seconds=timeout_seconds,
            request_options=request_options,
        )
        return _response.data
