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 @@
{
".": "1.53.0"
".": "1.54.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 126
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-9f1a41612765cb08d100b2c9e85080e93306e8d0942d535f16052c3eb18d9b8b.yml
openapi_spec_hash: 6dd28f36adc7e7d6a9245585eaf9b9c1
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-931771ff4ab183044ee50ce43ea794ac0a15bfafbaf7df61ac0344af3ff08944.yml
openapi_spec_hash: 71371804e373f662585284bf5d93cc62
config_hash: bcf82bddb691f6be773ac6cae8c03b9a
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.54.0 (2026-02-03)

Full Changelog: [v1.53.0...v1.54.0](https://github.com/orbcorp/orb-go/compare/v1.53.0...v1.54.0)

### Features

* **api:** api update ([bbb9dce](https://github.com/orbcorp/orb-go/commit/bbb9dceb7e417ed23d747ea0b9ca656661669f6a))

## 1.53.0 (2026-01-23)

Full Changelog: [v1.52.0...v1.53.0](https://github.com/orbcorp/orb-go/compare/v1.52.0...v1.53.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@v1.53.0'
go get -u 'github.com/orbcorp/orb-go@v1.54.0'
```

<!-- x-release-please-end -->
Expand Down
40 changes: 33 additions & 7 deletions alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ type Alert struct {
// The current status of the alert. This field is only present for credit balance
// alerts.
BalanceAlertStatus []AlertBalanceAlertStatus `json:"balance_alert_status,nullable"`
JSON alertJSON `json:"-"`
// Minified license type for alert serialization.
LicenseType AlertLicenseType `json:"license_type,nullable"`
JSON alertJSON `json:"-"`
}

// alertJSON contains the JSON metadata for the struct [Alert]
Expand All @@ -240,6 +242,7 @@ type alertJSON struct {
Thresholds apijson.Field
Type apijson.Field
BalanceAlertStatus apijson.Field
LicenseType apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -307,16 +310,17 @@ func (r alertPlanJSON) RawJSON() string {
type AlertType string

const (
AlertTypeCreditBalanceDepleted AlertType = "credit_balance_depleted"
AlertTypeCreditBalanceDropped AlertType = "credit_balance_dropped"
AlertTypeCreditBalanceRecovered AlertType = "credit_balance_recovered"
AlertTypeUsageExceeded AlertType = "usage_exceeded"
AlertTypeCostExceeded AlertType = "cost_exceeded"
AlertTypeCreditBalanceDepleted AlertType = "credit_balance_depleted"
AlertTypeCreditBalanceDropped AlertType = "credit_balance_dropped"
AlertTypeCreditBalanceRecovered AlertType = "credit_balance_recovered"
AlertTypeUsageExceeded AlertType = "usage_exceeded"
AlertTypeCostExceeded AlertType = "cost_exceeded"
AlertTypeLicenseBalanceThresholdReached AlertType = "license_balance_threshold_reached"
)

func (r AlertType) IsKnown() bool {
switch r {
case AlertTypeCreditBalanceDepleted, AlertTypeCreditBalanceDropped, AlertTypeCreditBalanceRecovered, AlertTypeUsageExceeded, AlertTypeCostExceeded:
case AlertTypeCreditBalanceDepleted, AlertTypeCreditBalanceDropped, AlertTypeCreditBalanceRecovered, AlertTypeUsageExceeded, AlertTypeCostExceeded, AlertTypeLicenseBalanceThresholdReached:
return true
}
return false
Expand Down Expand Up @@ -348,6 +352,28 @@ func (r alertBalanceAlertStatusJSON) RawJSON() string {
return r.raw
}

// Minified license type for alert serialization.
type AlertLicenseType struct {
ID string `json:"id,required"`
JSON alertLicenseTypeJSON `json:"-"`
}

// alertLicenseTypeJSON contains the JSON metadata for the struct
// [AlertLicenseType]
type alertLicenseTypeJSON struct {
ID apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

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

func (r alertLicenseTypeJSON) RawJSON() string {
return r.raw
}

// Thresholds are used to define the conditions under which an alert will be
// triggered.
type Threshold struct {
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 = "1.53.0" // x-release-please-version
const PackageVersion = "1.54.0" // x-release-please-version