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 @@
{
".": "0.108.0"
".": "0.109.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: 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
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
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/orbcorp/orb-go@v0.108.0'
go get -u 'github.com/orbcorp/orb-go@v0.109.0'
```

<!-- x-release-please-end -->
Expand Down
8 changes: 6 additions & 2 deletions eventbackfill.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 6 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
6 changes: 4 additions & 2 deletions internal/requestconfig/requestconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"io"
"math"
"math/rand"
"mime"
"net/http"
"net/url"
"runtime"
Expand Down Expand Up @@ -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:
Expand All @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion internal/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package internal

const PackageVersion = "0.108.0" // x-release-please-version
const PackageVersion = "0.109.0" // x-release-please-version