diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3e05ae56..3ca49358 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.108.0" + ".": "0.109.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index f6e24a32..a9fd9444 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 103 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-04f02fa57c3ab8d15ecf0a16a41a83814c21cdc2a830fae4d65f1b7b2196d819.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-979330185e8fda7b2bc2440075fe81c66132fc87ff3c548e93dd05db35ba3172.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 2be1a602..f9afbe2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 0.109.0 (2025-03-11) + +Full Changelog: [v0.108.0...v0.109.0](https://github.com/orbcorp/orb-go/compare/v0.108.0...v0.109.0) + +### Features + +* **api:** api update ([#492](https://github.com/orbcorp/orb-go/issues/492)) ([a2ec348](https://github.com/orbcorp/orb-go/commit/a2ec348e8c0d41a0b7730e28afe8d90f1dbd7839)) +* **client:** accept RFC6838 JSON content types ([#489](https://github.com/orbcorp/orb-go/issues/489)) ([62eee96](https://github.com/orbcorp/orb-go/commit/62eee9690f4fe614c405ac80ca9999ff610ca721)) + + +### Refactors + +* tidy up dependencies ([#491](https://github.com/orbcorp/orb-go/issues/491)) ([46d90e3](https://github.com/orbcorp/orb-go/commit/46d90e38e37200bf0a884ec627dc779e7f1b9ecd)) + ## 0.108.0 (2025-03-10) Full Changelog: [v0.107.0...v0.108.0](https://github.com/orbcorp/orb-go/compare/v0.107.0...v0.108.0) diff --git a/README.md b/README.md index 1120524a..e2ca7243 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Or to pin the version: ```sh -go get -u 'github.com/orbcorp/orb-go@v0.108.0' +go get -u 'github.com/orbcorp/orb-go@v0.109.0' ``` diff --git a/eventbackfill.go b/eventbackfill.go index 94aa52c7..df622f4b 100644 --- a/eventbackfill.go +++ b/eventbackfill.go @@ -532,9 +532,13 @@ func (r EventBackfillRevertResponseStatus) IsKnown() bool { } type EventBackfillNewParams struct { - // The (exclusive) end of the usage timeframe affected by this backfill. + // The (exclusive) end of the usage timeframe affected by this backfill. By + // default, Orb allows backfills up to 10 days in duration at a time. Reach out to + // discuss extending this limit and your use case. TimeframeEnd param.Field[time.Time] `json:"timeframe_end,required" format:"date-time"` - // The (inclusive) start of the usage timeframe affected by this backfill. + // The (inclusive) start of the usage timeframe affected by this backfill. By + // default, Orb allows backfills up to 10 days in duration at a time. Reach out to + // discuss extending this limit and your use case. TimeframeStart param.Field[time.Time] `json:"timeframe_start,required" format:"date-time"` // The time at which no more events will be accepted for this backfill. The // backfill will automatically begin reflecting throughout Orb at the close time. diff --git a/go.mod b/go.mod index c7e58fb2..d874c96b 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,12 @@ module github.com/orbcorp/orb-go go 1.21 require ( - github.com/google/uuid v1.3.0 // indirect - github.com/tidwall/gjson v1.14.4 // indirect + github.com/google/uuid v1.3.0 + github.com/tidwall/gjson v1.14.4 + github.com/tidwall/sjson v1.2.5 +) + +require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect - github.com/tidwall/sjson v1.2.5 // indirect ) diff --git a/internal/requestconfig/requestconfig.go b/internal/requestconfig/requestconfig.go index cdd90ea7..d2a5dc47 100644 --- a/internal/requestconfig/requestconfig.go +++ b/internal/requestconfig/requestconfig.go @@ -10,6 +10,7 @@ import ( "io" "math" "math/rand" + "mime" "net/http" "net/url" "runtime" @@ -490,7 +491,8 @@ func (cfg *RequestConfig) Execute() (err error) { // If we are not json, return plaintext contentType := res.Header.Get("content-type") - isJSON := strings.Contains(contentType, "application/json") || strings.Contains(contentType, "application/vnd.api+json") + mediaType, _, _ := mime.ParseMediaType(contentType) + isJSON := strings.Contains(mediaType, "application/json") || strings.HasSuffix(mediaType, "+json") if !isJSON { switch dst := cfg.ResponseBodyInto.(type) { case *string: @@ -501,7 +503,7 @@ func (cfg *RequestConfig) Execute() (err error) { case *[]byte: *dst = contents default: - return fmt.Errorf("expected destination type of 'string' or '[]byte' for responses with content-type that is not 'application/json'") + return fmt.Errorf("expected destination type of 'string' or '[]byte' for responses with content-type '%s' that is not 'application/json'", contentType) } return nil } diff --git a/internal/version.go b/internal/version.go index da089505..80772caf 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "0.108.0" // x-release-please-version +const PackageVersion = "0.109.0" // x-release-please-version