Skip to content

Commit 36491d3

Browse files
feat(api): Update OpenAPI spec
1 parent 746ca39 commit 36491d3

3 files changed

Lines changed: 20 additions & 2 deletions

File tree

src/parallel/resources/beta/task_group.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ def add_runs(
141141
task_group_id: str,
142142
*,
143143
inputs: Iterable[BetaRunInputParam],
144+
refresh_status: bool | Omit = omit,
144145
default_task_spec: Optional[TaskSpecParam] | Omit = omit,
145146
betas: List[ParallelBetaParam] | Omit = omit,
146147
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -197,7 +198,13 @@ def add_runs(
197198
task_group_add_runs_params.TaskGroupAddRunsParams,
198199
),
199200
options=make_request_options(
200-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
201+
extra_headers=extra_headers,
202+
extra_query=extra_query,
203+
extra_body=extra_body,
204+
timeout=timeout,
205+
query=maybe_transform(
206+
{"refresh_status": refresh_status}, task_group_add_runs_params.TaskGroupAddRunsParams
207+
),
201208
),
202209
cast_to=TaskGroupRunResponse,
203210
)
@@ -428,6 +435,7 @@ async def add_runs(
428435
task_group_id: str,
429436
*,
430437
inputs: Iterable[BetaRunInputParam],
438+
refresh_status: bool | Omit = omit,
431439
default_task_spec: Optional[TaskSpecParam] | Omit = omit,
432440
betas: List[ParallelBetaParam] | Omit = omit,
433441
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -484,7 +492,13 @@ async def add_runs(
484492
task_group_add_runs_params.TaskGroupAddRunsParams,
485493
),
486494
options=make_request_options(
487-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
495+
extra_headers=extra_headers,
496+
extra_query=extra_query,
497+
extra_body=extra_body,
498+
timeout=timeout,
499+
query=await async_maybe_transform(
500+
{"refresh_status": refresh_status}, task_group_add_runs_params.TaskGroupAddRunsParams
501+
),
488502
),
489503
cast_to=TaskGroupRunResponse,
490504
)

src/parallel/types/beta/task_group_add_runs_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class TaskGroupAddRunsParams(TypedDict, total=False):
2121
split them across multiple TaskGroup POST requests.
2222
"""
2323

24+
refresh_status: bool
25+
2426
default_task_spec: Optional[TaskSpecParam]
2527
"""Specification for a task.
2628

tests/api_resources/beta/test_task_group.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ def test_method_add_runs_with_all_params(self, client: Parallel) -> None:
147147
},
148148
}
149149
],
150+
refresh_status=True,
150151
default_task_spec={
151152
"output_schema": {
152153
"json_schema": {
@@ -438,6 +439,7 @@ async def test_method_add_runs_with_all_params(self, async_client: AsyncParallel
438439
},
439440
}
440441
],
442+
refresh_status=True,
441443
default_task_spec={
442444
"output_schema": {
443445
"json_schema": {

0 commit comments

Comments
 (0)