diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 88ca3ece..904b037e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.7.3" + ".": "0.7.4" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 3b293f90..eb739440 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 35 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-6feb0601dafb255298a2f1da01d64541d40da90aeb527e2f444c49c993e8c162.yml -openapi_spec_hash: 973cd2ed3c945818d15b7deee0b25d71 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-9d9cdf54bd30f5ba9041b0eec194236a3b85c8860a5ce4aebb28bae25fc07e9e.yml +openapi_spec_hash: dfcabcfa1497cb45607a908ba4f0086a config_hash: 32eb65911c08ac84d117cecdf2759869 diff --git a/CHANGELOG.md b/CHANGELOG.md index f1e2ab4e..6f5d7995 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## 0.7.4 (2025-12-17) + +Full Changelog: [v0.7.3...v0.7.4](https://github.com/scaleapi/scale-agentex-python/compare/v0.7.3...v0.7.4) + +### Features + +* **api:** api update ([ed21ad8](https://github.com/scaleapi/scale-agentex-python/commit/ed21ad8c34cd11e80af9128181764489a0541740)) +* **api:** api update ([86a166a](https://github.com/scaleapi/scale-agentex-python/commit/86a166aba5538411ebcc0ed74291505e01a466f2)) +* **api:** api update ([4c95c94](https://github.com/scaleapi/scale-agentex-python/commit/4c95c94df570277fc49281f1343cb012e8da2334)) + + +### Chores + +* **internal:** add missing files argument to base client ([28d1738](https://github.com/scaleapi/scale-agentex-python/commit/28d1738d3af8feb00f6f641e159221fb41c42983)) +* speedup initial import ([8e50946](https://github.com/scaleapi/scale-agentex-python/commit/8e50946321c32e42a7b25cf9ae8b8e9b020a7ac9)) + ## 0.7.3 (2025-12-10) Full Changelog: [v0.7.2...v0.7.3](https://github.com/scaleapi/scale-agentex-python/compare/v0.7.2...v0.7.3) diff --git a/pyproject.toml b/pyproject.toml index 738a20a7..3aaebb44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "agentex-sdk" -version = "0.7.3" +version = "0.7.4" description = "The official Python library for the agentex API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/agentex/_base_client.py b/src/agentex/_base_client.py index 108a8a52..2d022cda 100644 --- a/src/agentex/_base_client.py +++ b/src/agentex/_base_client.py @@ -1247,9 +1247,12 @@ def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options) + opts = FinalRequestOptions.construct( + method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + ) return self.request(cast_to, opts) def put( @@ -1767,9 +1770,12 @@ async def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options) + opts = FinalRequestOptions.construct( + method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + ) return await self.request(cast_to, opts) async def put( diff --git a/src/agentex/_client.py b/src/agentex/_client.py index 170ea0ef..0cb9fc45 100644 --- a/src/agentex/_client.py +++ b/src/agentex/_client.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, Dict, Mapping, cast +from typing import TYPE_CHECKING, Any, Dict, Mapping, cast from typing_extensions import Self, Literal, override import httpx @@ -20,8 +20,8 @@ not_given, ) from ._utils import is_given, get_async_library +from ._compat import cached_property from ._version import __version__ -from .resources import spans, tasks, agents, events, states, tracker, deployment_history from ._streaming import Stream as Stream, AsyncStream as AsyncStream from ._exceptions import APIStatusError from ._base_client import ( @@ -29,7 +29,16 @@ SyncAPIClient, AsyncAPIClient, ) -from .resources.messages import messages + +if TYPE_CHECKING: + from .resources import spans, tasks, agents, events, states, tracker, messages + from .resources.spans import SpansResource, AsyncSpansResource + from .resources.tasks import TasksResource, AsyncTasksResource + from .resources.agents import AgentsResource, AsyncAgentsResource + from .resources.events import EventsResource, AsyncEventsResource + from .resources.states import StatesResource, AsyncStatesResource + from .resources.tracker import TrackerResource, AsyncTrackerResource + from .resources.messages.messages import MessagesResource, AsyncMessagesResource __all__ = [ "ENVIRONMENTS", @@ -50,17 +59,6 @@ class Agentex(SyncAPIClient): - agents: agents.AgentsResource - tasks: tasks.TasksResource - messages: messages.MessagesResource - spans: spans.SpansResource - states: states.StatesResource - events: events.EventsResource - tracker: tracker.TrackerResource - deployment_history: deployment_history.DeploymentHistoryResource - with_raw_response: AgentexWithRawResponse - with_streaming_response: AgentexWithStreamedResponse - # client options api_key: str | None @@ -135,16 +133,55 @@ def __init__( _strict_response_validation=_strict_response_validation, ) - self.agents = agents.AgentsResource(self) - self.tasks = tasks.TasksResource(self) - self.messages = messages.MessagesResource(self) - self.spans = spans.SpansResource(self) - self.states = states.StatesResource(self) - self.events = events.EventsResource(self) - self.tracker = tracker.TrackerResource(self) - self.deployment_history = deployment_history.DeploymentHistoryResource(self) - self.with_raw_response = AgentexWithRawResponse(self) - self.with_streaming_response = AgentexWithStreamedResponse(self) + @cached_property + def agents(self) -> AgentsResource: + from .resources.agents import AgentsResource + + return AgentsResource(self) + + @cached_property + def tasks(self) -> TasksResource: + from .resources.tasks import TasksResource + + return TasksResource(self) + + @cached_property + def messages(self) -> MessagesResource: + from .resources.messages import MessagesResource + + return MessagesResource(self) + + @cached_property + def spans(self) -> SpansResource: + from .resources.spans import SpansResource + + return SpansResource(self) + + @cached_property + def states(self) -> StatesResource: + from .resources.states import StatesResource + + return StatesResource(self) + + @cached_property + def events(self) -> EventsResource: + from .resources.events import EventsResource + + return EventsResource(self) + + @cached_property + def tracker(self) -> TrackerResource: + from .resources.tracker import TrackerResource + + return TrackerResource(self) + + @cached_property + def with_raw_response(self) -> AgentexWithRawResponse: + return AgentexWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AgentexWithStreamedResponse: + return AgentexWithStreamedResponse(self) @property @override @@ -256,17 +293,6 @@ def _make_status_error( class AsyncAgentex(AsyncAPIClient): - agents: agents.AsyncAgentsResource - tasks: tasks.AsyncTasksResource - messages: messages.AsyncMessagesResource - spans: spans.AsyncSpansResource - states: states.AsyncStatesResource - events: events.AsyncEventsResource - tracker: tracker.AsyncTrackerResource - deployment_history: deployment_history.AsyncDeploymentHistoryResource - with_raw_response: AsyncAgentexWithRawResponse - with_streaming_response: AsyncAgentexWithStreamedResponse - # client options api_key: str | None @@ -341,16 +367,55 @@ def __init__( _strict_response_validation=_strict_response_validation, ) - self.agents = agents.AsyncAgentsResource(self) - self.tasks = tasks.AsyncTasksResource(self) - self.messages = messages.AsyncMessagesResource(self) - self.spans = spans.AsyncSpansResource(self) - self.states = states.AsyncStatesResource(self) - self.events = events.AsyncEventsResource(self) - self.tracker = tracker.AsyncTrackerResource(self) - self.deployment_history = deployment_history.AsyncDeploymentHistoryResource(self) - self.with_raw_response = AsyncAgentexWithRawResponse(self) - self.with_streaming_response = AsyncAgentexWithStreamedResponse(self) + @cached_property + def agents(self) -> AsyncAgentsResource: + from .resources.agents import AsyncAgentsResource + + return AsyncAgentsResource(self) + + @cached_property + def tasks(self) -> AsyncTasksResource: + from .resources.tasks import AsyncTasksResource + + return AsyncTasksResource(self) + + @cached_property + def messages(self) -> AsyncMessagesResource: + from .resources.messages import AsyncMessagesResource + + return AsyncMessagesResource(self) + + @cached_property + def spans(self) -> AsyncSpansResource: + from .resources.spans import AsyncSpansResource + + return AsyncSpansResource(self) + + @cached_property + def states(self) -> AsyncStatesResource: + from .resources.states import AsyncStatesResource + + return AsyncStatesResource(self) + + @cached_property + def events(self) -> AsyncEventsResource: + from .resources.events import AsyncEventsResource + + return AsyncEventsResource(self) + + @cached_property + def tracker(self) -> AsyncTrackerResource: + from .resources.tracker import AsyncTrackerResource + + return AsyncTrackerResource(self) + + @cached_property + def with_raw_response(self) -> AsyncAgentexWithRawResponse: + return AsyncAgentexWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncAgentexWithStreamedResponse: + return AsyncAgentexWithStreamedResponse(self) @property @override @@ -462,57 +527,199 @@ def _make_status_error( class AgentexWithRawResponse: + _client: Agentex + def __init__(self, client: Agentex) -> None: - self.agents = agents.AgentsResourceWithRawResponse(client.agents) - self.tasks = tasks.TasksResourceWithRawResponse(client.tasks) - self.messages = messages.MessagesResourceWithRawResponse(client.messages) - self.spans = spans.SpansResourceWithRawResponse(client.spans) - self.states = states.StatesResourceWithRawResponse(client.states) - self.events = events.EventsResourceWithRawResponse(client.events) - self.tracker = tracker.TrackerResourceWithRawResponse(client.tracker) - self.deployment_history = deployment_history.DeploymentHistoryResourceWithRawResponse(client.deployment_history) + self._client = client + + @cached_property + def agents(self) -> agents.AgentsResourceWithRawResponse: + from .resources.agents import AgentsResourceWithRawResponse + + return AgentsResourceWithRawResponse(self._client.agents) + + @cached_property + def tasks(self) -> tasks.TasksResourceWithRawResponse: + from .resources.tasks import TasksResourceWithRawResponse + + return TasksResourceWithRawResponse(self._client.tasks) + + @cached_property + def messages(self) -> messages.MessagesResourceWithRawResponse: + from .resources.messages import MessagesResourceWithRawResponse + + return MessagesResourceWithRawResponse(self._client.messages) + + @cached_property + def spans(self) -> spans.SpansResourceWithRawResponse: + from .resources.spans import SpansResourceWithRawResponse + + return SpansResourceWithRawResponse(self._client.spans) + + @cached_property + def states(self) -> states.StatesResourceWithRawResponse: + from .resources.states import StatesResourceWithRawResponse + + return StatesResourceWithRawResponse(self._client.states) + + @cached_property + def events(self) -> events.EventsResourceWithRawResponse: + from .resources.events import EventsResourceWithRawResponse + + return EventsResourceWithRawResponse(self._client.events) + + @cached_property + def tracker(self) -> tracker.TrackerResourceWithRawResponse: + from .resources.tracker import TrackerResourceWithRawResponse + + return TrackerResourceWithRawResponse(self._client.tracker) class AsyncAgentexWithRawResponse: + _client: AsyncAgentex + def __init__(self, client: AsyncAgentex) -> None: - self.agents = agents.AsyncAgentsResourceWithRawResponse(client.agents) - self.tasks = tasks.AsyncTasksResourceWithRawResponse(client.tasks) - self.messages = messages.AsyncMessagesResourceWithRawResponse(client.messages) - self.spans = spans.AsyncSpansResourceWithRawResponse(client.spans) - self.states = states.AsyncStatesResourceWithRawResponse(client.states) - self.events = events.AsyncEventsResourceWithRawResponse(client.events) - self.tracker = tracker.AsyncTrackerResourceWithRawResponse(client.tracker) - self.deployment_history = deployment_history.AsyncDeploymentHistoryResourceWithRawResponse( - client.deployment_history - ) + self._client = client + + @cached_property + def agents(self) -> agents.AsyncAgentsResourceWithRawResponse: + from .resources.agents import AsyncAgentsResourceWithRawResponse + + return AsyncAgentsResourceWithRawResponse(self._client.agents) + + @cached_property + def tasks(self) -> tasks.AsyncTasksResourceWithRawResponse: + from .resources.tasks import AsyncTasksResourceWithRawResponse + + return AsyncTasksResourceWithRawResponse(self._client.tasks) + + @cached_property + def messages(self) -> messages.AsyncMessagesResourceWithRawResponse: + from .resources.messages import AsyncMessagesResourceWithRawResponse + + return AsyncMessagesResourceWithRawResponse(self._client.messages) + + @cached_property + def spans(self) -> spans.AsyncSpansResourceWithRawResponse: + from .resources.spans import AsyncSpansResourceWithRawResponse + + return AsyncSpansResourceWithRawResponse(self._client.spans) + + @cached_property + def states(self) -> states.AsyncStatesResourceWithRawResponse: + from .resources.states import AsyncStatesResourceWithRawResponse + + return AsyncStatesResourceWithRawResponse(self._client.states) + + @cached_property + def events(self) -> events.AsyncEventsResourceWithRawResponse: + from .resources.events import AsyncEventsResourceWithRawResponse + + return AsyncEventsResourceWithRawResponse(self._client.events) + + @cached_property + def tracker(self) -> tracker.AsyncTrackerResourceWithRawResponse: + from .resources.tracker import AsyncTrackerResourceWithRawResponse + + return AsyncTrackerResourceWithRawResponse(self._client.tracker) class AgentexWithStreamedResponse: + _client: Agentex + def __init__(self, client: Agentex) -> None: - self.agents = agents.AgentsResourceWithStreamingResponse(client.agents) - self.tasks = tasks.TasksResourceWithStreamingResponse(client.tasks) - self.messages = messages.MessagesResourceWithStreamingResponse(client.messages) - self.spans = spans.SpansResourceWithStreamingResponse(client.spans) - self.states = states.StatesResourceWithStreamingResponse(client.states) - self.events = events.EventsResourceWithStreamingResponse(client.events) - self.tracker = tracker.TrackerResourceWithStreamingResponse(client.tracker) - self.deployment_history = deployment_history.DeploymentHistoryResourceWithStreamingResponse( - client.deployment_history - ) + self._client = client + + @cached_property + def agents(self) -> agents.AgentsResourceWithStreamingResponse: + from .resources.agents import AgentsResourceWithStreamingResponse + + return AgentsResourceWithStreamingResponse(self._client.agents) + + @cached_property + def tasks(self) -> tasks.TasksResourceWithStreamingResponse: + from .resources.tasks import TasksResourceWithStreamingResponse + + return TasksResourceWithStreamingResponse(self._client.tasks) + + @cached_property + def messages(self) -> messages.MessagesResourceWithStreamingResponse: + from .resources.messages import MessagesResourceWithStreamingResponse + + return MessagesResourceWithStreamingResponse(self._client.messages) + + @cached_property + def spans(self) -> spans.SpansResourceWithStreamingResponse: + from .resources.spans import SpansResourceWithStreamingResponse + + return SpansResourceWithStreamingResponse(self._client.spans) + + @cached_property + def states(self) -> states.StatesResourceWithStreamingResponse: + from .resources.states import StatesResourceWithStreamingResponse + + return StatesResourceWithStreamingResponse(self._client.states) + + @cached_property + def events(self) -> events.EventsResourceWithStreamingResponse: + from .resources.events import EventsResourceWithStreamingResponse + + return EventsResourceWithStreamingResponse(self._client.events) + + @cached_property + def tracker(self) -> tracker.TrackerResourceWithStreamingResponse: + from .resources.tracker import TrackerResourceWithStreamingResponse + + return TrackerResourceWithStreamingResponse(self._client.tracker) class AsyncAgentexWithStreamedResponse: + _client: AsyncAgentex + def __init__(self, client: AsyncAgentex) -> None: - self.agents = agents.AsyncAgentsResourceWithStreamingResponse(client.agents) - self.tasks = tasks.AsyncTasksResourceWithStreamingResponse(client.tasks) - self.messages = messages.AsyncMessagesResourceWithStreamingResponse(client.messages) - self.spans = spans.AsyncSpansResourceWithStreamingResponse(client.spans) - self.states = states.AsyncStatesResourceWithStreamingResponse(client.states) - self.events = events.AsyncEventsResourceWithStreamingResponse(client.events) - self.tracker = tracker.AsyncTrackerResourceWithStreamingResponse(client.tracker) - self.deployment_history = deployment_history.AsyncDeploymentHistoryResourceWithStreamingResponse( - client.deployment_history - ) + self._client = client + + @cached_property + def agents(self) -> agents.AsyncAgentsResourceWithStreamingResponse: + from .resources.agents import AsyncAgentsResourceWithStreamingResponse + + return AsyncAgentsResourceWithStreamingResponse(self._client.agents) + + @cached_property + def tasks(self) -> tasks.AsyncTasksResourceWithStreamingResponse: + from .resources.tasks import AsyncTasksResourceWithStreamingResponse + + return AsyncTasksResourceWithStreamingResponse(self._client.tasks) + + @cached_property + def messages(self) -> messages.AsyncMessagesResourceWithStreamingResponse: + from .resources.messages import AsyncMessagesResourceWithStreamingResponse + + return AsyncMessagesResourceWithStreamingResponse(self._client.messages) + + @cached_property + def spans(self) -> spans.AsyncSpansResourceWithStreamingResponse: + from .resources.spans import AsyncSpansResourceWithStreamingResponse + + return AsyncSpansResourceWithStreamingResponse(self._client.spans) + + @cached_property + def states(self) -> states.AsyncStatesResourceWithStreamingResponse: + from .resources.states import AsyncStatesResourceWithStreamingResponse + + return AsyncStatesResourceWithStreamingResponse(self._client.states) + + @cached_property + def events(self) -> events.AsyncEventsResourceWithStreamingResponse: + from .resources.events import AsyncEventsResourceWithStreamingResponse + + return AsyncEventsResourceWithStreamingResponse(self._client.events) + + @cached_property + def tracker(self) -> tracker.AsyncTrackerResourceWithStreamingResponse: + from .resources.tracker import AsyncTrackerResourceWithStreamingResponse + + return AsyncTrackerResourceWithStreamingResponse(self._client.tracker) Client = Agentex diff --git a/src/agentex/_version.py b/src/agentex/_version.py index 85b95807..9c1ed430 100644 --- a/src/agentex/_version.py +++ b/src/agentex/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "agentex" -__version__ = "0.7.3" # x-release-please-version +__version__ = "0.7.4" # x-release-please-version diff --git a/src/agentex/resources/messages/messages.py b/src/agentex/resources/messages/messages.py index e1256449..d3f9e438 100644 --- a/src/agentex/resources/messages/messages.py +++ b/src/agentex/resources/messages/messages.py @@ -186,6 +186,7 @@ def list( self, *, task_id: str, + filters: Optional[str] | Omit = omit, limit: int | Omit = omit, order_by: Optional[str] | Omit = omit, order_direction: str | Omit = omit, @@ -206,6 +207,8 @@ def list( Args: task_id: The task ID + filters: JSON-encoded filter object + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -224,6 +227,7 @@ def list( query=maybe_transform( { "task_id": task_id, + "filters": filters, "limit": limit, "order_by": order_by, "order_direction": order_direction, @@ -241,6 +245,7 @@ def list_paginated( task_id: str, cursor: Optional[str] | Omit = omit, direction: Literal["older", "newer"] | Omit = omit, + filters: Optional[str] | Omit = omit, limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -271,6 +276,8 @@ def list_paginated( Args: task_id: The task ID + filters: JSON-encoded filter object + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -291,6 +298,7 @@ def list_paginated( "task_id": task_id, "cursor": cursor, "direction": direction, + "filters": filters, "limit": limit, }, message_list_paginated_params.MessageListPaginatedParams, @@ -446,6 +454,7 @@ async def list( self, *, task_id: str, + filters: Optional[str] | Omit = omit, limit: int | Omit = omit, order_by: Optional[str] | Omit = omit, order_direction: str | Omit = omit, @@ -466,6 +475,8 @@ async def list( Args: task_id: The task ID + filters: JSON-encoded filter object + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -484,6 +495,7 @@ async def list( query=await async_maybe_transform( { "task_id": task_id, + "filters": filters, "limit": limit, "order_by": order_by, "order_direction": order_direction, @@ -501,6 +513,7 @@ async def list_paginated( task_id: str, cursor: Optional[str] | Omit = omit, direction: Literal["older", "newer"] | Omit = omit, + filters: Optional[str] | Omit = omit, limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -531,6 +544,8 @@ async def list_paginated( Args: task_id: The task ID + filters: JSON-encoded filter object + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -551,6 +566,7 @@ async def list_paginated( "task_id": task_id, "cursor": cursor, "direction": direction, + "filters": filters, "limit": limit, }, message_list_paginated_params.MessageListPaginatedParams, diff --git a/src/agentex/types/__init__.py b/src/agentex/types/__init__.py index 140acd92..34f5fb90 100644 --- a/src/agentex/types/__init__.py +++ b/src/agentex/types/__init__.py @@ -62,9 +62,9 @@ from .task_message_content_param import TaskMessageContentParam as TaskMessageContentParam from .tool_request_content_param import ToolRequestContentParam as ToolRequestContentParam from .tool_response_content_param import ToolResponseContentParam as ToolResponseContentParam +from .deployment_history_list_params import DeploymentHistoryListParams as DeploymentHistoryListParams +from .deployment_history_list_response import DeploymentHistoryListResponse as DeploymentHistoryListResponse from .task_retrieve_by_name_params import TaskRetrieveByNameParams as TaskRetrieveByNameParams from .message_list_paginated_params import MessageListPaginatedParams as MessageListPaginatedParams -from .deployment_history_list_params import DeploymentHistoryListParams as DeploymentHistoryListParams from .task_retrieve_by_name_response import TaskRetrieveByNameResponse as TaskRetrieveByNameResponse from .message_list_paginated_response import MessageListPaginatedResponse as MessageListPaginatedResponse -from .deployment_history_list_response import DeploymentHistoryListResponse as DeploymentHistoryListResponse diff --git a/src/agentex/types/message_list_paginated_params.py b/src/agentex/types/message_list_paginated_params.py index 6dfe1e7e..2990a409 100644 --- a/src/agentex/types/message_list_paginated_params.py +++ b/src/agentex/types/message_list_paginated_params.py @@ -16,4 +16,7 @@ class MessageListPaginatedParams(TypedDict, total=False): direction: Literal["older", "newer"] + filters: Optional[str] + """JSON-encoded filter object""" + limit: int diff --git a/src/agentex/types/message_list_params.py b/src/agentex/types/message_list_params.py index 87027eed..06b04314 100644 --- a/src/agentex/types/message_list_params.py +++ b/src/agentex/types/message_list_params.py @@ -12,6 +12,9 @@ class MessageListParams(TypedDict, total=False): task_id: Required[str] """The task ID""" + filters: Optional[str] + """JSON-encoded filter object""" + limit: int order_by: Optional[str] diff --git a/tests/api_resources/test_messages.py b/tests/api_resources/test_messages.py index 19a51ae7..4b9cfc31 100644 --- a/tests/api_resources/test_messages.py +++ b/tests/api_resources/test_messages.py @@ -241,6 +241,7 @@ def test_method_list(self, client: Agentex) -> None: def test_method_list_with_all_params(self, client: Agentex) -> None: message = client.messages.list( task_id="task_id", + filters="filters", limit=0, order_by="order_by", order_direction="order_direction", @@ -289,6 +290,7 @@ def test_method_list_paginated_with_all_params(self, client: Agentex) -> None: task_id="task_id", cursor="cursor", direction="older", + filters="filters", limit=0, ) assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) @@ -544,6 +546,7 @@ async def test_method_list(self, async_client: AsyncAgentex) -> None: async def test_method_list_with_all_params(self, async_client: AsyncAgentex) -> None: message = await async_client.messages.list( task_id="task_id", + filters="filters", limit=0, order_by="order_by", order_direction="order_direction", @@ -592,6 +595,7 @@ async def test_method_list_paginated_with_all_params(self, async_client: AsyncAg task_id="task_id", cursor="cursor", direction="older", + filters="filters", limit=0, ) assert_matches_type(MessageListPaginatedResponse, message, path=["response"])