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 @@
{
".": "4.74.0"
".": "5.0.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 115
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d513be954ba2cb57489bd048f93790cabb13849f0f04d328a5a15694c99550df.yml
openapi_spec_hash: 0d42694f412abf65defc3f88646a809c
config_hash: 1e2186b09e57d7d27b6ab5c8e6410b31
configured_endpoints: 116
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-c2a4808c828c8288c5c8dfe2fdfa51d4d7c1bcc33cacc6b859d0cf4b35ce95cc.yml
openapi_spec_hash: a2b5a1bfabbd03dd1b411791576eb502
config_hash: 3c3524be9607afb24d2139ce26ce5389
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

## 5.0.0 (2025-06-09)

Full Changelog: [v4.74.0...v5.0.0](https://github.com/orbcorp/orb-node/compare/v4.74.0...v5.0.0)

### ⚠ BREAKING CHANGES

* **client:** breaking change to re-use types

### Features

* **api:** api update ([f568653](https://github.com/orbcorp/orb-node/commit/f5686531660890c996aed2bcd3fbfdbf6ba71013))
* **api:** api update ([4c28249](https://github.com/orbcorp/orb-node/commit/4c28249f71e8a9aa3d75ac9a448ebb6f70301af2))
* **api:** api update ([9dc5bb3](https://github.com/orbcorp/orb-node/commit/9dc5bb3e4d0e2005691b3a886591a317bd84a60a))
* **api:** api update ([9328fae](https://github.com/orbcorp/orb-node/commit/9328faed43114dfe9f4fead3e6da314f6e626d33))
* **api:** api update ([44e9c35](https://github.com/orbcorp/orb-node/commit/44e9c35fb3b805cccb264647d7686fa00dd2a71b))
* **api:** manual updates ([8cc1c0b](https://github.com/orbcorp/orb-node/commit/8cc1c0bfb17d0ec2537e9470340a7926df177a28))
* **client:** breaking change to re-use types ([17a06ae](https://github.com/orbcorp/orb-node/commit/17a06aea5f1edb125fb033156a8eb76c6510cd76))


### Chores

* **internal:** codegen related update ([89ce8ec](https://github.com/orbcorp/orb-node/commit/89ce8ecf96b39394f17eb8b7735cc710d0e50cc4))

## 4.74.0 (2025-06-03)

Full Changelog: [v4.73.0...v4.74.0](https://github.com/orbcorp/orb-node/compare/v4.73.0...v4.74.0)
Expand Down
224 changes: 195 additions & 29 deletions api.md

Large diffs are not rendered by default.

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": "4.74.0",
"version": "5.0.0",
"description": "The official TypeScript library for the Orb API",
"author": "Orb <team@withorb.com>",
"types": "dist/index.d.ts",
Expand Down
261 changes: 219 additions & 42 deletions src/index.ts

Large diffs are not rendered by default.

114 changes: 20 additions & 94 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 Shared from './shared';
import { Page, type PageParams } from '../pagination';

export class Alerts extends APIResource {
Expand Down Expand Up @@ -187,7 +188,7 @@ export interface Alert {
/**
* The customer the alert applies to.
*/
customer: Alert.Customer | null;
customer: Shared.CustomerMinified | null;

/**
* Whether the alert is enabled or disabled.
Expand All @@ -207,13 +208,13 @@ export interface Alert {
/**
* The subscription the alert applies to.
*/
subscription: Alert.Subscription | null;
subscription: Shared.SubscriptionMinified | null;

/**
* The thresholds that define the conditions under which the alert will be
* triggered.
*/
thresholds: Array<Alert.Threshold> | null;
thresholds: Array<Threshold> | null;

/**
* The type of alert. This must be a valid alert type.
Expand All @@ -233,15 +234,6 @@ export interface Alert {
}

export namespace Alert {
/**
* The customer the alert applies to.
*/
export interface Customer {
id: string;

external_customer_id: string | null;
}

/**
* The metric the alert applies to.
*/
Expand All @@ -267,26 +259,6 @@ export namespace Alert {
plan_version: string;
}

/**
* The subscription the alert applies to.
*/
export interface Subscription {
id: string;
}

/**
* Thresholds are used to define the conditions under which an alert will be
* triggered.
*/
export interface Threshold {
/**
* The value at which an alert will fire. For credit balance alerts, the alert will
* fire at or below this value. For usage and cost alerts, the alert will fire at
* or above this value.
*/
value: number;
}

/**
* Alert status is used to determine if an alert is currently in-alert or not.
*/
Expand All @@ -303,26 +275,24 @@ export namespace Alert {
}
}

export interface AlertUpdateParams {
/**
* Thresholds are used to define the conditions under which an alert will be
* triggered.
*/
export interface Threshold {
/**
* The thresholds that define the values at which the alert will be triggered.
* The value at which an alert will fire. For credit balance alerts, the alert will
* fire at or below this value. For usage and cost alerts, the alert will fire at
* or above this value.
*/
thresholds: Array<AlertUpdateParams.Threshold>;
value: number;
}

export namespace AlertUpdateParams {
export interface AlertUpdateParams {
/**
* Thresholds are used to define the conditions under which an alert will be
* triggered.
* The thresholds that define the values at which the alert will be triggered.
*/
export interface Threshold {
/**
* The value at which an alert will fire. For credit balance alerts, the alert will
* fire at or below this value. For usage and cost alerts, the alert will fire at
* or above this value.
*/
value: number;
}
thresholds: Array<Threshold>;
}

export interface AlertListParams extends PageParams {
Expand Down Expand Up @@ -364,22 +334,7 @@ export interface AlertCreateForCustomerParams {
/**
* The thresholds that define the values at which the alert will be triggered.
*/
thresholds?: Array<AlertCreateForCustomerParams.Threshold> | null;
}

export namespace AlertCreateForCustomerParams {
/**
* Thresholds are used to define the conditions under which an alert will be
* triggered.
*/
export interface Threshold {
/**
* The value at which an alert will fire. For credit balance alerts, the alert will
* fire at or below this value. For usage and cost alerts, the alert will fire at
* or above this value.
*/
value: number;
}
thresholds?: Array<Threshold> | null;
}

export interface AlertCreateForExternalCustomerParams {
Expand All @@ -396,29 +351,14 @@ export interface AlertCreateForExternalCustomerParams {
/**
* The thresholds that define the values at which the alert will be triggered.
*/
thresholds?: Array<AlertCreateForExternalCustomerParams.Threshold> | null;
}

export namespace AlertCreateForExternalCustomerParams {
/**
* Thresholds are used to define the conditions under which an alert will be
* triggered.
*/
export interface Threshold {
/**
* The value at which an alert will fire. For credit balance alerts, the alert will
* fire at or below this value. For usage and cost alerts, the alert will fire at
* or above this value.
*/
value: number;
}
thresholds?: Array<Threshold> | null;
}

export interface AlertCreateForSubscriptionParams {
/**
* The thresholds that define the values at which the alert will be triggered.
*/
thresholds: Array<AlertCreateForSubscriptionParams.Threshold>;
thresholds: Array<Threshold>;

/**
* The type of alert to create. This must be a valid alert type.
Expand All @@ -431,21 +371,6 @@ export interface AlertCreateForSubscriptionParams {
metric_id?: string | null;
}

export namespace AlertCreateForSubscriptionParams {
/**
* Thresholds are used to define the conditions under which an alert will be
* triggered.
*/
export interface Threshold {
/**
* The value at which an alert will fire. For credit balance alerts, the alert will
* fire at or below this value. For usage and cost alerts, the alert will fire at
* or above this value.
*/
value: number;
}
}

export interface AlertDisableParams {
/**
* Used to update the status of a plan alert scoped to this subscription_id
Expand All @@ -465,6 +390,7 @@ Alerts.AlertsPage = AlertsPage;
export declare namespace Alerts {
export {
type Alert as Alert,
type Threshold as Threshold,
AlertsPage as AlertsPage,
type AlertUpdateParams as AlertUpdateParams,
type AlertListParams as AlertListParams,
Expand Down
Loading
Loading