From 5f4de746b8e82dcc5e84f7c54cfef7772e0f8c1e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 17:23:48 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 ++-- hrisdirectory.go | 4 ++-- hrisdirectory_test.go | 4 ++-- hrisemployment.go | 6 ++---- hrisindividual.go | 19 ++++++++++--------- hrisindividual_test.go | 6 +++--- hrispaystatement.go | 4 ++-- hrispaystatement_test.go | 4 ++-- 8 files changed, 25 insertions(+), 26 deletions(-) diff --git a/.stats.yml b/.stats.yml index 861514c..6d130ac 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 48 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-3cd1346947fabfca2aa9c6f821170c8d945a82667fb20a15644d5c77f8e98c10.yml -openapi_spec_hash: 642e04e90d37c0e4875d154abd06eb54 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-a6b05e51c46366a54466c2009f5fdde74e0fa40bbcc6568601a4e3342dd16937.yml +openapi_spec_hash: 084797c220144df17d98eb984dd4cba2 config_hash: 9ae56f40cec7304896138bfad5caf748 diff --git a/hrisdirectory.go b/hrisdirectory.go index 9ebdf7d..8d8f7ec 100644 --- a/hrisdirectory.go +++ b/hrisdirectory.go @@ -286,7 +286,7 @@ func (r individualInDirectoryManagerJSON) RawJSON() string { type HRISDirectoryListParams struct { // The entity IDs to specify which entities' data to access. EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"` - // Number of employees to return (defaults to all) + // Number of employees to return (defaults to 100, maximum 10000) Limit param.Field[int64] `query:"limit"` // Index to start from (defaults to 0) Offset param.Field[int64] `query:"offset"` @@ -304,7 +304,7 @@ func (r HRISDirectoryListParams) URLQuery() (v url.Values) { type HRISDirectoryListIndividualsParams struct { // The entity IDs to specify which entities' data to access. EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"` - // Number of employees to return (defaults to all) + // Number of employees to return (defaults to 100, maximum 10000) Limit param.Field[int64] `query:"limit"` // Index to start from (defaults to 0) Offset param.Field[int64] `query:"offset"` diff --git a/hrisdirectory_test.go b/hrisdirectory_test.go index bf659de..20e2952 100644 --- a/hrisdirectory_test.go +++ b/hrisdirectory_test.go @@ -29,7 +29,7 @@ func TestHRISDirectoryListWithOptionalParams(t *testing.T) { ) _, err := client.HRIS.Directory.List(context.TODO(), finchgo.HRISDirectoryListParams{ EntityIDs: finchgo.F([]string{"550e8400-e29b-41d4-a716-446655440000"}), - Limit: finchgo.F(int64(0)), + Limit: finchgo.F(int64(10000)), Offset: finchgo.F(int64(0)), }) if err != nil { @@ -57,7 +57,7 @@ func TestHRISDirectoryListIndividualsWithOptionalParams(t *testing.T) { ) _, err := client.HRIS.Directory.ListIndividuals(context.TODO(), finchgo.HRISDirectoryListIndividualsParams{ EntityIDs: finchgo.F([]string{"550e8400-e29b-41d4-a716-446655440000"}), - Limit: finchgo.F(int64(0)), + Limit: finchgo.F(int64(10000)), Offset: finchgo.F(int64(0)), }) if err != nil { diff --git a/hrisemployment.go b/hrisemployment.go index 9f96994..32ec473 100644 --- a/hrisemployment.go +++ b/hrisemployment.go @@ -585,7 +585,7 @@ func (r employmentDataResponseJSON) RawJSON() string { } type HRISEmploymentGetManyParams struct { - // The array of batch requests. + // The array of batch requests. Maximum 10000 items per request. Requests param.Field[[]HRISEmploymentGetManyParamsRequest] `json:"requests" api:"required"` // The entity IDs to specify which entities' data to access. EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"` @@ -605,9 +605,7 @@ func (r HRISEmploymentGetManyParams) URLQuery() (v url.Values) { } type HRISEmploymentGetManyParamsRequest struct { - // A stable Finch `id` (UUID v4) for an individual in the company. There is no - // limit to the number of `individual_id` to send per request. It is preferantial - // to send all ids in a single request for Finch to optimize provider rate-limits. + // A stable Finch `id` (UUID v4) for an individual in the company. IndividualID param.Field[string] `json:"individual_id" api:"required"` } diff --git a/hrisindividual.go b/hrisindividual.go index dde8e87..7eb6ca8 100644 --- a/hrisindividual.go +++ b/hrisindividual.go @@ -438,10 +438,11 @@ func (r individualResponseJSON) RawJSON() string { } type HRISIndividualGetManyParams struct { + // The array of batch requests. Maximum 10000 items per request. + Requests param.Field[[]HRISIndividualGetManyParamsRequest] `json:"requests" api:"required"` // The entity IDs to specify which entities' data to access. - EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"` - Options param.Field[HRISIndividualGetManyParamsOptions] `json:"options"` - Requests param.Field[[]HRISIndividualGetManyParamsRequest] `json:"requests"` + EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"` + Options param.Field[HRISIndividualGetManyParamsOptions] `json:"options"` } func (r HRISIndividualGetManyParams) MarshalJSON() (data []byte, err error) { @@ -457,18 +458,18 @@ func (r HRISIndividualGetManyParams) URLQuery() (v url.Values) { }) } -type HRISIndividualGetManyParamsOptions struct { - Include param.Field[[]string] `json:"include"` +type HRISIndividualGetManyParamsRequest struct { + IndividualID param.Field[string] `json:"individual_id" api:"required"` } -func (r HRISIndividualGetManyParamsOptions) MarshalJSON() (data []byte, err error) { +func (r HRISIndividualGetManyParamsRequest) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -type HRISIndividualGetManyParamsRequest struct { - IndividualID param.Field[string] `json:"individual_id"` +type HRISIndividualGetManyParamsOptions struct { + Include param.Field[[]string] `json:"include"` } -func (r HRISIndividualGetManyParamsRequest) MarshalJSON() (data []byte, err error) { +func (r HRISIndividualGetManyParamsOptions) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } diff --git a/hrisindividual_test.go b/hrisindividual_test.go index 6185afe..92e577b 100644 --- a/hrisindividual_test.go +++ b/hrisindividual_test.go @@ -28,13 +28,13 @@ func TestHRISIndividualGetManyWithOptionalParams(t *testing.T) { option.WithClientSecret("My Client Secret"), ) _, err := client.HRIS.Individuals.GetMany(context.TODO(), finchgo.HRISIndividualGetManyParams{ + Requests: finchgo.F([]finchgo.HRISIndividualGetManyParamsRequest{{ + IndividualID: finchgo.F("individual_id"), + }}), EntityIDs: finchgo.F([]string{"550e8400-e29b-41d4-a716-446655440000"}), Options: finchgo.F(finchgo.HRISIndividualGetManyParamsOptions{ Include: finchgo.F([]string{"string"}), }), - Requests: finchgo.F([]finchgo.HRISIndividualGetManyParamsRequest{{ - IndividualID: finchgo.F("individual_id"), - }}), }) if err != nil { var apierr *finchgo.Error diff --git a/hrispaystatement.go b/hrispaystatement.go index 151c5e1..317e78f 100644 --- a/hrispaystatement.go +++ b/hrispaystatement.go @@ -691,7 +691,7 @@ func (r payStatementResponseBodyBatchErrorJSON) RawJSON() string { func (r PayStatementResponseBodyBatchError) implementsPayStatementResponseBody() {} type HRISPayStatementGetManyParams struct { - // The array of batch requests. + // The array of batch requests. Maximum 10 payment_ids per request. Requests param.Field[[]HRISPayStatementGetManyParamsRequest] `json:"requests" api:"required"` // The entity IDs to specify which entities' data to access. EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"` @@ -713,7 +713,7 @@ func (r HRISPayStatementGetManyParams) URLQuery() (v url.Values) { type HRISPayStatementGetManyParamsRequest struct { // A stable Finch `id` (UUID v4) for a payment. PaymentID param.Field[string] `json:"payment_id" api:"required" format:"uuid"` - // Number of pay statements to return (defaults to all). + // Number of pay statements to return (defaults to 100, maximum 5000). Limit param.Field[int64] `json:"limit"` // Index to start from. Offset param.Field[int64] `json:"offset"` diff --git a/hrispaystatement_test.go b/hrispaystatement_test.go index 48b3747..a7c0d81 100644 --- a/hrispaystatement_test.go +++ b/hrispaystatement_test.go @@ -29,8 +29,8 @@ func TestHRISPayStatementGetManyWithOptionalParams(t *testing.T) { ) _, err := client.HRIS.PayStatements.GetMany(context.TODO(), finchgo.HRISPayStatementGetManyParams{ Requests: finchgo.F([]finchgo.HRISPayStatementGetManyParamsRequest{{ - PaymentID: finchgo.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), - Limit: finchgo.F(int64(50)), + PaymentID: finchgo.F("fc8b024e-d373-4c9c-80fc-f1625383d142"), + Limit: finchgo.F(int64(100)), Offset: finchgo.F(int64(0)), }}), EntityIDs: finchgo.F([]string{"550e8400-e29b-41d4-a716-446655440000"}), From 5d57a66cb7c247d714e61fdae54eeac1ad694d7a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 17:24:10 +0000 Subject: [PATCH 2/2] release: 2.2.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ README.md | 2 +- internal/version.go | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 656a2ef..bfc26f9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.1.0" + ".": "2.2.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index bfb84ce..009da38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.2.0 (2026-07-13) + +Full Changelog: [v2.1.0...v2.2.0](https://github.com/Finch-API/finch-api-go/compare/v2.1.0...v2.2.0) + +### Features + +* **api:** api update ([5f4de74](https://github.com/Finch-API/finch-api-go/commit/5f4de746b8e82dcc5e84f7c54cfef7772e0f8c1e)) + ## 2.1.0 (2026-07-01) Full Changelog: [v2.0.0...v2.1.0](https://github.com/Finch-API/finch-api-go/compare/v2.0.0...v2.1.0) diff --git a/README.md b/README.md index 9f7c81b..de39cb6 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Or to pin the version: ```sh -go get -u 'github.com/Finch-API/finch-api-go@v2.1.0' +go get -u 'github.com/Finch-API/finch-api-go@v2.2.0' ``` diff --git a/internal/version.go b/internal/version.go index 436f832..0759deb 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "2.1.0" // x-release-please-version +const PackageVersion = "2.2.0" // x-release-please-version