orb-billing 4.74.0 → 5.0.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.
- package/CHANGELOG.md +23 -0
- package/index.d.mts +148 -14
- package/index.d.ts +148 -14
- package/index.d.ts.map +1 -1
- package/index.js +0 -3
- package/index.js.map +1 -1
- package/index.mjs +3 -6
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/alerts.d.ts +20 -88
- package/resources/alerts.d.ts.map +1 -1
- package/resources/alerts.js.map +1 -1
- package/resources/alerts.mjs.map +1 -1
- package/resources/beta/beta.d.ts +9 -7313
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/external-plan-id.d.ts +7 -7074
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/beta/external-plan-id.js.map +1 -1
- package/resources/beta/external-plan-id.mjs.map +1 -1
- package/resources/credit-notes.d.ts +9 -163
- package/resources/credit-notes.d.ts.map +1 -1
- package/resources/credit-notes.js +3 -6
- package/resources/credit-notes.js.map +1 -1
- package/resources/credit-notes.mjs +2 -4
- package/resources/credit-notes.mjs.map +1 -1
- package/resources/customers/balance-transactions.d.ts +5 -32
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/customers/costs.d.ts +3 -81
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/customers/credits/credits.d.ts +4 -4
- package/resources/customers/credits/credits.d.ts.map +1 -1
- package/resources/customers/credits/credits.js.map +1 -1
- package/resources/customers/credits/credits.mjs.map +1 -1
- package/resources/customers/credits/index.d.ts +2 -2
- package/resources/customers/credits/index.d.ts.map +1 -1
- package/resources/customers/credits/index.js.map +1 -1
- package/resources/customers/credits/index.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.ts +171 -962
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/credits/top-ups.d.ts +29 -121
- package/resources/customers/credits/top-ups.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/customers/customers.d.ts +72 -678
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.ts +1 -1
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/index.js.map +1 -1
- package/resources/customers/index.mjs.map +1 -1
- package/resources/index.d.ts +7 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -3
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +6 -395
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoice-line-items.js.map +1 -1
- package/resources/invoice-line-items.mjs.map +1 -1
- package/resources/invoices.d.ts +30 -1700
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +3 -6
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +2 -4
- package/resources/invoices.mjs.map +1 -1
- package/resources/plans/plans.d.ts +7 -3801
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/external-price-id.d.ts +3 -3
- package/resources/prices/external-price-id.d.ts.map +1 -1
- package/resources/prices/index.d.ts +1 -1
- package/resources/prices/index.d.ts.map +1 -1
- package/resources/prices/index.js +1 -2
- package/resources/prices/index.js.map +1 -1
- package/resources/prices/index.mjs +1 -1
- package/resources/prices/index.mjs.map +1 -1
- package/resources/prices/prices.d.ts +346 -9372
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +39 -20
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +38 -18
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +7269 -9
- package/resources/shared.d.ts.map +1 -1
- package/resources/shared.js +11 -0
- package/resources/shared.js.map +1 -1
- package/resources/shared.mjs +7 -1
- package/resources/shared.mjs.map +1 -1
- package/resources/subscription-changes.d.ts +138 -2158
- package/resources/subscription-changes.d.ts.map +1 -1
- package/resources/subscription-changes.js.map +1 -1
- package/resources/subscription-changes.mjs.map +1 -1
- package/resources/subscriptions.d.ts +2639 -27234
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/index.ts +219 -42
- package/src/resources/alerts.ts +20 -94
- package/src/resources/beta/beta.ts +124 -8892
- package/src/resources/beta/external-plan-id.ts +118 -8593
- package/src/resources/credit-notes.ts +10 -217
- package/src/resources/customers/balance-transactions.ts +5 -36
- package/src/resources/customers/costs.ts +3 -101
- package/src/resources/customers/credits/credits.ts +18 -0
- package/src/resources/customers/credits/index.ts +9 -0
- package/src/resources/customers/credits/ledger.ts +212 -1435
- package/src/resources/customers/credits/top-ups.ts +33 -136
- package/src/resources/customers/customers.ts +162 -1454
- package/src/resources/customers/index.ts +8 -0
- package/src/resources/index.ts +42 -22
- package/src/resources/invoice-line-items.ts +10 -501
- package/src/resources/invoices.ts +60 -2394
- package/src/resources/plans/plans.ts +38 -4588
- package/src/resources/prices/external-price-id.ts +3 -3
- package/src/resources/prices/index.ts +2 -2
- package/src/resources/prices/prices.ts +500 -11810
- package/src/resources/shared.ts +9582 -22
- package/src/resources/subscription-changes.ts +171 -2670
- package/src/resources/subscriptions.ts +3162 -32900
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/src/resources/alerts.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../resource';
|
|
4
4
|
import { isRequestOptions } from '../core';
|
|
5
5
|
import * as Core from '../core';
|
|
6
|
+
import * as Shared from './shared';
|
|
6
7
|
import { Page, type PageParams } from '../pagination';
|
|
7
8
|
|
|
8
9
|
export class Alerts extends APIResource {
|
|
@@ -187,7 +188,7 @@ export interface Alert {
|
|
|
187
188
|
/**
|
|
188
189
|
* The customer the alert applies to.
|
|
189
190
|
*/
|
|
190
|
-
customer:
|
|
191
|
+
customer: Shared.CustomerMinified | null;
|
|
191
192
|
|
|
192
193
|
/**
|
|
193
194
|
* Whether the alert is enabled or disabled.
|
|
@@ -207,13 +208,13 @@ export interface Alert {
|
|
|
207
208
|
/**
|
|
208
209
|
* The subscription the alert applies to.
|
|
209
210
|
*/
|
|
210
|
-
subscription:
|
|
211
|
+
subscription: Shared.SubscriptionMinified | null;
|
|
211
212
|
|
|
212
213
|
/**
|
|
213
214
|
* The thresholds that define the conditions under which the alert will be
|
|
214
215
|
* triggered.
|
|
215
216
|
*/
|
|
216
|
-
thresholds: Array<
|
|
217
|
+
thresholds: Array<Threshold> | null;
|
|
217
218
|
|
|
218
219
|
/**
|
|
219
220
|
* The type of alert. This must be a valid alert type.
|
|
@@ -233,15 +234,6 @@ export interface Alert {
|
|
|
233
234
|
}
|
|
234
235
|
|
|
235
236
|
export namespace Alert {
|
|
236
|
-
/**
|
|
237
|
-
* The customer the alert applies to.
|
|
238
|
-
*/
|
|
239
|
-
export interface Customer {
|
|
240
|
-
id: string;
|
|
241
|
-
|
|
242
|
-
external_customer_id: string | null;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
237
|
/**
|
|
246
238
|
* The metric the alert applies to.
|
|
247
239
|
*/
|
|
@@ -267,26 +259,6 @@ export namespace Alert {
|
|
|
267
259
|
plan_version: string;
|
|
268
260
|
}
|
|
269
261
|
|
|
270
|
-
/**
|
|
271
|
-
* The subscription the alert applies to.
|
|
272
|
-
*/
|
|
273
|
-
export interface Subscription {
|
|
274
|
-
id: string;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* Thresholds are used to define the conditions under which an alert will be
|
|
279
|
-
* triggered.
|
|
280
|
-
*/
|
|
281
|
-
export interface Threshold {
|
|
282
|
-
/**
|
|
283
|
-
* The value at which an alert will fire. For credit balance alerts, the alert will
|
|
284
|
-
* fire at or below this value. For usage and cost alerts, the alert will fire at
|
|
285
|
-
* or above this value.
|
|
286
|
-
*/
|
|
287
|
-
value: number;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
262
|
/**
|
|
291
263
|
* Alert status is used to determine if an alert is currently in-alert or not.
|
|
292
264
|
*/
|
|
@@ -303,26 +275,24 @@ export namespace Alert {
|
|
|
303
275
|
}
|
|
304
276
|
}
|
|
305
277
|
|
|
306
|
-
|
|
278
|
+
/**
|
|
279
|
+
* Thresholds are used to define the conditions under which an alert will be
|
|
280
|
+
* triggered.
|
|
281
|
+
*/
|
|
282
|
+
export interface Threshold {
|
|
307
283
|
/**
|
|
308
|
-
* The
|
|
284
|
+
* The value at which an alert will fire. For credit balance alerts, the alert will
|
|
285
|
+
* fire at or below this value. For usage and cost alerts, the alert will fire at
|
|
286
|
+
* or above this value.
|
|
309
287
|
*/
|
|
310
|
-
|
|
288
|
+
value: number;
|
|
311
289
|
}
|
|
312
290
|
|
|
313
|
-
export
|
|
291
|
+
export interface AlertUpdateParams {
|
|
314
292
|
/**
|
|
315
|
-
*
|
|
316
|
-
* triggered.
|
|
293
|
+
* The thresholds that define the values at which the alert will be triggered.
|
|
317
294
|
*/
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* The value at which an alert will fire. For credit balance alerts, the alert will
|
|
321
|
-
* fire at or below this value. For usage and cost alerts, the alert will fire at
|
|
322
|
-
* or above this value.
|
|
323
|
-
*/
|
|
324
|
-
value: number;
|
|
325
|
-
}
|
|
295
|
+
thresholds: Array<Threshold>;
|
|
326
296
|
}
|
|
327
297
|
|
|
328
298
|
export interface AlertListParams extends PageParams {
|
|
@@ -364,22 +334,7 @@ export interface AlertCreateForCustomerParams {
|
|
|
364
334
|
/**
|
|
365
335
|
* The thresholds that define the values at which the alert will be triggered.
|
|
366
336
|
*/
|
|
367
|
-
thresholds?: Array<
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
export namespace AlertCreateForCustomerParams {
|
|
371
|
-
/**
|
|
372
|
-
* Thresholds are used to define the conditions under which an alert will be
|
|
373
|
-
* triggered.
|
|
374
|
-
*/
|
|
375
|
-
export interface Threshold {
|
|
376
|
-
/**
|
|
377
|
-
* The value at which an alert will fire. For credit balance alerts, the alert will
|
|
378
|
-
* fire at or below this value. For usage and cost alerts, the alert will fire at
|
|
379
|
-
* or above this value.
|
|
380
|
-
*/
|
|
381
|
-
value: number;
|
|
382
|
-
}
|
|
337
|
+
thresholds?: Array<Threshold> | null;
|
|
383
338
|
}
|
|
384
339
|
|
|
385
340
|
export interface AlertCreateForExternalCustomerParams {
|
|
@@ -396,29 +351,14 @@ export interface AlertCreateForExternalCustomerParams {
|
|
|
396
351
|
/**
|
|
397
352
|
* The thresholds that define the values at which the alert will be triggered.
|
|
398
353
|
*/
|
|
399
|
-
thresholds?: Array<
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
export namespace AlertCreateForExternalCustomerParams {
|
|
403
|
-
/**
|
|
404
|
-
* Thresholds are used to define the conditions under which an alert will be
|
|
405
|
-
* triggered.
|
|
406
|
-
*/
|
|
407
|
-
export interface Threshold {
|
|
408
|
-
/**
|
|
409
|
-
* The value at which an alert will fire. For credit balance alerts, the alert will
|
|
410
|
-
* fire at or below this value. For usage and cost alerts, the alert will fire at
|
|
411
|
-
* or above this value.
|
|
412
|
-
*/
|
|
413
|
-
value: number;
|
|
414
|
-
}
|
|
354
|
+
thresholds?: Array<Threshold> | null;
|
|
415
355
|
}
|
|
416
356
|
|
|
417
357
|
export interface AlertCreateForSubscriptionParams {
|
|
418
358
|
/**
|
|
419
359
|
* The thresholds that define the values at which the alert will be triggered.
|
|
420
360
|
*/
|
|
421
|
-
thresholds: Array<
|
|
361
|
+
thresholds: Array<Threshold>;
|
|
422
362
|
|
|
423
363
|
/**
|
|
424
364
|
* The type of alert to create. This must be a valid alert type.
|
|
@@ -431,21 +371,6 @@ export interface AlertCreateForSubscriptionParams {
|
|
|
431
371
|
metric_id?: string | null;
|
|
432
372
|
}
|
|
433
373
|
|
|
434
|
-
export namespace AlertCreateForSubscriptionParams {
|
|
435
|
-
/**
|
|
436
|
-
* Thresholds are used to define the conditions under which an alert will be
|
|
437
|
-
* triggered.
|
|
438
|
-
*/
|
|
439
|
-
export interface Threshold {
|
|
440
|
-
/**
|
|
441
|
-
* The value at which an alert will fire. For credit balance alerts, the alert will
|
|
442
|
-
* fire at or below this value. For usage and cost alerts, the alert will fire at
|
|
443
|
-
* or above this value.
|
|
444
|
-
*/
|
|
445
|
-
value: number;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
|
|
449
374
|
export interface AlertDisableParams {
|
|
450
375
|
/**
|
|
451
376
|
* Used to update the status of a plan alert scoped to this subscription_id
|
|
@@ -465,6 +390,7 @@ Alerts.AlertsPage = AlertsPage;
|
|
|
465
390
|
export declare namespace Alerts {
|
|
466
391
|
export {
|
|
467
392
|
type Alert as Alert,
|
|
393
|
+
type Threshold as Threshold,
|
|
468
394
|
AlertsPage as AlertsPage,
|
|
469
395
|
type AlertUpdateParams as AlertUpdateParams,
|
|
470
396
|
type AlertListParams as AlertListParams,
|