orb-billing 2.6.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -82,11 +82,11 @@ export declare class Costs extends APIResource {
82
82
  *
83
83
  * ## Timeframe bounds
84
84
  *
85
- * If no timeframe bounds are specified, the response will default to the current
86
- * billing period for the customer's subscription. For subscriptions that have
87
- * ended, this will be the billing period when they were last active. If the
88
- * subscription starts or ends within the timeframe, the response will only include
89
- * windows where the subscription is active.
85
+ * For an active subscription, both timeframes should be specified in the request.
86
+ * If a subscription starts or ends within the timeframe, the response will only
87
+ * include windows where the subscription is active. If a subscription has ended,
88
+ * no timeframe bounds need to be specified and the response will default to the
89
+ * billing period when the subscription was last active.
90
90
  *
91
91
  * As noted above, `timeframe_start` for a given cumulative datapoint is always the
92
92
  * beginning of the billing period, and `timeframe_end` is incremented one day at a
@@ -220,11 +220,11 @@ export declare class Costs extends APIResource {
220
220
  *
221
221
  * ## Timeframe bounds
222
222
  *
223
- * If no timeframe bounds are specified, the response will default to the current
224
- * billing period for the customer's subscription. For subscriptions that have
225
- * ended, this will be the billing period when they were last active. If the
226
- * subscription starts or ends within the timeframe, the response will only include
227
- * windows where the subscription is active.
223
+ * For an active subscription, both timeframes should be specified in the request.
224
+ * If a subscription starts or ends within the timeframe, the response will only
225
+ * include windows where the subscription is active. If a subscription has ended,
226
+ * no timeframe bounds need to be specified and the response will default to the
227
+ * billing period when the subscription was last active.
228
228
  *
229
229
  * As noted above, `timeframe_start` for a given cumulative datapoint is always the
230
230
  * beginning of the billing period, and `timeframe_end` is incremented one day at a
@@ -29,6 +29,10 @@ export declare class Backfills extends APIResource {
29
29
  * timeframe will be replaced with the newly ingested events associated with the
30
30
  * backfill. If `false`, newly ingested events will be added to the existing
31
31
  * events.
32
+ *
33
+ * If a `customer_id` or `external_customer_id` is specified, the backfill will
34
+ * only affect events for that customer. If neither is specified, the backfill will
35
+ * affect all customers.
32
36
  */
33
37
  create(body: BackfillCreateParams, options?: Core.RequestOptions): Core.APIPromise<BackfillCreateResponse>;
34
38
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"backfills.d.ts","sourceRoot":"","sources":["../../src/resources/events/backfills.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,YAAY,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAE/D,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAI1G;;;;;;;;OAQG;IACH,IAAI,CACF,KAAK,CAAC,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,WAAW,CAAC,yBAAyB,EAAE,oBAAoB,CAAC;IACpE,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,WAAW,CAAC,yBAAyB,EAAE,oBAAoB,CAAC;IAWtG;;;;;OAKG;IACH,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAIhG;;OAEG;IACH,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAIhG;;;;;;;;OAQG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,C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oB,GAAG,YAAY,CAAC,oBAAoB,CAAC;IACvE,MAAM,QAAQ,qBAAqB,GAAG,YAAY,CAAC,qBAAqB,CAAC;IACzE,MAAM,QAAQ,qBAAqB,GAAG,YAAY,CAAC,qBAAqB,CAAC;IACzE,MAAM,QAAQ,sBAAsB,GAAG,YAAY,CAAC,sBAAsB,CAAC;IAC3E,MAAM,QAAQ,yBAAyB,GAAG,YAAY,CAAC,yBAAyB,CAAC;IACjF,MAAM,QAAQ,oBAAoB,GAAG,YAAY,CAAC,oBAAoB,CAAC;IACvE,MAAM,QAAQ,kBAAkB,GAAG,YAAY,CAAC,kBAAkB,CAAC;CACpE"}
@@ -56,6 +56,10 @@ class Backfills extends resource_1.APIResource {
56
56
  * timeframe will be replaced with the newly ingested events associated with the
57
57
  * backfill. If `false`, newly ingested events will be added to the existing
58
58
  * events.
59
+ *
60
+ * If a `customer_id` or `external_customer_id` is specified, the backfill will
61
+ * only affect events for that customer. If neither is specified, the backfill will
62
+ * affect all customers.
59
63
  */
60
64
  create(body, options) {
61
65
  return this._client.post('/events/backfills', { body, ...options });
@@ -1 +1 @@
1
- {"version":3,"file":"backfills.js","sourceRoot":"","sources":["../../src/resources/events/backfills.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtF,mDAAmD;AACnD,2CAAoD;AACpD,qFAAuE;AACvE,uDAA+D;AAE/D,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CAAC,IAA0B,EAAE,OAA6B;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAgBD,IAAI,CACF,QAAkD,EAAE,EACpD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,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EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAgBD,IAAI,CACF,QAAkD,EAAE,EACpD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,mBAAmB,EAAE,yBAAyB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxG,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,UAAkB,EAAE,OAA6B;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,UAAU,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAkB,EAAE,OAA6B;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,UAAkB,EAAE,OAA6B;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,UAAU,SAAS,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACF;AAzFD,8BAyFC;AAED,MAAa,yBAA0B,SAAQ,iBAA0B;CAAG;AAA5E,8DAA4E;AAoP5E,WAAiB,SAAS;IAMV,mCAAyB,GAAG,YAAY,CAAC,yBAAyB,CAAC;AAGnF,CAAC,EATgB,SAAS,GAAT,iBAAS,KAAT,iBAAS,QASzB"}
@@ -30,6 +30,10 @@ export class Backfills extends APIResource {
30
30
  * timeframe will be replaced with the newly ingested events associated with the
31
31
  * backfill. If `false`, newly ingested events will be added to the existing
32
32
  * events.
33
+ *
34
+ * If a `customer_id` or `external_customer_id` is specified, the backfill will
35
+ * only affect events for that customer. If neither is specified, the backfill will
36
+ * affect all customers.
33
37
  */
34
38
  create(body, options) {
35
39
  return this._client.post('/events/backfills', { body, ...options });
@@ -1 +1 @@
1
- {"version":3,"file":"backfills.mjs","sourceRoot":"","sources":["../../src/resources/events/backfills.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,WAAW,EAAE,MAAM,sBAAsB;OAC3C,EAAE,gBAAgB,EAAE,MAAM,kBAAkB;OAC5C,KAAK,YAAY,MAAM,wCAAwC;OAC/D,EAAE,IAAI,EAAmB,MAAM,wBAAwB;AAE9D,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CAAC,IAA0B,EAAE,OAA6B;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAgBD,IAAI,CACF,QAAkD,EAAE,EACpD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,mBAAmB,EAAE,yBAAyB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxG,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,UAAkB,EAAE,OAA6B;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,UAAU,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAkB,EAAE,OAA6B;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,UAAkB,E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CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAkB,EAAE,OAA6B;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,UAAkB,EAAE,OAA6B;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,UAAU,SAAS,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACF;AAED,MAAM,OAAO,yBAA0B,SAAQ,IAA0B;CAAG;AAoP5E,WAAiB,SAAS;IAMV,mCAAyB,GAAG,YAAY,CAAC,yBAAyB,CAAC;AAGnF,CAAC,EATgB,SAAS,KAAT,SAAS,QASzB"}
@@ -212,12 +212,10 @@ export declare class Events extends APIResource {
212
212
  * We validate the following:
213
213
  *
214
214
  * - Exactly one of `customer_id` and `external_customer_id` should be specified.
215
- * - If specified, `customer_id` must identify a Customer resource within Orb. We
216
- * do not support sending events for customers that have not been provisioned.
217
- * Similarly, if specified, `external_customer_id` must be an identifier that is
218
- * associated with an Orb Customer resource. Note: During our initial integration
219
- * period, this enforcement will be temporarily turned into a warning to ensure
220
- * smooth customer migration.
215
+ * - If the `customer_id` is specified, the customer in Orb must exist.
216
+ * - If the `external_customer_id` is specified, the customer in Orb does not need
217
+ * to exist. Events will be attributed to any future customers with the
218
+ * `external_customer_id` on subscription creation.
221
219
  * - `timestamp` must conform to ISO 8601 and represent a timestamp at most 1 hour
222
220
  * in the future. This timestamp should be sent in UTC timezone (no timezone
223
221
  * offset).
@@ -227,7 +225,9 @@ export declare class Events extends APIResource {
227
225
  * Orb's idempotency guarantees allow you to implement safe retry logic in the
228
226
  * event of network or machine failures, ensuring data fidelity. Each event in the
229
227
  * request payload is associated with an idempotency key, and Orb guarantees that a
230
- * single idempotency key will be successfully ingested at most once.
228
+ * single idempotency key will be successfully ingested at most once. Note that
229
+ * when Orb encounters events with duplicate idempotency keys and differing event
230
+ * bodies in a batch of events, the entire batch will be rejected.
231
231
  *
232
232
  * - Successful responses return a 200 HTTP status code. The response contains
233
233
  * information about previously processed events.
@@ -244,12 +244,10 @@ class Events extends resource_1.APIResource {
244
244
  * We validate the following:
245
245
  *
246
246
  * - Exactly one of `customer_id` and `external_customer_id` should be specified.
247
- * - If specified, `customer_id` must identify a Customer resource within Orb. We
248
- * do not support sending events for customers that have not been provisioned.
249
- * Similarly, if specified, `external_customer_id` must be an identifier that is
250
- * associated with an Orb Customer resource. Note: During our initial integration
251
- * period, this enforcement will be temporarily turned into a warning to ensure
252
- * smooth customer migration.
247
+ * - If the `customer_id` is specified, the customer in Orb must exist.
248
+ * - If the `external_customer_id` is specified, the customer in Orb does not need
249
+ * to exist. Events will be attributed to any future customers with the
250
+ * `external_customer_id` on subscription creation.
253
251
  * - `timestamp` must conform to ISO 8601 and represent a timestamp at most 1 hour
254
252
  * in the future. This timestamp should be sent in UTC timezone (no timezone
255
253
  * offset).
@@ -259,7 +257,9 @@ class Events extends resource_1.APIResource {
259
257
  * Orb's idempotency guarantees allow you to implement safe retry logic in the
260
258
  * event of network or machine failures, ensuring data fidelity. Each event in the
261
259
  * request payload is associated with an idempotency key, and Orb guarantees that a
262
- * single idempotency key will be successfully ingested at most once.
260
+ * single idempotency key will be successfully ingested at most once. Note that
261
+ * when Orb encounters events with duplicate idempotency keys and differing event
262
+ * bodies in a batch of events, the entire batch will be rejected.
263
263
  *
264
264
  * - Successful responses return a 200 HTTP status code. The response contains
265
265
  * information about previously processed events.
@@ -218,12 +218,10 @@ export class Events extends APIResource {
218
218
  * We validate the following:
219
219
  *
220
220
  * - Exactly one of `customer_id` and `external_customer_id` should be specified.
221
- * - If specified, `customer_id` must identify a Customer resource within Orb. We
222
- * do not support sending events for customers that have not been provisioned.
223
- * Similarly, if specified, `external_customer_id` must be an identifier that is
224
- * associated with an Orb Customer resource. Note: During our initial integration
225
- * period, this enforcement will be temporarily turned into a warning to ensure
226
- * smooth customer migration.
221
+ * - If the `customer_id` is specified, the customer in Orb must exist.
222
+ * - If the `external_customer_id` is specified, the customer in Orb does not need
223
+ * to exist. Events will be attributed to any future customers with the
224
+ * `external_customer_id` on subscription creation.
227
225
  * - `timestamp` must conform to ISO 8601 and represent a timestamp at most 1 hour
228
226
  * in the future. This timestamp should be sent in UTC timezone (no timezone
229
227
  * offset).
@@ -233,7 +231,9 @@ export class Events extends APIResource {
233
231
  * Orb's idempotency guarantees allow you to implement safe retry logic in the
234
232
  * event of network or machine failures, ensuring data fidelity. Each event in the
235
233
  * request payload is associated with an idempotency key, and Orb guarantees that a
236
- * single idempotency key will be successfully ingested at most once.
234
+ * single idempotency key will be successfully ingested at most once. Note that
235
+ * when Orb encounters events with duplicate idempotency keys and differing event
236
+ * bodies in a batch of events, the entire batch will be rejected.
237
237
  *
238
238
  * - Successful responses return a 200 HTTP status code. The response contains
239
239
  * information about previously processed events.
@@ -1,5 +1,5 @@
1
1
  export * from "./shared.js";
2
- export { Alert, AlertListParams, AlertCreateForCustomerParams, AlertCreateForExternalCustomerParams, AlertCreateForPlanParams, AlertCreateForSubscriptionParams, AlertDisableParams, AlertEnableParams, AlertsPage, Alerts, } from "./alerts.js";
2
+ export { Alert, AlertListParams, AlertCreateForCustomerParams, AlertCreateForExternalCustomerParams, AlertCreateForSubscriptionParams, AlertsPage, Alerts, } from "./alerts.js";
3
3
  export { Coupon, CouponCreateParams, CouponListParams, CouponsPage, Coupons } from "./coupons/coupons.js";
4
4
  export { CreditNote, CreditNoteListParams, CreditNotesPage, CreditNotes } from "./credit-notes.js";
5
5
  export { Customer, CustomerCreateParams, CustomerUpdateParams, CustomerListParams, CustomerUpdateByExternalIDParams, CustomersPage, Customers, } from "./customers/customers.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,OAAO,EACL,KAAK,EACL,eAAe,EACf,4BAA4B,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,gBAAgB,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3G,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,8BAA8B,EAC9B,iCAAiC,EACjC,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,4BAA4B,EAC5B,+BAA+B,EAC/B,4BAA4B,EAC5B,gCAAgC,EAChC,oCAAoC,EACpC,8BAA8B,EAC9B,mDAAmD,EACnD,wCAAwC,EACxC,iBAAiB,EACjB,sCAAsC,GACvC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,OAAO,EACL,KAAK,EACL,eAAe,EACf,4BAA4B,EAC5B,oCAAoC,EACpC,gCAAgC,EAChC,UAAU,EACV,MAAM,GACP,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACvG,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAChG,OAAO,EACL,QAAQ,EACR,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,gCAAgC,EAChC,aAAa,EACb,SAAS,GACV,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,KAAK,EACL,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,UAAU,EACV,MAAM,GACP,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EAC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yB;AAFvB,oGAAA,UAAU,OAAA;AACV,gGAAA,MAAM,OAAA;AAER,6CASyB;AADvB,gGAAA,MAAM,OAAA;AAER,0CASoB;AAFlB,wGAAA,YAAY,OAAA;AACZ,oGAAA,QAAQ,OAAA;AAEV,8DAI8B;AAD5B,sHAAA,gBAAgB,OAAA;AAElB,oCAAmF;AAAlC,kGAAA,SAAS,OAAA;AAAE,8FAAA,KAAK,OAAA;AACjE,wCAQmB;AAFjB,kHAAA,uBAAuB,OAAA;AACvB,kGAAA,OAAO,OAAA;AAET,0CAA2G;AAAxC,kGAAA,SAAS,OAAA;AAAE,8FAAA,KAAK,OAAA;AACnF,oDAoByB;AAjBvB,8GAAA,aAAa,OAAA;AAeb,kHAAA,iBAAiB,OAAA;AACjB,uIAAA,sCAAsC,OAAA;AAExC,4CAA6D;AAA9B,qGAAA,QAAQ,OAAA;AACvC,0CAAsC;AAA7B,oGAAA,QAAQ,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EASL,UAAU,EACV,MAAM,GACP;OACM,EAAgD,WAAW,EAAE,OAAO,EAAE;OACtE,EAAoC,eAAe,EAAE,WAAW,EAAE;OAClE,EAML,aAAa,EACb,SAAS,GACV;OACM,EAOL,UAAU,EACV,MAAM,GACP;OACM,EAQL,MAAM,GACP;OACM,EAOL,YAAY,EACZ,QAAQ,GACT;OACM,EAGL,gBAAgB,GACjB;OACM,EAA0C,SAAS,EAAE,KAAK,EAAE;OAC5D,EAML,uBAAuB,EACvB,OAAO,GACR;OACM,EAA4D,SAAS,EAAE,KAAK,EAAE;OAC9E,EAGL,aAAa,EAeb,iBAAiB,EACjB,sCAAsC,GACvC;OACM,EAAwB,QAAQ,EAAE;OAClC,EAAE,QAAQ,EAAE"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EAML,UAAU,EACV,MAAM,GACP;OACM,EAAgD,WAAW,EAAE,OAAO,EAAE;OACtE,EAAoC,eAAe,EAAE,WAAW,EAAE;OAClE,EAML,aAAa,EACb,SAAS,GACV;OACM,EAOL,UAAU,EACV,MAAM,GACP;OACM,EAQL,MAAM,GACP;OACM,EAOL,YAAY,EACZ,QAAQ,GACT;OACM,EAGL,gBAAgB,GACjB;OACM,EAA0C,SAAS,EAAE,KAAK,EAAE;OAC5D,EAML,uBAAuB,EACvB,OAAO,GACR;OACM,EAA4D,SAAS,EAAE,KAAK,EAAE;OAC9E,EAGL,aAAa,EAeb,iBAAiB,EACjB,sCAAsC,GACvC;OACM,EAAwB,QAAQ,EAAE;OAClC,EAAE,QAAQ,EAAE"}
@@ -1777,7 +1777,7 @@ export interface SubscriptionCreateParams {
1777
1777
  */
1778
1778
  metadata?: Record<string, string | null> | null;
1779
1779
  net_terms?: number | null;
1780
- per_credit_overage_amount?: string | null;
1780
+ per_credit_overage_amount?: number | null;
1781
1781
  /**
1782
1782
  * The plan that the given subscription should be switched to. Note that either
1783
1783
  * this property or `external_plan_id` must be specified.
@@ -3965,7 +3965,7 @@ export interface SubscriptionSchedulePlanChangeParams {
3965
3965
  * at the end of the billing period.
3966
3966
  */
3967
3967
  invoicing_threshold?: string | null;
3968
- per_credit_overage_amount?: string | null;
3968
+ per_credit_overage_amount?: number | null;
3969
3969
  /**
3970
3970
  * The plan that the given subscription should be switched to. Note that either
3971
3971
  * this property or `external_plan_id` must be specified.
package/src/index.ts CHANGED
@@ -333,10 +333,7 @@ export namespace Orb {
333
333
  export import AlertListParams = API.AlertListParams;
334
334
  export import AlertCreateForCustomerParams = API.AlertCreateForCustomerParams;
335
335
  export import AlertCreateForExternalCustomerParams = API.AlertCreateForExternalCustomerParams;
336
- export import AlertCreateForPlanParams = API.AlertCreateForPlanParams;
337
336
  export import AlertCreateForSubscriptionParams = API.AlertCreateForSubscriptionParams;
338
- export import AlertDisableParams = API.AlertDisableParams;
339
- export import AlertEnableParams = API.AlertEnableParams;
340
337
 
341
338
  export import BillingCycleRelativeDate = API.BillingCycleRelativeDate;
342
339
  export import Discount = API.Discount;
@@ -15,18 +15,17 @@ export class Alerts extends APIResource {
15
15
  }
16
16
 
17
17
  /**
18
- * This endpoint returns a list of all
19
- * [`alerts`](https://docs.withorb.com/guides/product-catalog/configuring-alerts).
18
+ * This endpoint returns a list of alerts within Orb.
20
19
  *
21
- * The list of alerts is ordered starting from the most recently created alert.
22
- * This endpoint follows Orb's
23
- * [standardized pagination format](../reference/pagination).
24
- *
25
- * The request must specify one of customer_id, external_customer_id,
26
- * subscription_id, or plan_id
20
+ * The request must specify one of `customer_id`, `external_customer_id`, or
21
+ * `subscription_id`.
27
22
  *
28
23
  * If querying by subscripion_id, the endpoint will return the subscription level
29
24
  * alerts as well as the plan level alerts associated with the subscription.
25
+ *
26
+ * The list of alerts is ordered starting from the most recently created alert.
27
+ * This endpoint follows Orb's
28
+ * [standardized pagination format](../reference/pagination).
30
29
  */
31
30
  list(query?: AlertListParams, options?: Core.RequestOptions): Core.PagePromise<AlertsPage, Alert>;
32
31
  list(options?: Core.RequestOptions): Core.PagePromise<AlertsPage, Alert>;
@@ -78,40 +77,18 @@ export class Alerts extends APIResource {
78
77
  return this._client.post(`/alerts/external_customer_id/${externalCustomerId}`, { body, ...options });
79
78
  }
80
79
 
81
- /**
82
- * This endpoint is used to create alerts at the plan level. Plan level alerts are
83
- * automatically propagated to all subscriptions associated with the plan. These
84
- * alerts are scoped to a specific plan version; if no version is specified, the
85
- * active plan version is used.
86
- *
87
- * Plan level alerts can be of two types: `usage_exceeded` or `cost_exceeded`. A
88
- * `usage_exceeded` alert is scoped to a particular metric and is triggered when
89
- * the usage of that metric exceeds a predefined thresholds during the current
90
- * invoice cycle. A `cost_exceeded` alert is triggered when the total cost of the
91
- * subscription on the plan surpasses predefined thresholds in the current invoice
92
- * cycle.Each plan can have one `cost_exceeded` alert and one `usage_exceeded`
93
- * alert per metric that is apart of the plan.
94
- */
95
- createForPlan(
96
- planId: string,
97
- body: AlertCreateForPlanParams,
98
- options?: Core.RequestOptions,
99
- ): Core.APIPromise<Alert> {
100
- return this._client.post(`/alerts/plan_id/${planId}`, { body, ...options });
101
- }
102
-
103
80
  /**
104
81
  * This endpoint is used to create alerts at the subscription level.
105
82
  *
106
83
  * Subscription level alerts can be one of two types: `usage_exceeded` or
107
84
  * `cost_exceeded`. A `usage_exceeded` alert is scoped to a particular metric and
108
- * is triggered when the usage of that metric exceeds a predefined thresholds
109
- * during the current invoice cycle. A `cost_exceeded` alert is triggered when the
110
- * total cost of the subscription surpasses predefined thresholds in the current
111
- * invoice cycle. Each subscription can have one `cost_exceeded` alert and one
112
- * `usage_exceeded` alert per metric that is apart of the subscription. Alerts are
113
- * triggered based on usage or cost conditions met during the current invoice
114
- * cycle.
85
+ * is triggered when the usage of that metric exceeds predefined thresholds during
86
+ * the current billing cycle. A `cost_exceeded` alert is triggered when the total
87
+ * amount due during the current billing cycle surpasses predefined thresholds.
88
+ * `cost_exceeded` alerts do not include burndown of pre-purchase credits. Each
89
+ * subscription can have one `cost_exceeded` alert and one `usage_exceeded` alert
90
+ * per metric that is a part of the subscription. Alerts are triggered based on
91
+ * usage or cost conditions met during the current billing cycle.
115
92
  */
116
93
  createForSubscription(
117
94
  subscriptionId: string,
@@ -123,85 +100,33 @@ export class Alerts extends APIResource {
123
100
 
124
101
  /**
125
102
  * This endpoint can be used to disable an alert.
126
- *
127
- * By default, disabling a plan level alert will apply to all subscriptions on that
128
- * plan. In order to toggle a plan level alert for a specific subscription, the
129
- * client must provide the plan level alert id as well as the subscription_id
130
- * parameter.
131
- */
132
- disable(
133
- alertConfigurationId: string,
134
- params?: AlertDisableParams,
135
- options?: Core.RequestOptions,
136
- ): Core.APIPromise<Alert>;
137
- disable(alertConfigurationId: string, options?: Core.RequestOptions): Core.APIPromise<Alert>;
138
- disable(
139
- alertConfigurationId: string,
140
- params: AlertDisableParams | Core.RequestOptions = {},
141
- options?: Core.RequestOptions,
142
- ): Core.APIPromise<Alert> {
143
- if (isRequestOptions(params)) {
144
- return this.disable(alertConfigurationId, {}, params);
145
- }
146
- const { subscription_id } = params;
147
- return this._client.post(`/alerts/${alertConfigurationId}/disable`, {
148
- query: { subscription_id },
149
- ...options,
150
- });
103
+ */
104
+ disable(alertConfigurationId: string, options?: Core.RequestOptions): Core.APIPromise<Alert> {
105
+ return this._client.post(`/alerts/${alertConfigurationId}/disable`, options);
151
106
  }
152
107
 
153
108
  /**
154
109
  * This endpoint can be used to enable an alert.
155
- *
156
- * By default, enabling a plan level alert will apply to all subscriptions on that
157
- * plan. In order to toggle a plan level alert for a specific subscription, the
158
- * client must provide the plan level alert id as well as the subscription_id
159
- * parameter.
160
- */
161
- enable(
162
- alertConfigurationId: string,
163
- params?: AlertEnableParams,
164
- options?: Core.RequestOptions,
165
- ): Core.APIPromise<Alert>;
166
- enable(alertConfigurationId: string, options?: Core.RequestOptions): Core.APIPromise<Alert>;
167
- enable(
168
- alertConfigurationId: string,
169
- params: AlertEnableParams | Core.RequestOptions = {},
170
- options?: Core.RequestOptions,
171
- ): Core.APIPromise<Alert> {
172
- if (isRequestOptions(params)) {
173
- return this.enable(alertConfigurationId, {}, params);
174
- }
175
- const { subscription_id } = params;
176
- return this._client.post(`/alerts/${alertConfigurationId}/enable`, {
177
- query: { subscription_id },
178
- ...options,
179
- });
110
+ */
111
+ enable(alertConfigurationId: string, options?: Core.RequestOptions): Core.APIPromise<Alert> {
112
+ return this._client.post(`/alerts/${alertConfigurationId}/enable`, options);
180
113
  }
181
114
  }
182
115
 
183
116
  export class AlertsPage extends Page<Alert> {}
184
117
 
185
118
  /**
186
- * An
187
- * [Alert within Orb](https://docs.withorb.com/guides/product-catalog/configuring-alerts)
188
- * monitors a customer's spending, usage, or credit balance and triggers a webhook
189
- * when a threshold is exceeded.
190
- *
191
- * Alerts can be configured to monitor usage, cost, or credit balance. Alerts can
192
- * be scoped to either a customer, a plan, or a subscription.
193
- *
194
- * Customer scoped alerts track a customer's credit balance. Valid customer alert
195
- * types are "credit_balance_depleted", "credit_balance_recovered", and
196
- * "credit_balance_dropped".
119
+ * [Alerts within Orb](https://docs.withorb.com/guides/product-catalog/configuring-alerts)
120
+ * monitor spending, usage, or credit balance and trigger webhooks when a threshold
121
+ * is exceeded.
197
122
  *
198
- * Subscription scoped alerts track a subscriptions's usage or cost. Valid plan
199
- * alert types are "usage_exceeded" or "cost_exceeded".
123
+ * Alerts created through the API can be scoped to either customers or
124
+ * subscriptions.
200
125
  *
201
- * Plan scoped alerts are similar to subscriptions alerts but when a plan alert is
202
- * created, it is propagated to all subscriptions associated with the plan.
203
- * Disabling a plan alert will disable the alert for all subscriptions. Valid plan
204
- * alert types are "usage_exceeded" or "cost_exceeded".
126
+ * | Scope | Monitors | Vaild Alert Types |
127
+ * | ------------ | ------------------------------ | ----------------------------------------------------------------------------------- |
128
+ * | Customer | A customer's credit balance | `credit_balance_depleted`, `credit_balance_recovered`, and `credit_balance_dropped` |
129
+ * | Subscription | A subscription's usage or cost | `usage_exceeded` and `cost_exceeded` |
205
130
  */
206
131
  export interface Alert {
207
132
  /**
@@ -215,7 +140,7 @@ export interface Alert {
215
140
  created_at: string;
216
141
 
217
142
  /**
218
- * The name of the currency the credit balance for this alert is denominated in.
143
+ * The name of the currency the credit balance or invoice cost is denominated in.
219
144
  */
220
145
  currency: string | null;
221
146
 
@@ -268,8 +193,9 @@ export namespace Alert {
268
193
  */
269
194
  export interface Threshold {
270
195
  /**
271
- * The value at which an alert will fire. For credit balance alerts, the alert will fire at or below this value. For usage and
272
- * cost alerts, the alert will fire at or above this value.
196
+ * The value at which an alert will fire. For credit balance alerts, the alert will
197
+ * fire at or below this value. For usage and cost alerts, the alert will fire at
198
+ * or above this value.
273
199
  */
274
200
  value: number;
275
201
  }
@@ -294,16 +220,6 @@ export interface AlertListParams extends PageParams {
294
220
  */
295
221
  external_customer_id?: string | null;
296
222
 
297
- /**
298
- * Fetch alerts scoped to this plan_id
299
- */
300
- plan_id?: string | null;
301
-
302
- /**
303
- * If provided alongside plan_id, only the alerts that are scoped to the specified plan_version will be returned.
304
- */
305
- plan_version?: number | null;
306
-
307
223
  /**
308
224
  * Fetch alerts scoped to this subscription_id
309
225
  */
@@ -334,8 +250,9 @@ export namespace AlertCreateForCustomerParams {
334
250
  */
335
251
  export interface Threshold {
336
252
  /**
337
- * The value at which an alert will fire. For credit balance alerts, the alert will fire at or below this value. For usage and
338
- * cost alerts, the alert will fire at or above this value.
253
+ * The value at which an alert will fire. For credit balance alerts, the alert will
254
+ * fire at or below this value. For usage and cost alerts, the alert will fire at
255
+ * or above this value.
339
256
  */
340
257
  value: number;
341
258
  }
@@ -365,44 +282,9 @@ export namespace AlertCreateForExternalCustomerParams {
365
282
  */
366
283
  export interface Threshold {
367
284
  /**
368
- * The value at which an alert will fire. For credit balance alerts, the alert will fire at or below this value. For usage and
369
- * cost alerts, the alert will fire at or above this value.
370
- */
371
- value: number;
372
- }
373
- }
374
-
375
- export interface AlertCreateForPlanParams {
376
- /**
377
- * The thresholds for the alert.
378
- */
379
- thresholds: Array<AlertCreateForPlanParams.Threshold>;
380
-
381
- /**
382
- * The thresholds that define the values at which the alert will be triggered.
383
- */
384
- type: string;
385
-
386
- /**
387
- * The metric to track usage for.
388
- */
389
- metric_id?: string | null;
390
-
391
- /**
392
- * The plan version to create alerts for. If not specified, the default will be the plan's active plan version.
393
- */
394
- plan_version?: number | null;
395
- }
396
-
397
- export namespace AlertCreateForPlanParams {
398
- /**
399
- * Thresholds are used to define the conditions under which an alert will be
400
- * triggered.
401
- */
402
- export interface Threshold {
403
- /**
404
- * The value at which an alert will fire. For credit balance alerts, the alert will fire at or below this value. For usage and
405
- * cost alerts, the alert will fire at or above this value.
285
+ * The value at which an alert will fire. For credit balance alerts, the alert will
286
+ * fire at or below this value. For usage and cost alerts, the alert will fire at
287
+ * or above this value.
406
288
  */
407
289
  value: number;
408
290
  }
@@ -432,35 +314,19 @@ export namespace AlertCreateForSubscriptionParams {
432
314
  */
433
315
  export interface Threshold {
434
316
  /**
435
- * The value at which an alert will fire. For credit balance alerts, the alert will fire at or below this value. For usage and
436
- * cost alerts, the alert will fire at or above this value.
317
+ * The value at which an alert will fire. For credit balance alerts, the alert will
318
+ * fire at or below this value. For usage and cost alerts, the alert will fire at
319
+ * or above this value.
437
320
  */
438
321
  value: number;
439
322
  }
440
323
  }
441
324
 
442
- export interface AlertDisableParams {
443
- /**
444
- * Used to update the status of a plan alert scoped to this subscription_id
445
- */
446
- subscription_id?: string | null;
447
- }
448
-
449
- export interface AlertEnableParams {
450
- /**
451
- * Used to update the status of a plan alert scoped to this subscription_id
452
- */
453
- subscription_id?: string | null;
454
- }
455
-
456
325
  export namespace Alerts {
457
326
  export import Alert = AlertsAPI.Alert;
458
327
  export import AlertsPage = AlertsAPI.AlertsPage;
459
328
  export import AlertListParams = AlertsAPI.AlertListParams;
460
329
  export import AlertCreateForCustomerParams = AlertsAPI.AlertCreateForCustomerParams;
461
330
  export import AlertCreateForExternalCustomerParams = AlertsAPI.AlertCreateForExternalCustomerParams;
462
- export import AlertCreateForPlanParams = AlertsAPI.AlertCreateForPlanParams;
463
331
  export import AlertCreateForSubscriptionParams = AlertsAPI.AlertCreateForSubscriptionParams;
464
- export import AlertDisableParams = AlertsAPI.AlertDisableParams;
465
- export import AlertEnableParams = AlertsAPI.AlertEnableParams;
466
332
  }
@@ -86,11 +86,11 @@ export class Costs extends APIResource {
86
86
  *
87
87
  * ## Timeframe bounds
88
88
  *
89
- * If no timeframe bounds are specified, the response will default to the current
90
- * billing period for the customer's subscription. For subscriptions that have
91
- * ended, this will be the billing period when they were last active. If the
92
- * subscription starts or ends within the timeframe, the response will only include
93
- * windows where the subscription is active.
89
+ * For an active subscription, both timeframes should be specified in the request.
90
+ * If a subscription starts or ends within the timeframe, the response will only
91
+ * include windows where the subscription is active. If a subscription has ended,
92
+ * no timeframe bounds need to be specified and the response will default to the
93
+ * billing period when the subscription was last active.
94
94
  *
95
95
  * As noted above, `timeframe_start` for a given cumulative datapoint is always the
96
96
  * beginning of the billing period, and `timeframe_end` is incremented one day at a
@@ -239,11 +239,11 @@ export class Costs extends APIResource {
239
239
  *
240
240
  * ## Timeframe bounds
241
241
  *
242
- * If no timeframe bounds are specified, the response will default to the current
243
- * billing period for the customer's subscription. For subscriptions that have
244
- * ended, this will be the billing period when they were last active. If the
245
- * subscription starts or ends within the timeframe, the response will only include
246
- * windows where the subscription is active.
242
+ * For an active subscription, both timeframes should be specified in the request.
243
+ * If a subscription starts or ends within the timeframe, the response will only
244
+ * include windows where the subscription is active. If a subscription has ended,
245
+ * no timeframe bounds need to be specified and the response will default to the
246
+ * billing period when the subscription was last active.
247
247
  *
248
248
  * As noted above, `timeframe_start` for a given cumulative datapoint is always the
249
249
  * beginning of the billing period, and `timeframe_end` is incremented one day at a
@@ -33,6 +33,10 @@ export class Backfills extends APIResource {
33
33
  * timeframe will be replaced with the newly ingested events associated with the
34
34
  * backfill. If `false`, newly ingested events will be added to the existing
35
35
  * events.
36
+ *
37
+ * If a `customer_id` or `external_customer_id` is specified, the backfill will
38
+ * only affect events for that customer. If neither is specified, the backfill will
39
+ * affect all customers.
36
40
  */
37
41
  create(body: BackfillCreateParams, options?: Core.RequestOptions): Core.APIPromise<BackfillCreateResponse> {
38
42
  return this._client.post('/events/backfills', { body, ...options });