diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bc282bc6..b7996428 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.56.0" + ".": "5.57.0" } diff --git a/.stats.yml b/.stats.yml index e2aab132..345cd65b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index b32a3b61..58a52bf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/package.json b/package.json index 2548e2b0..dc8a7ca7 100644 --- a/package.json +++ b/package.json @@ -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 ", "types": "dist/index.d.ts", diff --git a/src/resources/alerts.ts b/src/resources/alerts.ts index cb4617d8..86c69819 100644 --- a/src/resources/alerts.ts +++ b/src/resources/alerts.ts @@ -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'; @@ -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 | 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 | null; } export namespace Alert { @@ -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; + } + + /** + * 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; + + /** + * The thresholds applied to this group. An empty list means the group is silenced. + */ + thresholds: Array; + } } /** @@ -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 | 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 | 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; + } + + /** + * 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; + + /** + * 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; + } } export interface AlertDisableParams { diff --git a/src/version.ts b/src/version.ts index b2de295d..0bdd2d95 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '5.56.0'; // x-release-please-version +export const VERSION = '5.57.0'; // x-release-please-version diff --git a/tests/api-resources/alerts.test.ts b/tests/api-resources/alerts.test.ts index 044a4011..1af7d5d2 100644 --- a/tests/api-resources/alerts.test.ts +++ b/tests/api-resources/alerts.test.ts @@ -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 }] }], }); });