From 0a5c874efeed941fa4fca1f5237ffee632b00ba0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 Aug 2025 17:59:13 +0000 Subject: [PATCH 1/5] chore: update @stainless-api/prism-cli to v5.15.0 --- scripts/mock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mock b/scripts/mock index d2814ae6..0b28f6ea 100755 --- a/scripts/mock +++ b/scripts/mock @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}" # Run prism mock on the given spec if [ "$1" == "--daemon" ]; then - npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & # Wait for server to come online echo -n "Waiting for server" @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" fi From 9efeb7a90337849c2cf09fc40884f8943d31714c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 Aug 2025 21:24:34 +0000 Subject: [PATCH 2/5] chore(internal): update comment in script --- scripts/test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test b/scripts/test index 2b878456..dbeda2d2 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! prism_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the prism command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" echo exit 1 From 00792da673687c39f2f15a522b00cd54508a956c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 23:10:26 +0000 Subject: [PATCH 3/5] feat(api): api update --- .stats.yml | 4 ++-- src/finch/types/jobs/automated_async_job.py | 2 +- src/finch/types/jobs/manual_async_job.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3fe8a845..4fee3115 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 46 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-73c284d36c1ed2d9963fc733e421005fad76e559de8efe9baa6511a43dd72668.yml -openapi_spec_hash: 1e58c4445919b71c77e5c7f16bd6fa7d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-d5e464682bd08cc19d0c41aa783238846cdc1162a8765083bd5c7e3ca78655d5.yml +openapi_spec_hash: 40b39b0a6fcd33ce59c96bec3ebb5985 config_hash: 5146b12344dae76238940989dac1e8a0 diff --git a/src/finch/types/jobs/automated_async_job.py b/src/finch/types/jobs/automated_async_job.py index 0c4ed460..40e49598 100644 --- a/src/finch/types/jobs/automated_async_job.py +++ b/src/finch/types/jobs/automated_async_job.py @@ -38,7 +38,7 @@ class AutomatedAsyncJob(BaseModel): """The datetime a job is scheduled to be run. For scheduled jobs, this datetime can be in the future if the job has not yet - been enqueued. For ad-hoc jobs, this field will be null. + been enqueued. For ad-hoc jobs, this field will be null. """ started_at: Optional[datetime] = None diff --git a/src/finch/types/jobs/manual_async_job.py b/src/finch/types/jobs/manual_async_job.py index 56a82f4c..a3dd5776 100644 --- a/src/finch/types/jobs/manual_async_job.py +++ b/src/finch/types/jobs/manual_async_job.py @@ -9,7 +9,7 @@ class ManualAsyncJob(BaseModel): - body: Optional[List[object]] = None + body: Optional[List[Optional[object]]] = None """Specific information about the job, such as individual statuses for batch jobs.""" job_id: str From 030c07d05d08d04d4732134e285c51f74ce06d5a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 18:41:34 +0000 Subject: [PATCH 4/5] feat(api): api update --- .stats.yml | 4 +- api.md | 4 +- src/finch/resources/jobs/automated.py | 38 +++++++++++++++++-- src/finch/resources/jobs/manual.py | 26 ++++++++++++- src/finch/resources/request_forwarding.py | 8 ++-- src/finch/types/disconnect_response.py | 2 +- src/finch/types/jobs/__init__.py | 2 + src/finch/types/jobs/automated_list_params.py | 7 ++++ .../types/jobs/automated_retrieve_params.py | 16 ++++++++ .../types/jobs/manual_retrieve_params.py | 16 ++++++++ .../request_forwarding_forward_response.py | 14 +++---- tests/api_resources/jobs/test_automated.py | 34 +++++++++++++---- tests/api_resources/jobs/test_manual.py | 32 ++++++++++++---- 13 files changed, 166 insertions(+), 37 deletions(-) create mode 100644 src/finch/types/jobs/automated_retrieve_params.py create mode 100644 src/finch/types/jobs/manual_retrieve_params.py diff --git a/.stats.yml b/.stats.yml index 4fee3115..79b6214f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 46 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-d5e464682bd08cc19d0c41aa783238846cdc1162a8765083bd5c7e3ca78655d5.yml -openapi_spec_hash: 40b39b0a6fcd33ce59c96bec3ebb5985 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-e8b684dbd61d1724b5e516a573a952bb6906d63840e27ebda7731a2f71061aff.yml +openapi_spec_hash: 8baff9577d4e721d0494ff315da267ca config_hash: 5146b12344dae76238940989dac1e8a0 diff --git a/api.md b/api.md index f6de6000..8dad5c14 100644 --- a/api.md +++ b/api.md @@ -281,7 +281,7 @@ from finch.types.jobs import AutomatedAsyncJob, AutomatedCreateResponse, Automat Methods: - client.jobs.automated.create(\*\*params) -> AutomatedCreateResponse -- client.jobs.automated.retrieve(job_id) -> AutomatedAsyncJob +- client.jobs.automated.retrieve(job_id, \*\*params) -> AutomatedAsyncJob - client.jobs.automated.list(\*\*params) -> AutomatedListResponse ## Manual @@ -294,7 +294,7 @@ from finch.types.jobs import ManualAsyncJob Methods: -- client.jobs.manual.retrieve(job_id) -> ManualAsyncJob +- client.jobs.manual.retrieve(job_id, \*\*params) -> ManualAsyncJob # Sandbox diff --git a/src/finch/resources/jobs/automated.py b/src/finch/resources/jobs/automated.py index 08f813da..eb4e7ca9 100644 --- a/src/finch/resources/jobs/automated.py +++ b/src/finch/resources/jobs/automated.py @@ -12,7 +12,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ...types.jobs import automated_list_params, automated_create_params +from ...types.jobs import automated_list_params, automated_create_params, automated_retrieve_params from ..._base_client import make_request_options from ...types.jobs.automated_async_job import AutomatedAsyncJob from ...types.jobs.automated_list_response import AutomatedListResponse @@ -156,6 +156,7 @@ def retrieve( self, job_id: str, *, + entity_id: str | NotGiven = NOT_GIVEN, # 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. extra_headers: Headers | None = None, @@ -167,6 +168,10 @@ def retrieve( Get an automated job by `job_id`. Args: + entity_id: The entity ID to use when authenticating with a multi-account token. Required + when using a multi-account token to specify which entity's data to access. + Example: `123e4567-e89b-12d3-a456-426614174000` + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -180,7 +185,11 @@ def retrieve( return self._get( f"/jobs/automated/{job_id}", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform({"entity_id": entity_id}, automated_retrieve_params.AutomatedRetrieveParams), ), cast_to=AutomatedAsyncJob, ) @@ -188,6 +197,7 @@ def retrieve( def list( self, *, + entity_id: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, offset: int | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -204,6 +214,10 @@ def list( as data syncs, only the next scheduled job is shown. Args: + entity_id: The entity ID to use when authenticating with a multi-account token. Required + when using a multi-account token to specify which entity's data to access. + Example: `123e4567-e89b-12d3-a456-426614174000` + limit: Number of items to return offset: Index to start from (defaults to 0) @@ -225,6 +239,7 @@ def list( timeout=timeout, query=maybe_transform( { + "entity_id": entity_id, "limit": limit, "offset": offset, }, @@ -370,6 +385,7 @@ async def retrieve( self, job_id: str, *, + entity_id: str | NotGiven = NOT_GIVEN, # 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. extra_headers: Headers | None = None, @@ -381,6 +397,10 @@ async def retrieve( Get an automated job by `job_id`. Args: + entity_id: The entity ID to use when authenticating with a multi-account token. Required + when using a multi-account token to specify which entity's data to access. + Example: `123e4567-e89b-12d3-a456-426614174000` + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -394,7 +414,13 @@ async def retrieve( return await self._get( f"/jobs/automated/{job_id}", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + {"entity_id": entity_id}, automated_retrieve_params.AutomatedRetrieveParams + ), ), cast_to=AutomatedAsyncJob, ) @@ -402,6 +428,7 @@ async def retrieve( async def list( self, *, + entity_id: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, offset: int | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -418,6 +445,10 @@ async def list( as data syncs, only the next scheduled job is shown. Args: + entity_id: The entity ID to use when authenticating with a multi-account token. Required + when using a multi-account token to specify which entity's data to access. + Example: `123e4567-e89b-12d3-a456-426614174000` + limit: Number of items to return offset: Index to start from (defaults to 0) @@ -439,6 +470,7 @@ async def list( timeout=timeout, query=await async_maybe_transform( { + "entity_id": entity_id, "limit": limit, "offset": offset, }, diff --git a/src/finch/resources/jobs/manual.py b/src/finch/resources/jobs/manual.py index 3adee82b..de9a8413 100644 --- a/src/finch/resources/jobs/manual.py +++ b/src/finch/resources/jobs/manual.py @@ -6,9 +6,11 @@ from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ...types.jobs import manual_retrieve_params from ..._base_client import make_request_options from ...types.jobs.manual_async_job import ManualAsyncJob @@ -39,6 +41,7 @@ def retrieve( self, job_id: str, *, + entity_id: str | NotGiven = NOT_GIVEN, # 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. extra_headers: Headers | None = None, @@ -52,6 +55,10 @@ def retrieve( Assisted Benefits jobs. Args: + entity_id: The entity ID to use when authenticating with a multi-account token. Required + when using a multi-account token to specify which entity's data to access. + Example: `123e4567-e89b-12d3-a456-426614174000` + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -65,7 +72,11 @@ def retrieve( return self._get( f"/jobs/manual/{job_id}", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform({"entity_id": entity_id}, manual_retrieve_params.ManualRetrieveParams), ), cast_to=ManualAsyncJob, ) @@ -95,6 +106,7 @@ async def retrieve( self, job_id: str, *, + entity_id: str | NotGiven = NOT_GIVEN, # 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. extra_headers: Headers | None = None, @@ -108,6 +120,10 @@ async def retrieve( Assisted Benefits jobs. Args: + entity_id: The entity ID to use when authenticating with a multi-account token. Required + when using a multi-account token to specify which entity's data to access. + Example: `123e4567-e89b-12d3-a456-426614174000` + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -121,7 +137,13 @@ async def retrieve( return await self._get( f"/jobs/manual/{job_id}", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + {"entity_id": entity_id}, manual_retrieve_params.ManualRetrieveParams + ), ), cast_to=ManualAsyncJob, ) diff --git a/src/finch/resources/request_forwarding.py b/src/finch/resources/request_forwarding.py index e8a7869c..619d784b 100644 --- a/src/finch/resources/request_forwarding.py +++ b/src/finch/resources/request_forwarding.py @@ -57,8 +57,8 @@ def forward( """The Forward API allows you to make direct requests to an employment system. If - Finch’s unified API doesn’t have a data model that cleanly fits your needs, then - Forward allows you to push or pull data models directly against an integration’s + Finch's unified API doesn't have a data model that cleanly fits your needs, then + Forward allows you to push or pull data models directly against an integration's API. Args: @@ -144,8 +144,8 @@ async def forward( """The Forward API allows you to make direct requests to an employment system. If - Finch’s unified API doesn’t have a data model that cleanly fits your needs, then - Forward allows you to push or pull data models directly against an integration’s + Finch's unified API doesn't have a data model that cleanly fits your needs, then + Forward allows you to push or pull data models directly against an integration's API. Args: diff --git a/src/finch/types/disconnect_response.py b/src/finch/types/disconnect_response.py index 2d128175..f829a76e 100644 --- a/src/finch/types/disconnect_response.py +++ b/src/finch/types/disconnect_response.py @@ -7,4 +7,4 @@ class DisconnectResponse(BaseModel): status: str - """If the request is successful, Finch will return “success” (HTTP 200 status).""" + """If the request is successful, Finch will return "success" (HTTP 200 status).""" diff --git a/src/finch/types/jobs/__init__.py b/src/finch/types/jobs/__init__.py index ee2d3e8e..b7a24a08 100644 --- a/src/finch/types/jobs/__init__.py +++ b/src/finch/types/jobs/__init__.py @@ -5,6 +5,8 @@ from .manual_async_job import ManualAsyncJob as ManualAsyncJob from .automated_async_job import AutomatedAsyncJob as AutomatedAsyncJob from .automated_list_params import AutomatedListParams as AutomatedListParams +from .manual_retrieve_params import ManualRetrieveParams as ManualRetrieveParams from .automated_create_params import AutomatedCreateParams as AutomatedCreateParams from .automated_list_response import AutomatedListResponse as AutomatedListResponse from .automated_create_response import AutomatedCreateResponse as AutomatedCreateResponse +from .automated_retrieve_params import AutomatedRetrieveParams as AutomatedRetrieveParams diff --git a/src/finch/types/jobs/automated_list_params.py b/src/finch/types/jobs/automated_list_params.py index 21032e2c..2e41586c 100644 --- a/src/finch/types/jobs/automated_list_params.py +++ b/src/finch/types/jobs/automated_list_params.py @@ -8,6 +8,13 @@ class AutomatedListParams(TypedDict, total=False): + entity_id: str + """The entity ID to use when authenticating with a multi-account token. + + Required when using a multi-account token to specify which entity's data to + access. Example: `123e4567-e89b-12d3-a456-426614174000` + """ + limit: int """Number of items to return""" diff --git a/src/finch/types/jobs/automated_retrieve_params.py b/src/finch/types/jobs/automated_retrieve_params.py new file mode 100644 index 00000000..d009691e --- /dev/null +++ b/src/finch/types/jobs/automated_retrieve_params.py @@ -0,0 +1,16 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import TypedDict + +__all__ = ["AutomatedRetrieveParams"] + + +class AutomatedRetrieveParams(TypedDict, total=False): + entity_id: str + """The entity ID to use when authenticating with a multi-account token. + + Required when using a multi-account token to specify which entity's data to + access. Example: `123e4567-e89b-12d3-a456-426614174000` + """ diff --git a/src/finch/types/jobs/manual_retrieve_params.py b/src/finch/types/jobs/manual_retrieve_params.py new file mode 100644 index 00000000..3a4e4b11 --- /dev/null +++ b/src/finch/types/jobs/manual_retrieve_params.py @@ -0,0 +1,16 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import TypedDict + +__all__ = ["ManualRetrieveParams"] + + +class ManualRetrieveParams(TypedDict, total=False): + entity_id: str + """The entity ID to use when authenticating with a multi-account token. + + Required when using a multi-account token to specify which entity's data to + access. Example: `123e4567-e89b-12d3-a456-426614174000` + """ diff --git a/src/finch/types/request_forwarding_forward_response.py b/src/finch/types/request_forwarding_forward_response.py index 5b279d94..61fde1b5 100644 --- a/src/finch/types/request_forwarding_forward_response.py +++ b/src/finch/types/request_forwarding_forward_response.py @@ -42,15 +42,15 @@ class Request(BaseModel): class RequestForwardingForwardResponse(BaseModel): data: Optional[str] = None """ - A string representation of the HTTP response body of the forwarded request’s - response received from the underlying integration’s API. This field may be null - in the case where the upstream system’s response is empty. + A string representation of the HTTP response body of the forwarded request's + response received from the underlying integration's API. This field may be null + in the case where the upstream system's response is empty. """ headers: Optional[object] = None """ - The HTTP headers of the forwarded request’s response, exactly as received from - the underlying integration’s API. + The HTTP headers of the forwarded request's response, exactly as received from + the underlying integration's API. """ request: Request @@ -61,6 +61,6 @@ class RequestForwardingForwardResponse(BaseModel): status_code: int = FieldInfo(alias="statusCode") """ - The HTTP status code of the forwarded request’s response, exactly received from - the underlying integration’s API. This value will be returned as an integer. + The HTTP status code of the forwarded request's response, exactly received from + the underlying integration's API. This value will be returned as an integer. """ diff --git a/tests/api_resources/jobs/test_automated.py b/tests/api_resources/jobs/test_automated.py index 746efc27..1593aeda 100644 --- a/tests/api_resources/jobs/test_automated.py +++ b/tests/api_resources/jobs/test_automated.py @@ -89,14 +89,22 @@ def test_streaming_response_create_overload_2(self, client: Finch) -> None: @parametrize def test_method_retrieve(self, client: Finch) -> None: automated = client.jobs.automated.retrieve( - "job_id", + job_id="job_id", + ) + assert_matches_type(AutomatedAsyncJob, automated, path=["response"]) + + @parametrize + def test_method_retrieve_with_all_params(self, client: Finch) -> None: + automated = client.jobs.automated.retrieve( + job_id="job_id", + entity_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) assert_matches_type(AutomatedAsyncJob, automated, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Finch) -> None: response = client.jobs.automated.with_raw_response.retrieve( - "job_id", + job_id="job_id", ) assert response.is_closed is True @@ -107,7 +115,7 @@ def test_raw_response_retrieve(self, client: Finch) -> None: @parametrize def test_streaming_response_retrieve(self, client: Finch) -> None: with client.jobs.automated.with_streaming_response.retrieve( - "job_id", + job_id="job_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -121,7 +129,7 @@ def test_streaming_response_retrieve(self, client: Finch) -> None: def test_path_params_retrieve(self, client: Finch) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `job_id` but received ''"): client.jobs.automated.with_raw_response.retrieve( - "", + job_id="", ) @parametrize @@ -132,6 +140,7 @@ def test_method_list(self, client: Finch) -> None: @parametrize def test_method_list_with_all_params(self, client: Finch) -> None: automated = client.jobs.automated.list( + entity_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", limit=0, offset=0, ) @@ -231,14 +240,22 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncFin @parametrize async def test_method_retrieve(self, async_client: AsyncFinch) -> None: automated = await async_client.jobs.automated.retrieve( - "job_id", + job_id="job_id", + ) + assert_matches_type(AutomatedAsyncJob, automated, path=["response"]) + + @parametrize + async def test_method_retrieve_with_all_params(self, async_client: AsyncFinch) -> None: + automated = await async_client.jobs.automated.retrieve( + job_id="job_id", + entity_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) assert_matches_type(AutomatedAsyncJob, automated, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None: response = await async_client.jobs.automated.with_raw_response.retrieve( - "job_id", + job_id="job_id", ) assert response.is_closed is True @@ -249,7 +266,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> None: async with async_client.jobs.automated.with_streaming_response.retrieve( - "job_id", + job_id="job_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -263,7 +280,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> No async def test_path_params_retrieve(self, async_client: AsyncFinch) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `job_id` but received ''"): await async_client.jobs.automated.with_raw_response.retrieve( - "", + job_id="", ) @parametrize @@ -274,6 +291,7 @@ async def test_method_list(self, async_client: AsyncFinch) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> None: automated = await async_client.jobs.automated.list( + entity_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", limit=0, offset=0, ) diff --git a/tests/api_resources/jobs/test_manual.py b/tests/api_resources/jobs/test_manual.py index 1cd30215..bc3d5a8f 100644 --- a/tests/api_resources/jobs/test_manual.py +++ b/tests/api_resources/jobs/test_manual.py @@ -20,14 +20,22 @@ class TestManual: @parametrize def test_method_retrieve(self, client: Finch) -> None: manual = client.jobs.manual.retrieve( - "job_id", + job_id="job_id", + ) + assert_matches_type(ManualAsyncJob, manual, path=["response"]) + + @parametrize + def test_method_retrieve_with_all_params(self, client: Finch) -> None: + manual = client.jobs.manual.retrieve( + job_id="job_id", + entity_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) assert_matches_type(ManualAsyncJob, manual, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Finch) -> None: response = client.jobs.manual.with_raw_response.retrieve( - "job_id", + job_id="job_id", ) assert response.is_closed is True @@ -38,7 +46,7 @@ def test_raw_response_retrieve(self, client: Finch) -> None: @parametrize def test_streaming_response_retrieve(self, client: Finch) -> None: with client.jobs.manual.with_streaming_response.retrieve( - "job_id", + job_id="job_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -52,7 +60,7 @@ def test_streaming_response_retrieve(self, client: Finch) -> None: def test_path_params_retrieve(self, client: Finch) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `job_id` but received ''"): client.jobs.manual.with_raw_response.retrieve( - "", + job_id="", ) @@ -64,14 +72,22 @@ class TestAsyncManual: @parametrize async def test_method_retrieve(self, async_client: AsyncFinch) -> None: manual = await async_client.jobs.manual.retrieve( - "job_id", + job_id="job_id", + ) + assert_matches_type(ManualAsyncJob, manual, path=["response"]) + + @parametrize + async def test_method_retrieve_with_all_params(self, async_client: AsyncFinch) -> None: + manual = await async_client.jobs.manual.retrieve( + job_id="job_id", + entity_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) assert_matches_type(ManualAsyncJob, manual, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None: response = await async_client.jobs.manual.with_raw_response.retrieve( - "job_id", + job_id="job_id", ) assert response.is_closed is True @@ -82,7 +98,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> None: async with async_client.jobs.manual.with_streaming_response.retrieve( - "job_id", + job_id="job_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -96,5 +112,5 @@ async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> No async def test_path_params_retrieve(self, async_client: AsyncFinch) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `job_id` but received ''"): await async_client.jobs.manual.with_raw_response.retrieve( - "", + job_id="", ) From 1cc433143e1535f7639a8ff7b20608eb8e75d837 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 18:41:56 +0000 Subject: [PATCH 5/5] release: 1.33.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 15 +++++++++++++++ pyproject.toml | 2 +- src/finch/_version.py | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 592b0e15..5334cb41 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.32.0" + ".": "1.33.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b95a325..27aa2fd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 1.33.0 (2025-08-12) + +Full Changelog: [v1.32.0...v1.33.0](https://github.com/Finch-API/finch-api-python/compare/v1.32.0...v1.33.0) + +### Features + +* **api:** api update ([030c07d](https://github.com/Finch-API/finch-api-python/commit/030c07d05d08d04d4732134e285c51f74ce06d5a)) +* **api:** api update ([00792da](https://github.com/Finch-API/finch-api-python/commit/00792da673687c39f2f15a522b00cd54508a956c)) + + +### Chores + +* **internal:** update comment in script ([9efeb7a](https://github.com/Finch-API/finch-api-python/commit/9efeb7a90337849c2cf09fc40884f8943d31714c)) +* update @stainless-api/prism-cli to v5.15.0 ([0a5c874](https://github.com/Finch-API/finch-api-python/commit/0a5c874efeed941fa4fca1f5237ffee632b00ba0)) + ## 1.32.0 (2025-08-05) Full Changelog: [v1.31.0...v1.32.0](https://github.com/Finch-API/finch-api-python/compare/v1.31.0...v1.32.0) diff --git a/pyproject.toml b/pyproject.toml index b0239d18..1693244f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "finch-api" -version = "1.32.0" +version = "1.33.0" description = "The official Python library for the Finch API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/finch/_version.py b/src/finch/_version.py index 302affe5..cf3fd824 100644 --- a/src/finch/_version.py +++ b/src/finch/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "finch" -__version__ = "1.32.0" # x-release-please-version +__version__ = "1.33.0" # x-release-please-version