@metronome/sdk 2.1.0 → 2.2.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.
Files changed (103) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/client.d.mts +1 -1
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +1 -1
  5. package/client.d.ts.map +1 -1
  6. package/package.json +1 -1
  7. package/resources/shared.d.mts +29 -2
  8. package/resources/shared.d.mts.map +1 -1
  9. package/resources/shared.d.ts +29 -2
  10. package/resources/shared.d.ts.map +1 -1
  11. package/resources/v1/alerts.d.mts +20 -1
  12. package/resources/v1/alerts.d.mts.map +1 -1
  13. package/resources/v1/alerts.d.ts +20 -1
  14. package/resources/v1/alerts.d.ts.map +1 -1
  15. package/resources/v1/contracts/contracts.d.mts +60 -8
  16. package/resources/v1/contracts/contracts.d.mts.map +1 -1
  17. package/resources/v1/contracts/contracts.d.ts +60 -8
  18. package/resources/v1/contracts/contracts.d.ts.map +1 -1
  19. package/resources/v1/contracts/contracts.js.map +1 -1
  20. package/resources/v1/contracts/contracts.mjs.map +1 -1
  21. package/resources/v1/customers/alerts.d.mts +38 -0
  22. package/resources/v1/customers/alerts.d.mts.map +1 -1
  23. package/resources/v1/customers/alerts.d.ts +38 -0
  24. package/resources/v1/customers/alerts.d.ts.map +1 -1
  25. package/resources/v1/customers/billing-config.d.mts +10 -0
  26. package/resources/v1/customers/billing-config.d.mts.map +1 -1
  27. package/resources/v1/customers/billing-config.d.ts +10 -0
  28. package/resources/v1/customers/billing-config.d.ts.map +1 -1
  29. package/resources/v1/customers/customers.d.mts +70 -3
  30. package/resources/v1/customers/customers.d.mts.map +1 -1
  31. package/resources/v1/customers/customers.d.ts +70 -3
  32. package/resources/v1/customers/customers.d.ts.map +1 -1
  33. package/resources/v1/customers/customers.js +8 -6
  34. package/resources/v1/customers/customers.js.map +1 -1
  35. package/resources/v1/customers/customers.mjs +8 -6
  36. package/resources/v1/customers/customers.mjs.map +1 -1
  37. package/resources/v1/customers/index.d.mts +1 -1
  38. package/resources/v1/customers/index.d.mts.map +1 -1
  39. package/resources/v1/customers/index.d.ts +1 -1
  40. package/resources/v1/customers/index.d.ts.map +1 -1
  41. package/resources/v1/customers/index.js.map +1 -1
  42. package/resources/v1/customers/index.mjs.map +1 -1
  43. package/resources/v1/customers/invoices.d.mts +10 -2
  44. package/resources/v1/customers/invoices.d.mts.map +1 -1
  45. package/resources/v1/customers/invoices.d.ts +10 -2
  46. package/resources/v1/customers/invoices.d.ts.map +1 -1
  47. package/resources/v1/customers/plans.d.mts +1 -0
  48. package/resources/v1/customers/plans.d.mts.map +1 -1
  49. package/resources/v1/customers/plans.d.ts +1 -0
  50. package/resources/v1/customers/plans.d.ts.map +1 -1
  51. package/resources/v1/index.d.mts +1 -1
  52. package/resources/v1/index.d.mts.map +1 -1
  53. package/resources/v1/index.d.ts +1 -1
  54. package/resources/v1/index.d.ts.map +1 -1
  55. package/resources/v1/index.js.map +1 -1
  56. package/resources/v1/index.mjs.map +1 -1
  57. package/resources/v1/settings/billing-providers.d.mts +1 -1
  58. package/resources/v1/settings/billing-providers.d.mts.map +1 -1
  59. package/resources/v1/settings/billing-providers.d.ts +1 -1
  60. package/resources/v1/settings/billing-providers.d.ts.map +1 -1
  61. package/resources/v1/settings/settings.d.mts +6 -0
  62. package/resources/v1/settings/settings.d.mts.map +1 -1
  63. package/resources/v1/settings/settings.d.ts +6 -0
  64. package/resources/v1/settings/settings.d.ts.map +1 -1
  65. package/resources/v1/settings/settings.js +1 -0
  66. package/resources/v1/settings/settings.js.map +1 -1
  67. package/resources/v1/settings/settings.mjs +1 -0
  68. package/resources/v1/settings/settings.mjs.map +1 -1
  69. package/resources/v1/usage.d.mts +3 -2
  70. package/resources/v1/usage.d.mts.map +1 -1
  71. package/resources/v1/usage.d.ts +3 -2
  72. package/resources/v1/usage.d.ts.map +1 -1
  73. package/resources/v1/v1.d.mts +2 -2
  74. package/resources/v1/v1.d.mts.map +1 -1
  75. package/resources/v1/v1.d.ts +2 -2
  76. package/resources/v1/v1.d.ts.map +1 -1
  77. package/resources/v1/v1.js.map +1 -1
  78. package/resources/v1/v1.mjs.map +1 -1
  79. package/resources/v2/contracts.d.mts +200 -8
  80. package/resources/v2/contracts.d.mts.map +1 -1
  81. package/resources/v2/contracts.d.ts +200 -8
  82. package/resources/v2/contracts.d.ts.map +1 -1
  83. package/src/client.ts +1 -1
  84. package/src/resources/shared.ts +34 -2
  85. package/src/resources/v1/alerts.ts +24 -1
  86. package/src/resources/v1/contracts/contracts.ts +67 -8
  87. package/src/resources/v1/customers/alerts.ts +44 -0
  88. package/src/resources/v1/customers/billing-config.ts +14 -0
  89. package/src/resources/v1/customers/customers.ts +90 -7
  90. package/src/resources/v1/customers/index.ts +1 -0
  91. package/src/resources/v1/customers/invoices.ts +12 -0
  92. package/src/resources/v1/customers/plans.ts +2 -0
  93. package/src/resources/v1/index.ts +1 -0
  94. package/src/resources/v1/settings/billing-providers.ts +1 -1
  95. package/src/resources/v1/settings/settings.ts +7 -0
  96. package/src/resources/v1/usage.ts +3 -2
  97. package/src/resources/v1/v1.ts +2 -0
  98. package/src/resources/v2/contracts.ts +244 -8
  99. package/src/version.ts +1 -1
  100. package/version.d.mts +1 -1
  101. package/version.d.ts +1 -1
  102. package/version.js +1 -1
  103. package/version.mjs +1 -1
@@ -987,6 +987,8 @@ export namespace ContractGetEditHistoryResponse {
987
987
  */
988
988
  applicable_product_tags?: Array<string> | null;
989
989
 
990
+ description?: string;
991
+
990
992
  /**
991
993
  * Optional configuration for commit hierarchy access control
992
994
  */
@@ -1111,6 +1113,8 @@ export namespace ContractGetEditHistoryResponse {
1111
1113
 
1112
1114
  access_schedule?: UpdateCredit.AccessSchedule;
1113
1115
 
1116
+ description?: string;
1117
+
1114
1118
  /**
1115
1119
  * Optional configuration for credit hierarchy access control
1116
1120
  */
@@ -1480,6 +1484,11 @@ export namespace ContractGetEditHistoryResponse {
1480
1484
  ending_before?: string;
1481
1485
 
1482
1486
  quantity_updates?: Array<UpdateSubscription.QuantityUpdate>;
1487
+
1488
+ /**
1489
+ * Manage subscription seats for subscriptions in SEAT_BASED mode.
1490
+ */
1491
+ seat_updates?: UpdateSubscription.SeatUpdates;
1483
1492
  }
1484
1493
 
1485
1494
  export namespace UpdateSubscription {
@@ -1490,6 +1499,84 @@ export namespace ContractGetEditHistoryResponse {
1490
1499
 
1491
1500
  quantity_delta?: number;
1492
1501
  }
1502
+
1503
+ /**
1504
+ * Manage subscription seats for subscriptions in SEAT_BASED mode.
1505
+ */
1506
+ export interface SeatUpdates {
1507
+ /**
1508
+ * Adds seat IDs to the subscription. If there are unassigned seats, the new seat
1509
+ * IDs will fill these unassigned seats and not increase the total subscription
1510
+ * quantity. Otherwise, if there are more new seat IDs than unassigned seats, the
1511
+ * total subscription quantity will increase.
1512
+ */
1513
+ add_seat_ids?: Array<SeatUpdates.AddSeatID>;
1514
+
1515
+ /**
1516
+ * Adds unassigned seats to the subscription. This will increase the total
1517
+ * subscription quantity.
1518
+ */
1519
+ add_unassigned_seats?: Array<SeatUpdates.AddUnassignedSeat>;
1520
+
1521
+ /**
1522
+ * Removes seat IDs from the subscription, if possible. If a seat ID is removed,
1523
+ * the total subscription quantity will decrease. Otherwise, if the seat ID is not
1524
+ * found on the subscription, this is a no-op.
1525
+ */
1526
+ remove_seat_ids?: Array<SeatUpdates.RemoveSeatID>;
1527
+
1528
+ /**
1529
+ * Removes unassigned seats from the subscription. This will decrease the total
1530
+ * subscription quantity if there are are unassigned seats.
1531
+ */
1532
+ remove_unassigned_seats?: Array<SeatUpdates.RemoveUnassignedSeat>;
1533
+ }
1534
+
1535
+ export namespace SeatUpdates {
1536
+ export interface AddSeatID {
1537
+ seat_ids: Array<string>;
1538
+
1539
+ /**
1540
+ * Assigned seats will be added/removed starting at this date.
1541
+ */
1542
+ starting_at: string;
1543
+ }
1544
+
1545
+ export interface AddUnassignedSeat {
1546
+ /**
1547
+ * The number of unassigned seats on the subscription will increase/decrease by
1548
+ * this delta. Must be greater than 0.
1549
+ */
1550
+ quantity: number;
1551
+
1552
+ /**
1553
+ * Unassigned seats will be updated starting at this date.
1554
+ */
1555
+ starting_at: string;
1556
+ }
1557
+
1558
+ export interface RemoveSeatID {
1559
+ seat_ids: Array<string>;
1560
+
1561
+ /**
1562
+ * Assigned seats will be added/removed starting at this date.
1563
+ */
1564
+ starting_at: string;
1565
+ }
1566
+
1567
+ export interface RemoveUnassignedSeat {
1568
+ /**
1569
+ * The number of unassigned seats on the subscription will increase/decrease by
1570
+ * this delta. Must be greater than 0.
1571
+ */
1572
+ quantity: number;
1573
+
1574
+ /**
1575
+ * Unassigned seats will be updated starting at this date.
1576
+ */
1577
+ starting_at: string;
1578
+ }
1579
+ }
1493
1580
  }
1494
1581
  }
1495
1582
  }
@@ -2611,9 +2698,8 @@ export namespace ContractEditParams {
2611
2698
  subscription_id: string;
2612
2699
 
2613
2700
  /**
2614
- * If set to POOLED, allocation added per seat is pooled across the account. (BETA)
2615
- * If set to INDIVIDUAL, each seat in the subscription will have its own
2616
- * allocation.
2701
+ * If set to POOLED, allocation added per seat is pooled across the account. If set
2702
+ * to INDIVIDUAL, each seat in the subscription will have its own allocation.
2617
2703
  */
2618
2704
  allocation?: 'POOLED' | 'INDIVIDUAL';
2619
2705
  }
@@ -2776,9 +2862,8 @@ export namespace ContractEditParams {
2776
2862
  subscription_id: string;
2777
2863
 
2778
2864
  /**
2779
- * If set to POOLED, allocation added per seat is pooled across the account. (BETA)
2780
- * If set to INDIVIDUAL, each seat in the subscription will have its own
2781
- * allocation.
2865
+ * If set to POOLED, allocation added per seat is pooled across the account. If set
2866
+ * to INDIVIDUAL, each seat in the subscription will have its own allocation.
2782
2867
  */
2783
2868
  allocation?: 'POOLED' | 'INDIVIDUAL';
2784
2869
  }
@@ -2999,14 +3084,16 @@ export namespace ContractEditParams {
2999
3084
  * QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
3000
3085
  * directly on the subscription. `initial_quantity` must be provided with this
3001
3086
  * option. Compatible with recurring commits/credits that use POOLED allocation.
3002
- * **SEAT_BASED**: (BETA) Use when you want to pass specific seat identifiers (e.g.
3003
- * add user_123) to increment and decrement a subscription quantity, rather than
3087
+ * **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add
3088
+ * user_123) to increment and decrement a subscription quantity, rather than
3004
3089
  * directly providing the quantity. You must use a **SEAT_BASED** subscription to
3005
3090
  * use a linked recurring credit with an allocation per seat. `seat_config` must be
3006
3091
  * provided with this option.
3007
3092
  */
3008
3093
  quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY';
3009
3094
 
3095
+ seat_config?: AddSubscription.SeatConfig;
3096
+
3010
3097
  /**
3011
3098
  * Inclusive start time for the subscription. If not provided, defaults to contract
3012
3099
  * start date
@@ -3049,6 +3136,28 @@ export namespace ContractEditParams {
3049
3136
  */
3050
3137
  product_id: string;
3051
3138
  }
3139
+
3140
+ export interface SeatConfig {
3141
+ /**
3142
+ * The initial assigned seats on this subscription.
3143
+ */
3144
+ initial_seat_ids: Array<string>;
3145
+
3146
+ /**
3147
+ * The property name, sent on usage events, that identifies the seat ID associated
3148
+ * with the usage event. For example, the property name might be seat_id or
3149
+ * user_id. The property must be set as a group key on billable metrics and a
3150
+ * presentation/pricing group key on contract products. This allows linked
3151
+ * recurring credits with an allocation per seat to be consumed by only one seat's
3152
+ * usage.
3153
+ */
3154
+ seat_group_key: string;
3155
+
3156
+ /**
3157
+ * The initial amount of unassigned seats on this subscription.
3158
+ */
3159
+ initial_unassigned_seats?: number;
3160
+ }
3052
3161
  }
3053
3162
 
3054
3163
  export interface ArchiveCommit {
@@ -3086,6 +3195,8 @@ export namespace ContractEditParams {
3086
3195
  */
3087
3196
  applicable_product_tags?: Array<string> | null;
3088
3197
 
3198
+ description?: string;
3199
+
3089
3200
  /**
3090
3201
  * Optional configuration for commit hierarchy access control
3091
3202
  */
@@ -3093,6 +3204,8 @@ export namespace ContractEditParams {
3093
3204
 
3094
3205
  invoice_schedule?: UpdateCommit.InvoiceSchedule;
3095
3206
 
3207
+ name?: string;
3208
+
3096
3209
  netsuite_sales_order_id?: string | null;
3097
3210
 
3098
3211
  priority?: number | null;
@@ -3198,11 +3311,15 @@ export namespace ContractEditParams {
3198
3311
  */
3199
3312
  applicable_product_tags?: Array<string> | null;
3200
3313
 
3314
+ description?: string;
3315
+
3201
3316
  /**
3202
3317
  * Optional configuration for commit hierarchy access control
3203
3318
  */
3204
3319
  hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
3205
3320
 
3321
+ name?: string;
3322
+
3206
3323
  netsuite_sales_order_id?: string | null;
3207
3324
 
3208
3325
  priority?: number | null;
@@ -3430,15 +3547,39 @@ export namespace ContractEditParams {
3430
3547
 
3431
3548
  ending_before?: string | null;
3432
3549
 
3550
+ /**
3551
+ * Update the subscription's quantity management mode from QUANTITY_ONLY to
3552
+ * SEAT_BASED with the provided seat_group_key.
3553
+ */
3554
+ quantity_management_mode_update?: UpdateSubscription.QuantityManagementModeUpdate;
3555
+
3433
3556
  /**
3434
3557
  * Quantity changes are applied on the effective date based on the order which they
3435
3558
  * are sent. For example, if I scheduled the quantity to be 12 on May 21 and then
3436
3559
  * scheduled a quantity delta change of -1, the result from that day would be 11.
3437
3560
  */
3438
3561
  quantity_updates?: Array<UpdateSubscription.QuantityUpdate>;
3562
+
3563
+ seat_updates?: UpdateSubscription.SeatUpdates;
3439
3564
  }
3440
3565
 
3441
3566
  export namespace UpdateSubscription {
3567
+ /**
3568
+ * Update the subscription's quantity management mode from QUANTITY_ONLY to
3569
+ * SEAT_BASED with the provided seat_group_key.
3570
+ */
3571
+ export interface QuantityManagementModeUpdate {
3572
+ quantity_management_mode: 'SEAT_BASED';
3573
+
3574
+ seat_config: QuantityManagementModeUpdate.SeatConfig;
3575
+ }
3576
+
3577
+ export namespace QuantityManagementModeUpdate {
3578
+ export interface SeatConfig {
3579
+ seat_group_key: string;
3580
+ }
3581
+ }
3582
+
3442
3583
  export interface QuantityUpdate {
3443
3584
  starting_at: string;
3444
3585
 
@@ -3455,6 +3596,81 @@ export namespace ContractEditParams {
3455
3596
  */
3456
3597
  quantity_delta?: number;
3457
3598
  }
3599
+
3600
+ export interface SeatUpdates {
3601
+ /**
3602
+ * Adds seat IDs to the subscription. If there are unassigned seats, the new seat
3603
+ * IDs will fill these unassigned seats and not increase the total subscription
3604
+ * quantity. Otherwise, if there are more new seat IDs than unassigned seats, the
3605
+ * total subscription quantity will increase.
3606
+ */
3607
+ add_seat_ids?: Array<SeatUpdates.AddSeatID>;
3608
+
3609
+ /**
3610
+ * Adds unassigned seats to the subscription. This will increase the total
3611
+ * subscription quantity.
3612
+ */
3613
+ add_unassigned_seats?: Array<SeatUpdates.AddUnassignedSeat>;
3614
+
3615
+ /**
3616
+ * Removes seat IDs from the subscription, if possible. If a seat ID is removed,
3617
+ * the total subscription quantity will decrease. Otherwise, if the seat ID is not
3618
+ * found on the subscription, this is a no-op.
3619
+ */
3620
+ remove_seat_ids?: Array<SeatUpdates.RemoveSeatID>;
3621
+
3622
+ /**
3623
+ * Removes unassigned seats from the subscription. This will decrease the total
3624
+ * subscription quantity if there are are unassigned seats.
3625
+ */
3626
+ remove_unassigned_seats?: Array<SeatUpdates.RemoveUnassignedSeat>;
3627
+ }
3628
+
3629
+ export namespace SeatUpdates {
3630
+ export interface AddSeatID {
3631
+ seat_ids: Array<string>;
3632
+
3633
+ /**
3634
+ * Assigned seats will be added/removed starting at this date.
3635
+ */
3636
+ starting_at: string;
3637
+ }
3638
+
3639
+ export interface AddUnassignedSeat {
3640
+ /**
3641
+ * The number of unassigned seats on the subscription will increase/decrease by
3642
+ * this delta. Must be greater than 0.
3643
+ */
3644
+ quantity: number;
3645
+
3646
+ /**
3647
+ * Unassigned seats will be updated starting at this date.
3648
+ */
3649
+ starting_at: string;
3650
+ }
3651
+
3652
+ export interface RemoveSeatID {
3653
+ seat_ids: Array<string>;
3654
+
3655
+ /**
3656
+ * Assigned seats will be added/removed starting at this date.
3657
+ */
3658
+ starting_at: string;
3659
+ }
3660
+
3661
+ export interface RemoveUnassignedSeat {
3662
+ /**
3663
+ * The number of unassigned seats on the subscription will increase/decrease by
3664
+ * this delta. Must be greater than 0.
3665
+ */
3666
+ quantity: number;
3667
+
3668
+ /**
3669
+ * Unassigned seats will be updated starting at this date.
3670
+ */
3671
+ starting_at: string;
3672
+ }
3673
+ }
3458
3674
  }
3459
3675
  }
3460
3676
 
@@ -3485,6 +3701,11 @@ export interface ContractEditCommitParams {
3485
3701
  */
3486
3702
  applicable_product_tags?: Array<string> | null;
3487
3703
 
3704
+ /**
3705
+ * Updated description for the commit
3706
+ */
3707
+ description?: string;
3708
+
3488
3709
  /**
3489
3710
  * Optional configuration for commit hierarchy access control
3490
3711
  */
@@ -3497,6 +3718,11 @@ export interface ContractEditCommitParams {
3497
3718
 
3498
3719
  invoice_schedule?: ContractEditCommitParams.InvoiceSchedule;
3499
3720
 
3721
+ /**
3722
+ * Updated name for the commit
3723
+ */
3724
+ name?: string;
3725
+
3500
3726
  /**
3501
3727
  * If multiple commits are applicable, the one with the lower priority will apply
3502
3728
  * first.
@@ -3618,11 +3844,21 @@ export interface ContractEditCreditParams {
3618
3844
  */
3619
3845
  applicable_product_tags?: Array<string> | null;
3620
3846
 
3847
+ /**
3848
+ * Updated description for the credit
3849
+ */
3850
+ description?: string;
3851
+
3621
3852
  /**
3622
3853
  * Optional configuration for credit hierarchy access control
3623
3854
  */
3624
3855
  hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
3625
3856
 
3857
+ /**
3858
+ * Updated name for the credit
3859
+ */
3860
+ name?: string;
3861
+
3626
3862
  /**
3627
3863
  * If multiple commits are applicable, the one with the lower priority will apply
3628
3864
  * first.
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '2.1.0'; // x-release-please-version
1
+ export const VERSION = '2.2.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.1.0";
1
+ export declare const VERSION = "2.2.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.1.0";
1
+ export declare const VERSION = "2.2.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '2.1.0'; // x-release-please-version
4
+ exports.VERSION = '2.2.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.1.0'; // x-release-please-version
1
+ export const VERSION = '2.2.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map