Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.33.0"
".": "1.34.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 46
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-e8b684dbd61d1724b5e516a573a952bb6906d63840e27ebda7731a2f71061aff.yml
openapi_spec_hash: 8baff9577d4e721d0494ff315da267ca
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-6d0c6a1feba5ccb895a6779cd98c2a0ae87d6394f5e98a9da51f17258c4eb297.yml
openapi_spec_hash: ac3be0c8a992103e5f467fe1bcb20a81
config_hash: 5146b12344dae76238940989dac1e8a0
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.34.0 (2025-08-20)

Full Changelog: [v1.33.0...v1.34.0](https://github.com/Finch-API/finch-api-python/compare/v1.33.0...v1.34.0)

### Features

* **api:** api update ([250dd73](https://github.com/Finch-API/finch-api-python/commit/250dd7334ae72a1e6c6b1c2e4578e796aa9a87ff))

## 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)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "finch-api"
version = "1.33.0"
version = "1.34.0"
description = "The official Python library for the Finch API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/finch/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "finch"
__version__ = "1.33.0" # x-release-please-version
__version__ = "1.34.0" # x-release-please-version
24 changes: 20 additions & 4 deletions src/finch/resources/access_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def with_streaming_response(self) -> AccessTokensWithStreamingResponse:
def create(
self,
*,
client_id: str,
client_secret: str,
code: str,
client_id: str | NotGiven = NOT_GIVEN,
client_secret: str | NotGiven = NOT_GIVEN,
redirect_uri: 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.
Expand All @@ -55,6 +55,14 @@ def create(
Exchange the authorization code for an access token

Args:
client_id: The client ID for your application

client_secret: The client secret for your application

code: The authorization code received from the authorization server

redirect_uri: The redirect URI used in the authorization request (optional)

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -118,9 +126,9 @@ def with_streaming_response(self) -> AsyncAccessTokensWithStreamingResponse:
async def create(
self,
*,
client_id: str,
client_secret: str,
code: str,
client_id: str | NotGiven = NOT_GIVEN,
client_secret: str | NotGiven = NOT_GIVEN,
redirect_uri: 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.
Expand All @@ -133,6 +141,14 @@ async def create(
Exchange the authorization code for an access token

Args:
client_id: The client ID for your application

client_secret: The client secret for your application

code: The authorization code received from the authorization server

redirect_uri: The redirect URI used in the authorization request (optional)

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down
10 changes: 7 additions & 3 deletions src/finch/types/access_token_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@


class AccessTokenCreateParams(TypedDict, total=False):
code: Required[str]
client_id: Required[str]
"""The client ID for your application"""

client_id: str
client_secret: Required[str]
"""The client secret for your application"""

client_secret: str
code: Required[str]
"""The authorization code received from the authorization server"""

redirect_uri: str
"""The redirect URI used in the authorization request (optional)"""
44 changes: 22 additions & 22 deletions src/finch/types/create_access_token_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,44 @@

class CreateAccessTokenResponse(BaseModel):
access_token: str
"""The access token for the connection."""
"""The access token for the connection"""

account_id: str
"""
[DEPRECATED] Use `connection_id` to identify the connection instead of this
account ID.
"""

client_type: Literal["production", "development", "sandbox"]
client_type: Literal["development", "production", "sandbox"]
"""The type of application associated with a token."""

company_id: str
"""
[DEPRECATED] Use `connection_id` to identify the connection instead of this
company ID.
"""

connection_id: str
"""The Finch UUID of the connection associated with the `access_token`."""
"""The Finch UUID of the connection associated with the `access_token`"""

connection_type: Literal["provider", "finch"]
connection_type: Literal["finch", "provider"]
"""The type of the connection associated with the token.

- `provider` - connection to an external provider
- `finch` - finch-generated data.
"""

products: List[str]
"""An array of the authorized products associated with the `access_token`."""
"""An array of the authorized products associated with the `access_token`"""

provider_id: str
"""The ID of the provider associated with the `access_token`."""
"""The ID of the provider associated with the `access_token`"""

token_type: str
"""The RFC 8693 token type (Finch uses `bearer` tokens)"""

account_id: Optional[str] = None
"""
[DEPRECATED] Use `connection_id` to identify the connection instead of this
account ID
"""

company_id: Optional[str] = None
"""
[DEPRECATED] Use `connection_id` to identify the connection instead of this
company ID
"""

customer_id: Optional[str] = None
"""
The ID of your customer you provided to Finch when a connect session was created
for this connection.
for this connection
"""

token_type: Optional[str] = None
"""The RFC 8693 token type (Finch uses `bearer` tokens)"""
97 changes: 50 additions & 47 deletions src/finch/types/introspection.py
Original file line number Diff line number Diff line change
@@ -1,112 +1,115 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing import List, Union, Optional
from datetime import datetime
from typing_extensions import Literal

from .._models import BaseModel
from .shared.connection_status_type import ConnectionStatusType

__all__ = ["Introspection", "AuthenticationMethod", "AuthenticationMethodConnectionStatus", "ConnectionStatus"]
__all__ = ["Introspection", "ConnectionStatus", "AuthenticationMethod", "AuthenticationMethodConnectionStatus"]


class AuthenticationMethodConnectionStatus(BaseModel):
message: Optional[str] = None
class ConnectionStatus(BaseModel):
status: ConnectionStatusType

status: Optional[ConnectionStatusType] = None
last_successful_sync: Union[datetime, str, None] = None
"""The datetime when the connection was last successfully synced"""

message: Optional[str] = None

class AuthenticationMethod(BaseModel):
connection_status: Optional[AuthenticationMethodConnectionStatus] = None

products: Optional[List[str]] = None
"""An array of the authorized products associated with the `access_token`."""
class AuthenticationMethodConnectionStatus(BaseModel):
status: ConnectionStatusType

type: Optional[Literal["assisted", "credential", "api_token", "api_credential", "oauth"]] = None
"""The type of authentication method."""
last_successful_sync: Union[datetime, str, None] = None
"""The datetime when the connection was last successfully synced"""

message: Optional[str] = None

class ConnectionStatus(BaseModel):
last_successful_sync: Optional[datetime] = None
"""The datetime when the connection was last successfully synced."""

message: Optional[str] = None
class AuthenticationMethod(BaseModel):
type: Literal["assisted", "credential", "api_token", "api_credential", "oauth"]
"""The type of authentication method"""

connection_status: Optional[AuthenticationMethodConnectionStatus] = None

status: Optional[ConnectionStatusType] = None
products: Optional[List[str]] = None
"""An array of the authorized products associated with the `access_token`"""


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
instead of this account ID.
"""

authentication_methods: List[AuthenticationMethod]
"""The Finch UUID of the token being introspected"""

client_id: str
"""The client ID of the application associated with the `access_token`."""
"""The client ID of the application associated with the `access_token`"""

client_type: Literal["production", "development", "sandbox"]
client_type: Literal["development", "production", "sandbox"]
"""The type of application associated with a token."""

company_id: str
"""
[DEPRECATED] Use `connection_id` to associate tokens with a Finch connection
instead of this company ID.
"""

connection_id: str
"""The Finch UUID of the connection associated with the `access_token`."""
"""The Finch UUID of the connection associated with the `access_token`"""

connection_status: ConnectionStatus

connection_type: Literal["provider", "finch"]
connection_type: Literal["finch", "provider"]
"""The type of the connection associated with the token.

- `provider` - connection to an external provider
- `finch` - finch-generated data.
"""

products: List[str]
"""An array of the authorized products associated with the `access_token`."""

provider_id: str
"""The ID of the provider associated with the `access_token`."""

account_id: Optional[str] = None
"""
[DEPRECATED] Use `connection_id` to associate tokens with a Finch connection
instead of this account ID
"""

authentication_methods: Optional[List[AuthenticationMethod]] = None

company_id: Optional[str] = None
"""
[DEPRECATED] Use `connection_id` to associate tokens with a Finch connection
instead of this company ID
"""

customer_email: Optional[str] = None
"""
The email of your customer you provided to Finch when a connect session was
created for this connection.
created for this connection
"""

customer_id: Optional[str] = None
"""
The ID of your customer you provided to Finch when a connect session was created
for this connection.
for this connection
"""

customer_name: Optional[str] = None
"""
The name of your customer you provided to Finch when a connect session was
created for this connection.
created for this connection
"""

manual: bool
manual: Optional[bool] = None
"""
Whether the connection associated with the `access_token` uses the Assisted
Connect Flow. (`true` if using Assisted Connect, `false` if connection is
automated)
"""

payroll_provider_id: str
payroll_provider_id: Optional[str] = None
"""
[DEPRECATED] Use `provider_id` to identify the provider instead of this payroll
provider ID.
"""

products: List[str]
"""An array of the authorized products associated with the `access_token`."""

provider_id: str
"""The ID of the provider associated with the `access_token`."""

username: str
username: Optional[str] = None
"""The account username used for login associated with the `access_token`."""
Loading