Skip to content

Commit cdc9c63

Browse files
feat(api): api update
1 parent 290a3db commit cdc9c63

File tree

7 files changed

+45
-2
lines changed

7 files changed

+45
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 34
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-39ca5a9d5ad039fdfb4da53dd41edb496943e4c39f12f4778238dde170ff9b17.yml
3-
openapi_spec_hash: 6f2f0d8c757d172254e346c647d27482
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-4a9fe0fbe18b82a7ada2b8845b3a14d37c5b01e942ba9c0e8f60330ceada1cf4.yml
3+
openapi_spec_hash: 29e41b58277845bbb419d94055ae188a
44
config_hash: 0197f86ba1a4b1b5ce813d0e62138588

src/agentex/resources/messages/messages.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ def list(
181181
*,
182182
task_id: str,
183183
limit: int | Omit = omit,
184+
order_by: Optional[str] | Omit = omit,
185+
order_direction: str | Omit = omit,
184186
page_number: int | Omit = omit,
185187
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
186188
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -214,6 +216,8 @@ def list(
214216
{
215217
"task_id": task_id,
216218
"limit": limit,
219+
"order_by": order_by,
220+
"order_direction": order_direction,
217221
"page_number": page_number,
218222
},
219223
message_list_params.MessageListParams,
@@ -370,6 +374,8 @@ async def list(
370374
*,
371375
task_id: str,
372376
limit: int | Omit = omit,
377+
order_by: Optional[str] | Omit = omit,
378+
order_direction: str | Omit = omit,
373379
page_number: int | Omit = omit,
374380
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
375381
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -403,6 +409,8 @@ async def list(
403409
{
404410
"task_id": task_id,
405411
"limit": limit,
412+
"order_by": order_by,
413+
"order_direction": order_direction,
406414
"page_number": page_number,
407415
},
408416
message_list_params.MessageListParams,

src/agentex/resources/states.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ def list(
167167
*,
168168
agent_id: Optional[str] | Omit = omit,
169169
limit: int | Omit = omit,
170+
order_by: Optional[str] | Omit = omit,
171+
order_direction: str | Omit = omit,
170172
page_number: int | Omit = omit,
171173
task_id: Optional[str] | Omit = omit,
172174
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -184,6 +186,10 @@ def list(
184186
185187
limit: Limit
186188
189+
order_by: Field to order by
190+
191+
order_direction: Order direction (asc or desc)
192+
187193
page_number: Page number
188194
189195
task_id: Task ID
@@ -207,6 +213,8 @@ def list(
207213
{
208214
"agent_id": agent_id,
209215
"limit": limit,
216+
"order_by": order_by,
217+
"order_direction": order_direction,
210218
"page_number": page_number,
211219
"task_id": task_id,
212220
},
@@ -393,6 +401,8 @@ async def list(
393401
*,
394402
agent_id: Optional[str] | Omit = omit,
395403
limit: int | Omit = omit,
404+
order_by: Optional[str] | Omit = omit,
405+
order_direction: str | Omit = omit,
396406
page_number: int | Omit = omit,
397407
task_id: Optional[str] | Omit = omit,
398408
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -410,6 +420,10 @@ async def list(
410420
411421
limit: Limit
412422
423+
order_by: Field to order by
424+
425+
order_direction: Order direction (asc or desc)
426+
413427
page_number: Page number
414428
415429
task_id: Task ID
@@ -433,6 +447,8 @@ async def list(
433447
{
434448
"agent_id": agent_id,
435449
"limit": limit,
450+
"order_by": order_by,
451+
"order_direction": order_direction,
436452
"page_number": page_number,
437453
"task_id": task_id,
438454
},

src/agentex/types/message_list_params.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
56
from typing_extensions import Required, TypedDict
67

78
__all__ = ["MessageListParams"]
@@ -13,4 +14,8 @@ class MessageListParams(TypedDict, total=False):
1314

1415
limit: int
1516

17+
order_by: Optional[str]
18+
19+
order_direction: str
20+
1621
page_number: int

src/agentex/types/state_list_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ class StateListParams(TypedDict, total=False):
1515
limit: int
1616
"""Limit"""
1717

18+
order_by: Optional[str]
19+
"""Field to order by"""
20+
21+
order_direction: str
22+
"""Order direction (asc or desc)"""
23+
1824
page_number: int
1925
"""Page number"""
2026

tests/api_resources/test_messages.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ def test_method_list_with_all_params(self, client: Agentex) -> None:
241241
message = client.messages.list(
242242
task_id="task_id",
243243
limit=0,
244+
order_by="order_by",
245+
order_direction="order_direction",
244246
page_number=0,
245247
)
246248
assert_matches_type(MessageListResponse, message, path=["response"])
@@ -497,6 +499,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncAgentex) ->
497499
message = await async_client.messages.list(
498500
task_id="task_id",
499501
limit=0,
502+
order_by="order_by",
503+
order_direction="order_direction",
500504
page_number=0,
501505
)
502506
assert_matches_type(MessageListResponse, message, path=["response"])

tests/api_resources/test_states.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ def test_method_list_with_all_params(self, client: Agentex) -> None:
166166
state = client.states.list(
167167
agent_id="agent_id",
168168
limit=1,
169+
order_by="order_by",
170+
order_direction="order_direction",
169171
page_number=1,
170172
task_id="task_id",
171173
)
@@ -389,6 +391,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncAgentex) ->
389391
state = await async_client.states.list(
390392
agent_id="agent_id",
391393
limit=1,
394+
order_by="order_by",
395+
order_direction="order_direction",
392396
page_number=1,
393397
task_id="task_id",
394398
)

0 commit comments

Comments
 (0)