diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cf1dd2b0..9928b027 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.42.1" + ".": "1.42.2" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 459fe737..ceb8bf2d 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-39e0191e43a9db93c8f35e91d10013f05352a2bedcf7ead6bac437957f6e922e.yml -openapi_spec_hash: 58c2cf578f0736b8c5df957f6a61190b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-f81c5824a9002c980fc0d66c4d52e6cbd8baf7678f5e0f2215909357cff6f82c.yml +openapi_spec_hash: 7714062cac3bb5597b8571172775bc92 config_hash: 0892e2e0eeb0343a022afa62e9080dd1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d9aa3ee..5561530a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 1.42.2 (2025-12-17) + +Full Changelog: [v1.42.1...v1.42.2](https://github.com/Finch-API/finch-api-python/compare/v1.42.1...v1.42.2) + +### Bug Fixes + +* use async_to_httpx_files in patch method ([4a91924](https://github.com/Finch-API/finch-api-python/commit/4a91924e1a39f14de1f91f01e3d1c4c86d30e9d0)) + + +### Chores + +* add missing docstrings ([0e4c89b](https://github.com/Finch-API/finch-api-python/commit/0e4c89bc8bb32e44f0bdfbf3c3d349c5d33c033d)) +* **internal:** add missing files argument to base client ([ff3e0f5](https://github.com/Finch-API/finch-api-python/commit/ff3e0f57959407b4cd0ee2263db1d945acfb6178)) + ## 1.42.1 (2025-12-08) Full Changelog: [v1.42.0...v1.42.1](https://github.com/Finch-API/finch-api-python/compare/v1.42.0...v1.42.1) diff --git a/pyproject.toml b/pyproject.toml index cba00405..24d589b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "finch-api" -version = "1.42.1" +version = "1.42.2" description = "The official Python library for the Finch API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/finch/_base_client.py b/src/finch/_base_client.py index 072c469b..8c0bacc7 100644 --- a/src/finch/_base_client.py +++ b/src/finch/_base_client.py @@ -1262,9 +1262,12 @@ def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options) + opts = FinalRequestOptions.construct( + method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + ) return self.request(cast_to, opts) def put( @@ -1796,9 +1799,12 @@ async def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options) + opts = FinalRequestOptions.construct( + method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options + ) return await self.request(cast_to, opts) async def put( diff --git a/src/finch/_version.py b/src/finch/_version.py index b5fafd31..e201567e 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.42.1" # x-release-please-version +__version__ = "1.42.2" # x-release-please-version diff --git a/src/finch/types/account_update_event.py b/src/finch/types/account_update_event.py index 792283ec..9fb84d60 100644 --- a/src/finch/types/account_update_event.py +++ b/src/finch/types/account_update_event.py @@ -393,6 +393,8 @@ class AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayment(BaseModel class AccountUpdateEventDataAuthenticationMethodSupportedFields(BaseModel): + """The supported data fields returned by our HR and payroll endpoints""" + company: Optional[AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompany] = None directory: Optional[AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectory] = None diff --git a/src/finch/types/connect/session_new_params.py b/src/finch/types/connect/session_new_params.py index b78da76a..6822851b 100644 --- a/src/finch/types/connect/session_new_params.py +++ b/src/finch/types/connect/session_new_params.py @@ -56,6 +56,8 @@ class SessionNewParams(TypedDict, total=False): class Integration(TypedDict, total=False): + """Integration configuration for the connect session""" + provider: Required[str] """The provider to integrate with""" diff --git a/src/finch/types/hris/benefit_create_params.py b/src/finch/types/hris/benefit_create_params.py index e4a39b39..18b907bb 100644 --- a/src/finch/types/hris/benefit_create_params.py +++ b/src/finch/types/hris/benefit_create_params.py @@ -40,6 +40,8 @@ class CompanyContributionTier(TypedDict, total=False): class CompanyContribution(TypedDict, total=False): + """The company match for this benefit.""" + tiers: Required[Iterable[CompanyContributionTier]] type: Required[Literal["match"]] diff --git a/src/finch/types/hris/benefits_support.py b/src/finch/types/hris/benefits_support.py index 9b443bc8..a10037a5 100644 --- a/src/finch/types/hris/benefits_support.py +++ b/src/finch/types/hris/benefits_support.py @@ -11,6 +11,11 @@ class BenefitsSupport(BaseModel): + """Each benefit type and their supported features. + + If the benefit type is not supported, the property will be null + """ + commuter: Optional[BenefitFeaturesAndOperations] = None custom_post_tax: Optional[BenefitFeaturesAndOperations] = None diff --git a/src/finch/types/hris/company/company.py b/src/finch/types/hris/company/company.py index 5fefe32f..c96bcb15 100644 --- a/src/finch/types/hris/company/company.py +++ b/src/finch/types/hris/company/company.py @@ -30,6 +30,8 @@ class Account(BaseModel): class DepartmentParent(BaseModel): + """The parent department, if present.""" + name: Optional[str] = None """The parent department's name.""" @@ -43,6 +45,8 @@ class Department(BaseModel): class Entity(BaseModel): + """The entity type object.""" + subtype: Optional[Literal["s_corporation", "c_corporation", "b_corporation"]] = None """The tax payer subtype of the company.""" diff --git a/src/finch/types/hris/company/pay_statement_item/rule_create_params.py b/src/finch/types/hris/company/pay_statement_item/rule_create_params.py index 3b380745..48dc32e1 100644 --- a/src/finch/types/hris/company/pay_statement_item/rule_create_params.py +++ b/src/finch/types/hris/company/pay_statement_item/rule_create_params.py @@ -30,6 +30,8 @@ class RuleCreateParams(TypedDict, total=False): class Attributes(TypedDict, total=False): + """Specifies the fields to be applied when the condition is met.""" + metadata: Dict[str, object] """The metadata to be attached in the entity. diff --git a/src/finch/types/hris/company/pay_statement_item/rule_create_response.py b/src/finch/types/hris/company/pay_statement_item/rule_create_response.py index 65d440f1..ee0fa167 100644 --- a/src/finch/types/hris/company/pay_statement_item/rule_create_response.py +++ b/src/finch/types/hris/company/pay_statement_item/rule_create_response.py @@ -10,6 +10,8 @@ class Attributes(BaseModel): + """Specifies the fields to be applied when the condition is met.""" + metadata: Optional[Dict[str, object]] = None """The metadata to be attached in the entity. diff --git a/src/finch/types/hris/company/pay_statement_item/rule_delete_response.py b/src/finch/types/hris/company/pay_statement_item/rule_delete_response.py index 31e439bd..1850ef22 100644 --- a/src/finch/types/hris/company/pay_statement_item/rule_delete_response.py +++ b/src/finch/types/hris/company/pay_statement_item/rule_delete_response.py @@ -10,6 +10,8 @@ class Attributes(BaseModel): + """Specifies the fields to be applied when the condition is met.""" + metadata: Optional[Dict[str, object]] = None """The metadata to be attached in the entity. diff --git a/src/finch/types/hris/company/pay_statement_item/rule_list_response.py b/src/finch/types/hris/company/pay_statement_item/rule_list_response.py index 1ee27b67..bcf9d9c0 100644 --- a/src/finch/types/hris/company/pay_statement_item/rule_list_response.py +++ b/src/finch/types/hris/company/pay_statement_item/rule_list_response.py @@ -10,6 +10,8 @@ class Attributes(BaseModel): + """Specifies the fields to be applied when the condition is met.""" + metadata: Optional[Dict[str, object]] = None """The metadata to be attached in the entity. diff --git a/src/finch/types/hris/company/pay_statement_item/rule_update_response.py b/src/finch/types/hris/company/pay_statement_item/rule_update_response.py index 39253e9e..2f3b7431 100644 --- a/src/finch/types/hris/company/pay_statement_item/rule_update_response.py +++ b/src/finch/types/hris/company/pay_statement_item/rule_update_response.py @@ -10,6 +10,8 @@ class Attributes(BaseModel): + """Specifies the fields to be applied when the condition is met.""" + metadata: Optional[Dict[str, object]] = None """The metadata to be attached in the entity. diff --git a/src/finch/types/hris/company/pay_statement_item_list_response.py b/src/finch/types/hris/company/pay_statement_item_list_response.py index e2ca25b0..9d9f7fdb 100644 --- a/src/finch/types/hris/company/pay_statement_item_list_response.py +++ b/src/finch/types/hris/company/pay_statement_item_list_response.py @@ -9,6 +9,8 @@ class Attributes(BaseModel): + """The attributes of the pay statement item.""" + metadata: Optional[Dict[str, Optional[object]]] = None """The metadata of the pay statement item derived by the rules engine if available. diff --git a/src/finch/types/hris/company_benefit.py b/src/finch/types/hris/company_benefit.py index eda65280..c77e115b 100644 --- a/src/finch/types/hris/company_benefit.py +++ b/src/finch/types/hris/company_benefit.py @@ -17,6 +17,8 @@ class CompanyContributionTier(BaseModel): class CompanyContribution(BaseModel): + """The company match for this benefit.""" + tiers: List[CompanyContributionTier] type: Literal["match"] diff --git a/src/finch/types/hris/employment_data.py b/src/finch/types/hris/employment_data.py index 0804a2a0..8c361e56 100644 --- a/src/finch/types/hris/employment_data.py +++ b/src/finch/types/hris/employment_data.py @@ -19,11 +19,15 @@ class UnionMember0Department(BaseModel): + """The department object.""" + name: Optional[str] = None """The name of the department associated with the individual.""" class UnionMember0Employment(BaseModel): + """The employment object.""" + subtype: Optional[Literal["full_time", "intern", "part_time", "temp", "seasonal", "individual_contractor"]] = None """The secondary employment type of the individual. @@ -36,6 +40,8 @@ class UnionMember0Employment(BaseModel): class UnionMember0Manager(BaseModel): + """The manager object representing the manager of the individual within the org.""" + id: str """A stable Finch `id` (UUID v4) for an individual in the company.""" diff --git a/src/finch/types/hris/individual_in_directory.py b/src/finch/types/hris/individual_in_directory.py index 820bc540..d154dc14 100644 --- a/src/finch/types/hris/individual_in_directory.py +++ b/src/finch/types/hris/individual_in_directory.py @@ -8,11 +8,15 @@ class Department(BaseModel): + """The department object.""" + name: Optional[str] = None """The name of the department.""" class Manager(BaseModel): + """The manager object.""" + id: str """A stable Finch `id` (UUID v4) for an individual in the company.""" diff --git a/src/finch/types/hris/payment.py b/src/finch/types/hris/payment.py index 992006f1..6594a794 100644 --- a/src/finch/types/hris/payment.py +++ b/src/finch/types/hris/payment.py @@ -10,6 +10,8 @@ class PayPeriod(BaseModel): + """The pay period object.""" + end_date: Optional[str] = None start_date: Optional[str] = None diff --git a/src/finch/types/hris/w42005.py b/src/finch/types/hris/w42005.py index 73b7d277..4cb59566 100644 --- a/src/finch/types/hris/w42005.py +++ b/src/finch/types/hris/w42005.py @@ -9,6 +9,8 @@ class Data(BaseModel): + """Detailed information specific to the 2005 W4 form.""" + additional_withholding: int """Additional withholding amount (in cents).""" @@ -26,6 +28,10 @@ class Data(BaseModel): class W42005(BaseModel): + """ + A 2005 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details. + """ + data: Data """Detailed information specific to the 2005 W4 form.""" diff --git a/src/finch/types/hris/w42020.py b/src/finch/types/hris/w42020.py index 20749283..58204dec 100644 --- a/src/finch/types/hris/w42020.py +++ b/src/finch/types/hris/w42020.py @@ -9,6 +9,8 @@ class Data(BaseModel): + """Detailed information specific to the 2020 W4 form.""" + amount_for_other_dependents: int """ Amount claimed for dependents other than qualifying children under 17 (in @@ -44,6 +46,10 @@ class Data(BaseModel): class W42020(BaseModel): + """ + A 2020 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details. + """ + data: Data """Detailed information specific to the 2020 W4 form.""" diff --git a/src/finch/types/income.py b/src/finch/types/income.py index 2b1f36b2..1f6471ed 100644 --- a/src/finch/types/income.py +++ b/src/finch/types/income.py @@ -10,6 +10,11 @@ class Income(BaseModel): + """The employee's income as reported by the provider. + + This may not always be annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, depending on what information the provider returns. + """ + amount: Optional[int] = None """The income amount in cents.""" diff --git a/src/finch/types/income_param.py b/src/finch/types/income_param.py index ed0bb0c2..dab09ba7 100644 --- a/src/finch/types/income_param.py +++ b/src/finch/types/income_param.py @@ -12,6 +12,11 @@ class IncomeParam(TypedDict, total=False): + """The employee's income as reported by the provider. + + This may not always be annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, depending on what information the provider returns. + """ + amount: Required[Optional[int]] """The income amount in cents.""" diff --git a/src/finch/types/jobs/automated_async_job.py b/src/finch/types/jobs/automated_async_job.py index 40e49598..d7274d85 100644 --- a/src/finch/types/jobs/automated_async_job.py +++ b/src/finch/types/jobs/automated_async_job.py @@ -10,6 +10,8 @@ class Params(BaseModel): + """The input parameters for the job.""" + individual_id: Optional[str] = None """The ID of the individual that the job was completed for.""" diff --git a/src/finch/types/jobs/automated_list_response.py b/src/finch/types/jobs/automated_list_response.py index d934dea6..a9aad4b5 100644 --- a/src/finch/types/jobs/automated_list_response.py +++ b/src/finch/types/jobs/automated_list_response.py @@ -15,6 +15,11 @@ class MetaQuotasDataSyncAll(BaseModel): class MetaQuotas(BaseModel): + """Information about remaining quotas for this connection. + + Only applicable for customers opted in to use Finch's Data Sync Refresh endpoint (`POST /jobs/automated`). Please contact a Finch representative for more details. + """ + data_sync_all: Optional[MetaQuotasDataSyncAll] = None diff --git a/src/finch/types/request_forwarding_forward_response.py b/src/finch/types/request_forwarding_forward_response.py index 14871f26..c99a1b8b 100644 --- a/src/finch/types/request_forwarding_forward_response.py +++ b/src/finch/types/request_forwarding_forward_response.py @@ -10,6 +10,10 @@ class Request(BaseModel): + """ + An object containing details of your original forwarded request, for your ease of reference. + """ + method: str """The HTTP method that was specified for the forwarded request. diff --git a/src/finch/types/sandbox/company_update_params.py b/src/finch/types/sandbox/company_update_params.py index 1337ed21..88584b6f 100644 --- a/src/finch/types/sandbox/company_update_params.py +++ b/src/finch/types/sandbox/company_update_params.py @@ -59,6 +59,8 @@ class Account(TypedDict, total=False): class DepartmentParent(TypedDict, total=False): + """The parent department, if present.""" + name: Optional[str] """The parent department's name.""" @@ -72,6 +74,8 @@ class Department(TypedDict, total=False): class Entity(TypedDict, total=False): + """The entity type object.""" + subtype: Optional[Literal["s_corporation", "c_corporation", "b_corporation"]] """The tax payer subtype of the company.""" diff --git a/src/finch/types/sandbox/company_update_response.py b/src/finch/types/sandbox/company_update_response.py index b45e36e5..0424dd54 100644 --- a/src/finch/types/sandbox/company_update_response.py +++ b/src/finch/types/sandbox/company_update_response.py @@ -30,6 +30,8 @@ class Account(BaseModel): class DepartmentParent(BaseModel): + """The parent department, if present.""" + name: Optional[str] = None """The parent department's name.""" @@ -43,6 +45,8 @@ class Department(BaseModel): class Entity(BaseModel): + """The entity type object.""" + subtype: Optional[Literal["s_corporation", "c_corporation", "b_corporation"]] = None """The tax payer subtype of the company.""" diff --git a/src/finch/types/sandbox/directory_create_params.py b/src/finch/types/sandbox/directory_create_params.py index 739e762d..ec48b01f 100644 --- a/src/finch/types/sandbox/directory_create_params.py +++ b/src/finch/types/sandbox/directory_create_params.py @@ -36,6 +36,8 @@ class BodyCustomField(TypedDict, total=False): class BodyDepartment(TypedDict, total=False): + """The department object.""" + name: Optional[str] """The name of the department associated with the individual.""" @@ -47,6 +49,8 @@ class BodyEmail(TypedDict, total=False): class BodyEmployment(TypedDict, total=False): + """The employment object.""" + subtype: Optional[Literal["full_time", "intern", "part_time", "temp", "seasonal", "individual_contractor"]] """The secondary employment type of the individual. @@ -59,6 +63,8 @@ class BodyEmployment(TypedDict, total=False): class BodyManager(TypedDict, total=False): + """The manager object representing the manager of the individual within the org.""" + id: str """A stable Finch `id` (UUID v4) for an individual in the company.""" diff --git a/src/finch/types/sandbox/employment_update_params.py b/src/finch/types/sandbox/employment_update_params.py index 5b32e6b3..65ddf277 100644 --- a/src/finch/types/sandbox/employment_update_params.py +++ b/src/finch/types/sandbox/employment_update_params.py @@ -84,11 +84,15 @@ class CustomField(TypedDict, total=False): class Department(TypedDict, total=False): + """The department object.""" + name: Optional[str] """The name of the department associated with the individual.""" class Employment(TypedDict, total=False): + """The employment object.""" + subtype: Optional[Literal["full_time", "intern", "part_time", "temp", "seasonal", "individual_contractor"]] """The secondary employment type of the individual. @@ -101,5 +105,7 @@ class Employment(TypedDict, total=False): class Manager(TypedDict, total=False): + """The manager object representing the manager of the individual within the org.""" + id: str """A stable Finch `id` (UUID v4) for an individual in the company.""" diff --git a/src/finch/types/sandbox/employment_update_response.py b/src/finch/types/sandbox/employment_update_response.py index 4128f99d..198651f7 100644 --- a/src/finch/types/sandbox/employment_update_response.py +++ b/src/finch/types/sandbox/employment_update_response.py @@ -17,11 +17,15 @@ class CustomField(BaseModel): class Department(BaseModel): + """The department object.""" + name: Optional[str] = None """The name of the department associated with the individual.""" class Employment(BaseModel): + """The employment object.""" + subtype: Optional[Literal["full_time", "intern", "part_time", "temp", "seasonal", "individual_contractor"]] = None """The secondary employment type of the individual. @@ -34,6 +38,8 @@ class Employment(BaseModel): class Manager(BaseModel): + """The manager object representing the manager of the individual within the org.""" + id: Optional[str] = None """A stable Finch `id` (UUID v4) for an individual in the company."""