Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 0.19.0 #169

Merged
merged 8 commits into from
May 15, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5

- run: |
go build ./...
- name: Run lints
run: ./scripts/lint
test:
name: test
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.18.5"
".": "0.19.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 34
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch-a14d8915465614a275f05ccb91513576fab0525b488cb878dbe3d692f5b2349f.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch-55ff507660a4f8b4a1809ca01861098c7bc72e8e6ea038fb3aa8c0a3b9a954e2.yml
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## 0.19.0 (2024-05-15)

Full Changelog: [v0.18.5...v0.19.0](https://github.com/Finch-API/finch-api-go/compare/v0.18.5...v0.19.0)

### Features

* propagate resource description field from stainless config to SDK docs ([#168](https://github.com/Finch-API/finch-api-go/issues/168)) ([bd5200b](https://github.com/Finch-API/finch-api-go/commit/bd5200bb3d54853ca97a6cf587cf6be839e08b61))


### Bug Fixes

* **api:** correct authentication methods type ([#173](https://github.com/Finch-API/finch-api-go/issues/173)) ([a21cfba](https://github.com/Finch-API/finch-api-go/commit/a21cfba96a4a9b78c72fbbbe38a7dc09dd3e65e6))
* fix reading the error body more than once ([#176](https://github.com/Finch-API/finch-api-go/issues/176)) ([e144ce8](https://github.com/Finch-API/finch-api-go/commit/e144ce809239cfdc4b219f2c56d3d0d0f12e7f20))


### Chores

* **docs:** add SECURITY.md ([#170](https://github.com/Finch-API/finch-api-go/issues/170)) ([8fe5bcb](https://github.com/Finch-API/finch-api-go/commit/8fe5bcbaa36df84be10e693a65aa7a79ed075c86))
* **internal:** add slightly better logging to scripts ([#175](https://github.com/Finch-API/finch-api-go/issues/175)) ([62478b8](https://github.com/Finch-API/finch-api-go/commit/62478b849ccb1b7a506c1582876f8dc67d7e06ef))
* **internal:** minor updates ([#172](https://github.com/Finch-API/finch-api-go/issues/172)) ([8e015d7](https://github.com/Finch-API/finch-api-go/commit/8e015d72b9416a3da962834427a2ed6e87ce7a82))
* **tests:** update client ID example value ([#174](https://github.com/Finch-API/finch-api-go/issues/174)) ([5c7b044](https://github.com/Finch-API/finch-api-go/commit/5c7b04462b916362bfb8189afaf421e7ed1d6d9c))

## 0.18.5 (2024-05-01)

Full Changelog: [v0.18.4...v0.18.5](https://github.com/Finch-API/finch-api-go/compare/v0.18.4...v0.18.5)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/Finch-API/finch-api-go@v0.18.5'
go get -u 'github.com/Finch-API/finch-api-go@v0.19.0'
```

<!-- x-release-please-end -->
Expand Down
27 changes: 27 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Security Policy

## Reporting Security Issues

This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.

To report a security issue, please contact the Stainless team at [email protected].

## Responsible Disclosure

We appreciate the efforts of security researchers and individuals who help us maintain the security of
SDKs we generate. If you believe you have found a security vulnerability, please adhere to responsible
disclosure practices by allowing us a reasonable amount of time to investigate and address the issue
before making any information public.

## Reporting Non-SDK Related Security Issues

If you encounter security issues that are not directly related to SDKs but pertain to the services
or products provided by Finch please follow the respective company's security reporting guidelines.

### Finch Terms and Policies

Please contact [email protected] for any questions or concerns regarding security of our services.

---

Thank you for helping us keep the SDKs and systems they interact with secure.
10 changes: 6 additions & 4 deletions accesstoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ import (
)

// AccessTokenService contains methods and other services that help with
// interacting with the Finch API. Note, unlike clients, this service does not read
// variables from the environment automatically. You should not instantiate this
// service directly, and instead use the [NewAccessTokenService] method instead.
// interacting with the Finch API.
//
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewAccessTokenService] method instead.
type AccessTokenService struct {
Options []option.RequestOption
}
Expand Down Expand Up @@ -154,7 +156,7 @@ func (r CreateAccessTokenResponseConnectionType) IsKnown() bool {

type AccessTokenNewParams struct {
Code param.Field[string] `json:"code,required"`
ClientID param.Field[string] `json:"client_id"`
ClientID param.Field[string] `json:"client_id" format:"uuid"`
ClientSecret param.Field[string] `json:"client_secret"`
RedirectUri param.Field[string] `json:"redirect_uri"`
}
Expand Down
4 changes: 2 additions & 2 deletions accesstoken_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ func TestAccessTokenNewWithOptionalParams(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("My Client ID"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.AccessTokens.New(context.TODO(), finchgo.AccessTokenNewParams{
Code: finchgo.F("<your_authorization_code>"),
ClientID: finchgo.F("<your_client_id>"),
ClientID: finchgo.F("12345678-1234-1234-1234-123456789ABC"),
ClientSecret: finchgo.F("<your_client_secret>"),
RedirectUri: finchgo.F("https://example.com"),
})
Expand Down
26 changes: 14 additions & 12 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ import (
)

// AccountService contains methods and other services that help with interacting
// with the Finch API. Note, unlike clients, this service does not read variables
// from the environment automatically. You should not instantiate this service
// directly, and instead use the [NewAccountService] method instead.
// with the Finch API.
//
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewAccountService] method instead.
type AccountService struct {
Options []option.RequestOption
}
Expand Down Expand Up @@ -69,8 +71,8 @@ func (r disconnectResponseJSON) RawJSON() string {

type Introspection struct {
// The Finch uuid of the account used to connect this company.
AccountID string `json:"account_id,required"`
AuthenticationMethods IntrospectionAuthenticationMethods `json:"authentication_methods,required"`
AccountID string `json:"account_id,required"`
AuthenticationMethods []IntrospectionAuthenticationMethod `json:"authentication_methods,required"`
// The client id of the application associated with the `access_token`.
ClientID string `json:"client_id,required"`
// The type of application associated with a token.
Expand Down Expand Up @@ -119,26 +121,26 @@ func (r introspectionJSON) RawJSON() string {
return r.raw
}

type IntrospectionAuthenticationMethods struct {
type IntrospectionAuthenticationMethod struct {
ConnectionStatus IntrospectionAuthenticationMethodsConnectionStatus `json:"connection_status"`
Type string `json:"type"`
JSON introspectionAuthenticationMethodsJSON `json:"-"`
JSON introspectionAuthenticationMethodJSON `json:"-"`
}

// introspectionAuthenticationMethodsJSON contains the JSON metadata for the struct
// [IntrospectionAuthenticationMethods]
type introspectionAuthenticationMethodsJSON struct {
// introspectionAuthenticationMethodJSON contains the JSON metadata for the struct
// [IntrospectionAuthenticationMethod]
type introspectionAuthenticationMethodJSON struct {
ConnectionStatus apijson.Field
Type apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

func (r *IntrospectionAuthenticationMethods) UnmarshalJSON(data []byte) (err error) {
func (r *IntrospectionAuthenticationMethod) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

func (r introspectionAuthenticationMethodsJSON) RawJSON() string {
func (r introspectionAuthenticationMethodJSON) RawJSON() string {
return r.raw
}

Expand Down
4 changes: 2 additions & 2 deletions account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestAccountDisconnect(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("My Client ID"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.Account.Disconnect(context.TODO())
Expand All @@ -48,7 +48,7 @@ func TestAccountIntrospect(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("My Client ID"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.Account.Introspect(context.TODO())
Expand Down
8 changes: 5 additions & 3 deletions hris.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import (
)

// HRISService contains methods and other services that help with interacting with
// the Finch API. Note, unlike clients, this service does not read variables from
// the environment automatically. You should not instantiate this service directly,
// and instead use the [NewHRISService] method instead.
// the Finch API.
//
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewHRISService] method instead.
type HRISService struct {
Options []option.RequestOption
Company *HRISCompanyService
Expand Down
8 changes: 5 additions & 3 deletions hrisbenefit.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ import (
)

// HRISBenefitService contains methods and other services that help with
// interacting with the Finch API. Note, unlike clients, this service does not read
// variables from the environment automatically. You should not instantiate this
// service directly, and instead use the [NewHRISBenefitService] method instead.
// interacting with the Finch API.
//
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewHRISBenefitService] method instead.
type HRISBenefitService struct {
Options []option.RequestOption
Individuals *HRISBenefitIndividualService
Expand Down
10 changes: 5 additions & 5 deletions hrisbenefit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestHRISBenefitNewWithOptionalParams(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("My Client ID"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.HRIS.Benefits.New(context.TODO(), finchgo.HRISBenefitNewParams{
Expand Down Expand Up @@ -52,7 +52,7 @@ func TestHRISBenefitGet(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("My Client ID"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.HRIS.Benefits.Get(context.TODO(), "string")
Expand All @@ -76,7 +76,7 @@ func TestHRISBenefitUpdateWithOptionalParams(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("My Client ID"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.HRIS.Benefits.Update(
Expand Down Expand Up @@ -106,7 +106,7 @@ func TestHRISBenefitList(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("My Client ID"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.HRIS.Benefits.List(context.TODO())
Expand All @@ -130,7 +130,7 @@ func TestHRISBenefitListSupportedBenefits(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("My Client ID"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.HRIS.Benefits.ListSupportedBenefits(context.TODO())
Expand Down
9 changes: 5 additions & 4 deletions hrisbenefitindividual.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ import (
)

// HRISBenefitIndividualService contains methods and other services that help with
// interacting with the Finch API. Note, unlike clients, this service does not read
// variables from the environment automatically. You should not instantiate this
// service directly, and instead use the [NewHRISBenefitIndividualService] method
// instead.
// interacting with the Finch API.
//
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewHRISBenefitIndividualService] method instead.
type HRISBenefitIndividualService struct {
Options []option.RequestOption
}
Expand Down
6 changes: 3 additions & 3 deletions hrisbenefitindividual_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestHRISBenefitIndividualEnrolledIDs(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("My Client ID"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.HRIS.Benefits.Individuals.EnrolledIDs(context.TODO(), "string")
Expand All @@ -48,7 +48,7 @@ func TestHRISBenefitIndividualGetManyBenefitsWithOptionalParams(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("My Client ID"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.HRIS.Benefits.Individuals.GetManyBenefits(
Expand Down Expand Up @@ -78,7 +78,7 @@ func TestHRISBenefitIndividualUnenrollManyWithOptionalParams(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("My Client ID"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.HRIS.Benefits.Individuals.UnenrollMany(
Expand Down
8 changes: 5 additions & 3 deletions hriscompany.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ import (
)

// HRISCompanyService contains methods and other services that help with
// interacting with the Finch API. Note, unlike clients, this service does not read
// variables from the environment automatically. You should not instantiate this
// service directly, and instead use the [NewHRISCompanyService] method instead.
// interacting with the Finch API.
//
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewHRISCompanyService] method instead.
type HRISCompanyService struct {
Options []option.RequestOption
}
Expand Down
2 changes: 1 addition & 1 deletion hriscompany_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestHRISCompanyGet(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("My Client ID"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.HRIS.Company.Get(context.TODO())
Expand Down
8 changes: 5 additions & 3 deletions hrisdirectory.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ import (
)

// HRISDirectoryService contains methods and other services that help with
// interacting with the Finch API. Note, unlike clients, this service does not read
// variables from the environment automatically. You should not instantiate this
// service directly, and instead use the [NewHRISDirectoryService] method instead.
// interacting with the Finch API.
//
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewHRISDirectoryService] method instead.
type HRISDirectoryService struct {
Options []option.RequestOption
}
Expand Down
4 changes: 2 additions & 2 deletions hrisdirectory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestHRISDirectoryListWithOptionalParams(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("My Client ID"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.HRIS.Directory.List(context.TODO(), finchgo.HRISDirectoryListParams{
Expand All @@ -51,7 +51,7 @@ func TestHRISDirectoryListIndividualsWithOptionalParams(t *testing.T) {
client := finchgo.NewClient(
option.WithBaseURL(baseURL),
option.WithAccessToken("My Access Token"),
option.WithClientID("My Client ID"),
option.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
_, err := client.HRIS.Directory.ListIndividuals(context.TODO(), finchgo.HRISDirectoryListIndividualsParams{
Expand Down
Loading