diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9e1cdeda..397c4203 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.21.1" + ".": "1.22.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index f9cf330b..4ba48165 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-bf858f37d7ab420841ddc6329dad8c46377308b6a5c8e935908011d0f9845e22.yml -openapi_spec_hash: 2523952a32436e3c7fd3b55508c2e7ee +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-ff61a38530dfae03860bceb49379e84bfc7434eeb5d2f1dc9677cb162014faf1.yml +openapi_spec_hash: df3bdaf4acf575bb07767cae7ca24d69 config_hash: 53778a0b839c4f6ad34fbba051f5e8a6 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c10e20f..4f38ffed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 1.22.0 (2025-04-14) + +Full Changelog: [v1.21.1...v1.22.0](https://github.com/Finch-API/finch-api-python/compare/v1.21.1...v1.22.0) + +### Features + +* **api:** api update ([5315bac](https://github.com/Finch-API/finch-api-python/commit/5315bacbbdfd7c52b2aa58f2f48537f234e5e1bd)) + + +### Chores + +* **client:** minor internal fixes ([92fff7e](https://github.com/Finch-API/finch-api-python/commit/92fff7e2050e32f8d008bc543542f54e680e4713)) +* **internal:** update pyright settings ([249e51a](https://github.com/Finch-API/finch-api-python/commit/249e51ae23b625f6ac3c7b6b901f6d82a830ca81)) + ## 1.21.1 (2025-04-11) Full Changelog: [v1.21.0...v1.21.1](https://github.com/Finch-API/finch-api-python/compare/v1.21.0...v1.21.1) diff --git a/pyproject.toml b/pyproject.toml index 241689ff..13ce2cb5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "finch-api" -version = "1.21.1" +version = "1.22.0" description = "The official Python library for the Finch API" dynamic = ["readme"] license = "Apache-2.0" @@ -147,6 +147,7 @@ exclude = [ ] reportImplicitOverride = true +reportOverlappingOverload = false reportImportCycles = false reportPrivateUsage = false diff --git a/src/finch/_base_client.py b/src/finch/_base_client.py index d552f2cb..07f92a0c 100644 --- a/src/finch/_base_client.py +++ b/src/finch/_base_client.py @@ -410,7 +410,8 @@ def _build_headers(self, options: FinalRequestOptions, *, retries_taken: int = 0 idempotency_header = self._idempotency_header if idempotency_header and options.method.lower() != "get" and idempotency_header not in headers: - headers[idempotency_header] = options.idempotency_key or self._idempotency_key() + options.idempotency_key = options.idempotency_key or self._idempotency_key() + headers[idempotency_header] = options.idempotency_key # Don't set these headers if they were already set or removed by the caller. We check # `custom_headers`, which can contain `Omit()`, instead of `headers` to account for the removal case. @@ -944,6 +945,10 @@ def _request( request = self._build_request(options, retries_taken=retries_taken) self._prepare_request(request) + if options.idempotency_key: + # ensure the idempotency key is reused between requests + input_options.idempotency_key = options.idempotency_key + kwargs: HttpxSendArgs = {} if self.custom_auth is not None: kwargs["auth"] = self.custom_auth @@ -1490,6 +1495,10 @@ async def _request( request = self._build_request(options, retries_taken=retries_taken) await self._prepare_request(request) + if options.idempotency_key: + # ensure the idempotency key is reused between requests + input_options.idempotency_key = options.idempotency_key + kwargs: HttpxSendArgs = {} if self.custom_auth is not None: kwargs["auth"] = self.custom_auth diff --git a/src/finch/_version.py b/src/finch/_version.py index 525c4d96..34bdbea5 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.21.1" # x-release-please-version +__version__ = "1.22.0" # x-release-please-version diff --git a/src/finch/types/introspection.py b/src/finch/types/introspection.py index 156e20ce..5121825a 100644 --- a/src/finch/types/introspection.py +++ b/src/finch/types/introspection.py @@ -36,6 +36,9 @@ class ConnectionStatus(BaseModel): class Introspection(BaseModel): + id: str + """The Finch UUID of the token being introspected.""" + account_id: str """ [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection