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 @@
{
".": "5.56.0"
".": "5.57.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: 139
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-07428f2af8d77b3af7d838375b0fb5adce7fba2c8312ca84bcd8ef340d782bbc.yml
openapi_spec_hash: bba0e6257d3d2f8612c5ad14b95839e2
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-7f97a69f22372b818e8d24a72f6020bcf2f0c6d6b3ad07abb8395c87ec4a72ee.yml
openapi_spec_hash: a6261e730c54d08ad36f1b946e663fc3
config_hash: c01c1191b1cd696c7ca855ff6d28a8df
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 5.57.0 (2026-05-05)

Full Changelog: [v5.56.0...v5.57.0](https://github.com/orbcorp/orb-node/compare/v5.56.0...v5.57.0)

### Features

* **api:** api update ([dc30faf](https://github.com/orbcorp/orb-node/commit/dc30faf603fd369a7a31a0e2569163e2e94f27e9))

## 5.56.0 (2026-04-27)

Full Changelog: [v5.55.0...v5.56.0](https://github.com/orbcorp/orb-node/compare/v5.55.0...v5.56.0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orb-billing",
"version": "5.56.0",
"version": "5.57.0",
"description": "The official TypeScript library for the Orb API",
"author": "Orb <team@withorb.com>",
"types": "dist/index.d.ts",
Expand Down
105 changes: 105 additions & 0 deletions src/resources/alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { APIResource } from '../resource';
import { isRequestOptions } from '../core';
import * as Core from '../core';
import * as AlertsAPI from './alerts';
import * as Shared from './shared';
import { Page, type PageParams } from '../pagination';

Expand Down Expand Up @@ -249,6 +250,18 @@ export interface Alert {
* Minified license type for alert serialization.
*/
license_type?: Alert.LicenseType | null;

/**
* Filters scoping which prices are included in grouped cost alert evaluation.
*/
price_filters?: Array<Alert.PriceFilter> | null;

/**
* Per-group threshold overrides. Each override maps a specific combination of
* grouping_keys values to a replacement threshold list. Only present for grouped
* cost alerts that have at least one override.
*/
threshold_overrides?: Array<Alert.ThresholdOverride> | null;
}

export namespace Alert {
Expand Down Expand Up @@ -298,6 +311,42 @@ export namespace Alert {
export interface LicenseType {
id: string;
}

export interface PriceFilter {
/**
* The property of the price to filter on.
*/
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';

/**
* Should prices that match the filter be included or excluded.
*/
operator: 'includes' | 'excludes';

/**
* The IDs or values that match this filter.
*/
values: Array<string>;
}

/**
* A per-group threshold override on a grouped cost alert.
*
* An empty `thresholds` list means the group is silenced (never fires). A
* non-empty list fully replaces the default thresholds for that group.
*/
export interface ThresholdOverride {
/**
* The values of the grouping keys that identify this group. The list length
* matches the alert's grouping_keys.
*/
group_values: Array<string>;

/**
* The thresholds applied to this group. An empty list means the group is silenced.
*/
thresholds: Array<AlertsAPI.Threshold>;
}
}

/**
Expand Down Expand Up @@ -401,11 +450,67 @@ export interface AlertCreateForSubscriptionParams {
*/
metric_id?: string | null;

/**
* Filters to scope which prices are included in grouped cost alert evaluation.
* Supports filtering by price_id, item_id, or price_type with includes/excludes
* operators. Only applicable when grouping_keys is set.
*/
price_filters?: Array<AlertCreateForSubscriptionParams.PriceFilter> | null;

/**
* The pricing unit to use for grouped cost alerts. Required when grouping_keys is
* set.
*/
pricing_unit_id?: string | null;

/**
* Per-group threshold overrides. Each override maps a specific combination of
* grouping_keys values to a list of thresholds that fully replaces the default
* thresholds for that group. An empty thresholds list silences the group. Groups
* without an override use the default thresholds. Only applicable when
* grouping_keys is set.
*/
threshold_overrides?: Array<AlertCreateForSubscriptionParams.ThresholdOverride> | null;
}

export namespace AlertCreateForSubscriptionParams {
export interface PriceFilter {
/**
* The property of the price to filter on.
*/
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';

/**
* Should prices that match the filter be included or excluded.
*/
operator: 'includes' | 'excludes';

/**
* The IDs or values that match this filter.
*/
values: Array<string>;
}

/**
* Per-group threshold override on a grouped cost alert.
*
* - An empty `thresholds` list silences alerts for this group (never fires).
* - A non-empty list fully replaces the default thresholds for this group.
*/
export interface ThresholdOverride {
/**
* The values of the grouping keys that identify this group. The list length must
* match the alert's grouping_keys, and values appear in the same order as
* grouping_keys.
*/
group_values: Array<string>;

/**
* The thresholds to apply to this group. An empty list silences alerts for this
* group. A non-empty list fully replaces the default thresholds for this group.
*/
thresholds: Array<AlertsAPI.Threshold>;
}
}

export interface AlertDisableParams {
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '5.56.0'; // x-release-please-version
export const VERSION = '5.57.0'; // x-release-please-version
8 changes: 8 additions & 0 deletions tests/api-resources/alerts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,15 @@ describe('resource alerts', () => {
type: 'usage_exceeded',
grouping_keys: ['string'],
metric_id: 'metric_id',
price_filters: [
{
field: 'price_id',
operator: 'includes',
values: ['string'],
},
],
pricing_unit_id: 'pricing_unit_id',
threshold_overrides: [{ group_values: ['string'], thresholds: [{ value: 0 }] }],
});
});

Expand Down
Loading