Skip to content

Commit e4008e4

Browse files
feat(api): manual updates
1 parent 174407f commit e4008e4

4 files changed

Lines changed: 20 additions & 18 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 38
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web/parallel-sdk-6b946abf6bef7f85a11824bfb1298c2887979f309873eb3ab94eee76dd6668ca.yml
3-
openapi_spec_hash: 688facba9b1f3e19785c0ca88953e1c9
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web/parallel-sdk-d19934965b68e6b9445877a27f3bcd08e0f8492125faca7d9e66e538abf193f5.yml
3+
openapi_spec_hash: c4fc5b0cb3bc48076f736a0ad2b2e75e
44
config_hash: 0b93697d62ec2afc2b9ed854621dffe7

src/parallel/resources/beta/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Methods:
9797

9898
- <code title="post /v1beta/findall/runs">client.beta.findall.<a href="./src/parallel/resources/beta/findall.py">create</a>(\*\*<a href="src/parallel/types/beta/findall_create_params.py">params</a>) -> <a href="./src/parallel/types/beta/findall_run.py">FindAllRun</a></code>
9999
- <code title="get /v1beta/findall/runs/{findall_id}">client.beta.findall.<a href="./src/parallel/resources/beta/findall.py">retrieve</a>(findall_id) -> <a href="./src/parallel/types/beta/findall_run.py">FindAllRun</a></code>
100-
- <code title="post /v1beta/findall/runs/{findall_id}/cancel">client.beta.findall.<a href="./src/parallel/resources/beta/findall.py">cancel</a>(findall_id) -> object</code>
100+
- <code title="post /v1beta/findall/runs/{findall_id}/cancel">client.beta.findall.<a href="./src/parallel/resources/beta/findall.py">cancel</a>(findall_id) -> None</code>
101101
- <code title="post /v1beta/findall/candidates">client.beta.findall.<a href="./src/parallel/resources/beta/findall.py">candidates</a>(\*\*<a href="src/parallel/types/beta/findall_candidates_params.py">params</a>) -> <a href="./src/parallel/types/beta/findall_candidates_response.py">FindAllCandidatesResponse</a></code>
102102
- <code title="post /v1beta/findall/runs/{findall_id}/enrich">client.beta.findall.<a href="./src/parallel/resources/beta/findall.py">enrich</a>(findall_id, \*\*<a href="src/parallel/types/beta/findall_enrich_params.py">params</a>) -> <a href="./src/parallel/types/beta/findall_schema.py">FindAllSchema</a></code>
103103
- <code title="get /v1beta/findall/runs/{findall_id}/events">client.beta.findall.<a href="./src/parallel/resources/beta/findall.py">events</a>(findall_id, \*\*<a href="src/parallel/types/beta/findall_events_params.py">params</a>) -> <a href="./src/parallel/types/beta/findall_events_response.py">FindAllEventsResponse</a></code>

src/parallel/resources/beta/findall.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import httpx
1010

11-
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
11+
from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
1212
from ..._utils import is_given, path_template, maybe_transform, strip_not_given, async_maybe_transform
1313
from ..._compat import cached_property
1414
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -230,7 +230,7 @@ def cancel(
230230
extra_query: Query | None = None,
231231
extra_body: Body | None = None,
232232
timeout: float | httpx.Timeout | None | NotGiven = not_given,
233-
) -> object:
233+
) -> None:
234234
"""
235235
Cancel a FindAll run.
236236
@@ -247,6 +247,7 @@ def cancel(
247247
"""
248248
if not findall_id:
249249
raise ValueError(f"Expected a non-empty value for `findall_id` but received {findall_id!r}")
250+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
250251
extra_headers = {
251252
**strip_not_given(
252253
{
@@ -257,13 +258,13 @@ def cancel(
257258
),
258259
**(extra_headers or {}),
259260
}
260-
extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})}
261+
extra_headers.update({"parallel-beta": "findall-2025-09-15"})
261262
return self._post(
262263
path_template("/v1beta/findall/runs/{findall_id}/cancel", findall_id=findall_id),
263264
options=make_request_options(
264265
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
265266
),
266-
cast_to=object,
267+
cast_to=NoneType,
267268
)
268269

269270
def candidates(
@@ -828,7 +829,7 @@ async def cancel(
828829
extra_query: Query | None = None,
829830
extra_body: Body | None = None,
830831
timeout: float | httpx.Timeout | None | NotGiven = not_given,
831-
) -> object:
832+
) -> None:
832833
"""
833834
Cancel a FindAll run.
834835
@@ -845,6 +846,7 @@ async def cancel(
845846
"""
846847
if not findall_id:
847848
raise ValueError(f"Expected a non-empty value for `findall_id` but received {findall_id!r}")
849+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
848850
extra_headers = {
849851
**strip_not_given(
850852
{
@@ -855,13 +857,13 @@ async def cancel(
855857
),
856858
**(extra_headers or {}),
857859
}
858-
extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})}
860+
extra_headers.update({"parallel-beta": "findall-2025-09-15"})
859861
return await self._post(
860862
path_template("/v1beta/findall/runs/{findall_id}/cancel", findall_id=findall_id),
861863
options=make_request_options(
862864
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
863865
),
864-
cast_to=object,
866+
cast_to=NoneType,
865867
)
866868

867869
async def candidates(

tests/api_resources/beta/test_findall.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,15 @@ def test_method_cancel(self, client: Parallel) -> None:
159159
findall = client.beta.findall.cancel(
160160
findall_id="findall_id",
161161
)
162-
assert_matches_type(object, findall, path=["response"])
162+
assert findall is None
163163

164164
@parametrize
165165
def test_method_cancel_with_all_params(self, client: Parallel) -> None:
166166
findall = client.beta.findall.cancel(
167167
findall_id="findall_id",
168168
betas=["mcp-server-2025-07-17"],
169169
)
170-
assert_matches_type(object, findall, path=["response"])
170+
assert findall is None
171171

172172
@parametrize
173173
def test_raw_response_cancel(self, client: Parallel) -> None:
@@ -178,7 +178,7 @@ def test_raw_response_cancel(self, client: Parallel) -> None:
178178
assert response.is_closed is True
179179
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
180180
findall = response.parse()
181-
assert_matches_type(object, findall, path=["response"])
181+
assert findall is None
182182

183183
@parametrize
184184
def test_streaming_response_cancel(self, client: Parallel) -> None:
@@ -189,7 +189,7 @@ def test_streaming_response_cancel(self, client: Parallel) -> None:
189189
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
190190

191191
findall = response.parse()
192-
assert_matches_type(object, findall, path=["response"])
192+
assert findall is None
193193

194194
assert cast(Any, response.is_closed) is True
195195

@@ -712,15 +712,15 @@ async def test_method_cancel(self, async_client: AsyncParallel) -> None:
712712
findall = await async_client.beta.findall.cancel(
713713
findall_id="findall_id",
714714
)
715-
assert_matches_type(object, findall, path=["response"])
715+
assert findall is None
716716

717717
@parametrize
718718
async def test_method_cancel_with_all_params(self, async_client: AsyncParallel) -> None:
719719
findall = await async_client.beta.findall.cancel(
720720
findall_id="findall_id",
721721
betas=["mcp-server-2025-07-17"],
722722
)
723-
assert_matches_type(object, findall, path=["response"])
723+
assert findall is None
724724

725725
@parametrize
726726
async def test_raw_response_cancel(self, async_client: AsyncParallel) -> None:
@@ -731,7 +731,7 @@ async def test_raw_response_cancel(self, async_client: AsyncParallel) -> None:
731731
assert response.is_closed is True
732732
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
733733
findall = await response.parse()
734-
assert_matches_type(object, findall, path=["response"])
734+
assert findall is None
735735

736736
@parametrize
737737
async def test_streaming_response_cancel(self, async_client: AsyncParallel) -> None:
@@ -742,7 +742,7 @@ async def test_streaming_response_cancel(self, async_client: AsyncParallel) -> N
742742
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
743743

744744
findall = await response.parse()
745-
assert_matches_type(object, findall, path=["response"])
745+
assert findall is None
746746

747747
assert cast(Any, response.is_closed) is True
748748

0 commit comments

Comments
 (0)