diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7f5d28df..fb1cbfe2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.44.0" + ".": "4.45.0" } diff --git a/.stats.yml b/.stats.yml index c963fb86..7dd05a09 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 101 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-726c25fdf0fdd4b7c5a9c36d30e33990d2a4b63c4260be340400f8ded23b578f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-52bd3046e73f201c4d08edfa92756791c015be907691a7893f8e7782cc2aea6f.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index a08b8c0c..26daa15c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 4.45.0 (2025-01-03) + +Full Changelog: [v4.44.0...v4.45.0](https://github.com/orbcorp/orb-node/compare/v4.44.0...v4.45.0) + +### Features + +* **api:** api update ([#437](https://github.com/orbcorp/orb-node/issues/437)) ([daef0ee](https://github.com/orbcorp/orb-node/commit/daef0eece9bd089b20074a04ebe9e956d22cb03d)) + + +### Chores + +* **internal:** codegen related update ([#435](https://github.com/orbcorp/orb-node/issues/435)) ([d538b3d](https://github.com/orbcorp/orb-node/commit/d538b3d8bc0d3dad4715c56d90b1f5be2a511f7f)) + ## 4.44.0 (2024-12-24) Full Changelog: [v4.43.0...v4.44.0](https://github.com/orbcorp/orb-node/compare/v4.43.0...v4.44.0) diff --git a/LICENSE b/LICENSE index 782200ee..00b1f9c8 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2024 Orb + Copyright 2025 Orb Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/package.json b/package.json index d18b9df5..6bf97cdd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orb-billing", - "version": "4.44.0", + "version": "4.45.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 bd0a758a..eda44eed 100644 --- a/src/resources/alerts.ts +++ b/src/resources/alerts.ts @@ -170,11 +170,6 @@ export class AlertsPage extends Page {} * * Alerts created through the API can be scoped to either customers or * subscriptions. - * - * | Scope | Monitors | Vaild Alert Types | - * | ------------ | ------------------------------ | ----------------------------------------------------------------------------------- | - * | Customer | A customer's credit balance | `credit_balance_depleted`, `credit_balance_recovered`, and `credit_balance_dropped` | - * | Subscription | A subscription's usage or cost | `usage_exceeded` and `cost_exceeded` | */ export interface Alert { /** @@ -195,7 +190,7 @@ export interface Alert { /** * The customer the alert applies to. */ - customer: Record | null; + customer: Alert.Customer | null; /** * Whether the alert is enabled or disabled. @@ -205,17 +200,17 @@ export interface Alert { /** * The metric the alert applies to. */ - metric: Record | null; + metric: Alert.Metric | null; /** * The plan the alert applies to. */ - plan: Record | null; + plan: Alert.Plan | null; /** * The subscription the alert applies to. */ - subscription: Record | null; + subscription: Alert.Subscription | null; /** * The thresholds that define the conditions under which the alert will be @@ -235,6 +230,47 @@ 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. + */ + export interface Metric { + id: string; + } + + /** + * The plan the alert applies to. + */ + export interface Plan { + id: string | null; + + /** + * An optional user-defined ID for this plan resource, used throughout the system + * as an alias for this Plan. Use this field to identify a plan by an existing + * identifier in your system. + */ + external_plan_id: string | null; + + name: string | null; + + 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. diff --git a/src/resources/events/backfills.ts b/src/resources/events/backfills.ts index 2d37ec2e..34ced3ac 100644 --- a/src/resources/events/backfills.ts +++ b/src/resources/events/backfills.ts @@ -37,8 +37,10 @@ export class Backfills extends APIResource { * only affect events for that customer. If neither is specified, the backfill will * affect all customers. * - * When `replace_existing_events` is `true`, the field `filter` can be optionally - * added which enables filtering using + * When `replace_existing_events` is `true`, this indicates that existing events in + * the timeframe should no longer be counted towards invoiced usage. In this + * scenario, the parameter `filter` can be optionally added which enables filtering + * using * [computed properties](../guides/extensibility/advanced-metrics#computed-properties). * The expressiveness of computed properties allows you to deprecate existing * events based on both a period of time and specific property values. diff --git a/src/resources/events/events.ts b/src/resources/events/events.ts index 1939b05b..fbb49731 100644 --- a/src/resources/events/events.ts +++ b/src/resources/events/events.ts @@ -92,8 +92,8 @@ export class Events extends APIResource { * call to a payment gateway failed and the user should not be billed) * * If you want to only change specific properties of an event, but keep the event - * as part of the billing calculation, use the [Amend single event](amend-event) - * endpoint instead. + * as part of the billing calculation, use the [Amend event](amend-event) endpoint + * instead. * * This API is always audit-safe. The process will still retain the deprecated * event, though it will be ignored for billing calculations. For auditing and data diff --git a/src/version.ts b/src/version.ts index 4ebba76e..2ebf697c 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.44.0'; // x-release-please-version +export const VERSION = '4.45.0'; // x-release-please-version