|
2 | 2 |
|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
| 5 | +from typing import Optional |
| 6 | + |
5 | 7 | import httpx |
6 | 8 |
|
| 9 | +from ..types import task_list_params |
7 | 10 | from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven |
| 11 | +from .._utils import maybe_transform, async_maybe_transform |
8 | 12 | from .._compat import cached_property |
9 | 13 | from .._resource import SyncAPIResource, AsyncAPIResource |
10 | 14 | from .._response import ( |
@@ -78,18 +82,41 @@ def retrieve( |
78 | 82 | def list( |
79 | 83 | self, |
80 | 84 | *, |
| 85 | + agent_id: Optional[str] | NotGiven = NOT_GIVEN, |
| 86 | + agent_name: Optional[str] | NotGiven = NOT_GIVEN, |
81 | 87 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
82 | 88 | # The extra values given here take precedence over values defined on the client or passed to this method. |
83 | 89 | extra_headers: Headers | None = None, |
84 | 90 | extra_query: Query | None = None, |
85 | 91 | extra_body: Body | None = None, |
86 | 92 | timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
87 | 93 | ) -> TaskListResponse: |
88 | | - """List all tasks.""" |
| 94 | + """ |
| 95 | + List all tasks. |
| 96 | +
|
| 97 | + Args: |
| 98 | + extra_headers: Send extra headers |
| 99 | +
|
| 100 | + extra_query: Add additional query parameters to the request |
| 101 | +
|
| 102 | + extra_body: Add additional JSON properties to the request |
| 103 | +
|
| 104 | + timeout: Override the client-level default timeout for this request, in seconds |
| 105 | + """ |
89 | 106 | return self._get( |
90 | 107 | "/tasks", |
91 | 108 | options=make_request_options( |
92 | | - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
| 109 | + extra_headers=extra_headers, |
| 110 | + extra_query=extra_query, |
| 111 | + extra_body=extra_body, |
| 112 | + timeout=timeout, |
| 113 | + query=maybe_transform( |
| 114 | + { |
| 115 | + "agent_id": agent_id, |
| 116 | + "agent_name": agent_name, |
| 117 | + }, |
| 118 | + task_list_params.TaskListParams, |
| 119 | + ), |
93 | 120 | ), |
94 | 121 | cast_to=TaskListResponse, |
95 | 122 | ) |
@@ -320,18 +347,41 @@ async def retrieve( |
320 | 347 | async def list( |
321 | 348 | self, |
322 | 349 | *, |
| 350 | + agent_id: Optional[str] | NotGiven = NOT_GIVEN, |
| 351 | + agent_name: Optional[str] | NotGiven = NOT_GIVEN, |
323 | 352 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
324 | 353 | # The extra values given here take precedence over values defined on the client or passed to this method. |
325 | 354 | extra_headers: Headers | None = None, |
326 | 355 | extra_query: Query | None = None, |
327 | 356 | extra_body: Body | None = None, |
328 | 357 | timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
329 | 358 | ) -> TaskListResponse: |
330 | | - """List all tasks.""" |
| 359 | + """ |
| 360 | + List all tasks. |
| 361 | +
|
| 362 | + Args: |
| 363 | + extra_headers: Send extra headers |
| 364 | +
|
| 365 | + extra_query: Add additional query parameters to the request |
| 366 | +
|
| 367 | + extra_body: Add additional JSON properties to the request |
| 368 | +
|
| 369 | + timeout: Override the client-level default timeout for this request, in seconds |
| 370 | + """ |
331 | 371 | return await self._get( |
332 | 372 | "/tasks", |
333 | 373 | options=make_request_options( |
334 | | - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
| 374 | + extra_headers=extra_headers, |
| 375 | + extra_query=extra_query, |
| 376 | + extra_body=extra_body, |
| 377 | + timeout=timeout, |
| 378 | + query=await async_maybe_transform( |
| 379 | + { |
| 380 | + "agent_id": agent_id, |
| 381 | + "agent_name": agent_name, |
| 382 | + }, |
| 383 | + task_list_params.TaskListParams, |
| 384 | + ), |
335 | 385 | ), |
336 | 386 | cast_to=TaskListResponse, |
337 | 387 | ) |
|
0 commit comments