orb-billing 4.74.0 → 5.1.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 (166) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/core.d.ts +7 -4
  3. package/core.d.ts.map +1 -1
  4. package/core.js +16 -9
  5. package/core.js.map +1 -1
  6. package/core.mjs +16 -9
  7. package/core.mjs.map +1 -1
  8. package/index.d.mts +151 -14
  9. package/index.d.ts +151 -14
  10. package/index.d.ts.map +1 -1
  11. package/index.js +6 -5
  12. package/index.js.map +1 -1
  13. package/index.mjs +9 -8
  14. package/index.mjs.map +1 -1
  15. package/package.json +1 -1
  16. package/resource.d.ts +1 -1
  17. package/resource.d.ts.map +1 -1
  18. package/resource.js.map +1 -1
  19. package/resource.mjs.map +1 -1
  20. package/resources/alerts.d.ts +20 -88
  21. package/resources/alerts.d.ts.map +1 -1
  22. package/resources/alerts.js.map +1 -1
  23. package/resources/alerts.mjs.map +1 -1
  24. package/resources/beta/beta.d.ts +9 -7313
  25. package/resources/beta/beta.d.ts.map +1 -1
  26. package/resources/beta/beta.js.map +1 -1
  27. package/resources/beta/beta.mjs.map +1 -1
  28. package/resources/beta/external-plan-id.d.ts +7 -7074
  29. package/resources/beta/external-plan-id.d.ts.map +1 -1
  30. package/resources/beta/external-plan-id.js.map +1 -1
  31. package/resources/beta/external-plan-id.mjs.map +1 -1
  32. package/resources/credit-notes.d.ts +64 -164
  33. package/resources/credit-notes.d.ts.map +1 -1
  34. package/resources/credit-notes.js +28 -6
  35. package/resources/credit-notes.js.map +1 -1
  36. package/resources/credit-notes.mjs +27 -4
  37. package/resources/credit-notes.mjs.map +1 -1
  38. package/resources/customers/balance-transactions.d.ts +5 -32
  39. package/resources/customers/balance-transactions.d.ts.map +1 -1
  40. package/resources/customers/balance-transactions.js.map +1 -1
  41. package/resources/customers/balance-transactions.mjs.map +1 -1
  42. package/resources/customers/costs.d.ts +19 -97
  43. package/resources/customers/costs.d.ts.map +1 -1
  44. package/resources/customers/credits/credits.d.ts +4 -4
  45. package/resources/customers/credits/credits.d.ts.map +1 -1
  46. package/resources/customers/credits/credits.js.map +1 -1
  47. package/resources/customers/credits/credits.mjs.map +1 -1
  48. package/resources/customers/credits/index.d.ts +2 -2
  49. package/resources/customers/credits/index.d.ts.map +1 -1
  50. package/resources/customers/credits/index.js.map +1 -1
  51. package/resources/customers/credits/index.mjs.map +1 -1
  52. package/resources/customers/credits/ledger.d.ts +239 -984
  53. package/resources/customers/credits/ledger.d.ts.map +1 -1
  54. package/resources/customers/credits/ledger.js.map +1 -1
  55. package/resources/customers/credits/ledger.mjs.map +1 -1
  56. package/resources/customers/credits/top-ups.d.ts +29 -121
  57. package/resources/customers/credits/top-ups.d.ts.map +1 -1
  58. package/resources/customers/credits/top-ups.js.map +1 -1
  59. package/resources/customers/credits/top-ups.mjs.map +1 -1
  60. package/resources/customers/customers.d.ts +84 -682
  61. package/resources/customers/customers.d.ts.map +1 -1
  62. package/resources/customers/customers.js.map +1 -1
  63. package/resources/customers/customers.mjs.map +1 -1
  64. package/resources/customers/index.d.ts +1 -1
  65. package/resources/customers/index.d.ts.map +1 -1
  66. package/resources/customers/index.js.map +1 -1
  67. package/resources/customers/index.mjs.map +1 -1
  68. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +6 -2
  69. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -1
  70. package/resources/events/backfills.d.ts +2 -2
  71. package/resources/events/events.d.ts +9 -3
  72. package/resources/events/events.d.ts.map +1 -1
  73. package/resources/index.d.ts +7 -7
  74. package/resources/index.d.ts.map +1 -1
  75. package/resources/index.js +1 -4
  76. package/resources/index.js.map +1 -1
  77. package/resources/index.mjs +3 -3
  78. package/resources/index.mjs.map +1 -1
  79. package/resources/invoice-line-items.d.ts +9 -395
  80. package/resources/invoice-line-items.d.ts.map +1 -1
  81. package/resources/invoice-line-items.js.map +1 -1
  82. package/resources/invoice-line-items.mjs.map +1 -1
  83. package/resources/invoices.d.ts +43 -1704
  84. package/resources/invoices.d.ts.map +1 -1
  85. package/resources/invoices.js +4 -7
  86. package/resources/invoices.js.map +1 -1
  87. package/resources/invoices.mjs +3 -5
  88. package/resources/invoices.mjs.map +1 -1
  89. package/resources/items.d.ts +9 -3
  90. package/resources/items.d.ts.map +1 -1
  91. package/resources/metrics.d.ts +9 -3
  92. package/resources/metrics.d.ts.map +1 -1
  93. package/resources/plans/external-plan-id.d.ts +3 -1
  94. package/resources/plans/external-plan-id.d.ts.map +1 -1
  95. package/resources/plans/plans.d.ts +47 -3783
  96. package/resources/plans/plans.d.ts.map +1 -1
  97. package/resources/plans/plans.js.map +1 -1
  98. package/resources/plans/plans.mjs.map +1 -1
  99. package/resources/prices/external-price-id.d.ts +6 -4
  100. package/resources/prices/external-price-id.d.ts.map +1 -1
  101. package/resources/prices/index.d.ts +1 -1
  102. package/resources/prices/index.d.ts.map +1 -1
  103. package/resources/prices/index.js +1 -2
  104. package/resources/prices/index.js.map +1 -1
  105. package/resources/prices/index.mjs +1 -1
  106. package/resources/prices/index.mjs.map +1 -1
  107. package/resources/prices/prices.d.ts +505 -9417
  108. package/resources/prices/prices.d.ts.map +1 -1
  109. package/resources/prices/prices.js +39 -20
  110. package/resources/prices/prices.js.map +1 -1
  111. package/resources/prices/prices.mjs +38 -18
  112. package/resources/prices/prices.mjs.map +1 -1
  113. package/resources/shared.d.ts +7894 -9
  114. package/resources/shared.d.ts.map +1 -1
  115. package/resources/shared.js +11 -0
  116. package/resources/shared.js.map +1 -1
  117. package/resources/shared.mjs +7 -1
  118. package/resources/shared.mjs.map +1 -1
  119. package/resources/subscription-changes.d.ts +140 -2158
  120. package/resources/subscription-changes.d.ts.map +1 -1
  121. package/resources/subscription-changes.js.map +1 -1
  122. package/resources/subscription-changes.mjs.map +1 -1
  123. package/resources/subscriptions.d.ts +2646 -27141
  124. package/resources/subscriptions.d.ts.map +1 -1
  125. package/resources/subscriptions.js +2 -2
  126. package/resources/subscriptions.js.map +1 -1
  127. package/resources/subscriptions.mjs +2 -2
  128. package/resources/subscriptions.mjs.map +1 -1
  129. package/src/core.ts +17 -8
  130. package/src/index.ts +229 -42
  131. package/src/resource.ts +1 -1
  132. package/src/resources/alerts.ts +20 -94
  133. package/src/resources/beta/beta.ts +124 -8892
  134. package/src/resources/beta/external-plan-id.ts +118 -8593
  135. package/src/resources/credit-notes.ts +67 -216
  136. package/src/resources/customers/balance-transactions.ts +5 -36
  137. package/src/resources/customers/costs.ts +19 -117
  138. package/src/resources/customers/credits/credits.ts +18 -0
  139. package/src/resources/customers/credits/index.ts +9 -0
  140. package/src/resources/customers/credits/ledger.ts +259 -1468
  141. package/src/resources/customers/credits/top-ups.ts +33 -136
  142. package/src/resources/customers/customers.ts +165 -1457
  143. package/src/resources/customers/index.ts +8 -0
  144. package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +2 -2
  145. package/src/resources/events/backfills.ts +2 -2
  146. package/src/resources/events/events.ts +3 -3
  147. package/src/resources/index.ts +42 -22
  148. package/src/resources/invoice-line-items.ts +13 -501
  149. package/src/resources/invoices.ts +65 -2396
  150. package/src/resources/items.ts +3 -3
  151. package/src/resources/metrics.ts +3 -3
  152. package/src/resources/plans/external-plan-id.ts +1 -1
  153. package/src/resources/plans/plans.ts +81 -4563
  154. package/src/resources/prices/external-price-id.ts +4 -4
  155. package/src/resources/prices/index.ts +2 -2
  156. package/src/resources/prices/prices.ts +561 -11851
  157. package/src/resources/shared.ts +9991 -22
  158. package/src/resources/subscription-changes.ts +171 -2670
  159. package/src/resources/subscriptions.ts +3246 -32984
  160. package/src/version.ts +1 -1
  161. package/version.d.ts +1 -1
  162. package/version.d.ts.map +1 -1
  163. package/version.js +1 -1
  164. package/version.js.map +1 -1
  165. package/version.mjs +1 -1
  166. package/version.mjs.map +1 -1
@@ -27,7 +27,15 @@ export {
27
27
  export {
28
28
  CustomersPage,
29
29
  Customers,
30
+ type AccountingProviderConfig,
31
+ type AddressInput,
30
32
  type Customer,
33
+ type CustomerHierarchyConfig,
34
+ type NewAccountingSyncConfiguration,
35
+ type NewAvalaraTaxConfiguration,
36
+ type NewReportingConfiguration,
37
+ type NewSphereConfiguration,
38
+ type NewTaxJarConfiguration,
31
39
  type CustomerCreateParams,
32
40
  type CustomerUpdateParams,
33
41
  type CustomerListParams,
@@ -94,7 +94,7 @@ export interface DimensionalPriceGroup {
94
94
  * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
95
95
  * `null`.
96
96
  */
97
- metadata: Record<string, string>;
97
+ metadata: { [key: string]: string };
98
98
 
99
99
  /**
100
100
  * The name of the dimensional price group
@@ -125,7 +125,7 @@ export interface DimensionalPriceGroupCreateParams {
125
125
  * by setting the value to `null`, and the entire metadata mapping can be cleared
126
126
  * by setting `metadata` to `null`.
127
127
  */
128
- metadata?: Record<string, string | null> | null;
128
+ metadata?: { [key: string]: string | null } | null;
129
129
  }
130
130
 
131
131
  export interface DimensionalPriceGroupListParams extends PageParams {}
@@ -384,14 +384,14 @@ export interface BackfillRevertResponse {
384
384
  export interface BackfillCreateParams {
385
385
  /**
386
386
  * The (exclusive) end of the usage timeframe affected by this backfill. By
387
- * default, Orb allows backfills up to 10 days in duration at a time. Reach out to
387
+ * default, Orb allows backfills up to 31 days in duration at a time. Reach out to
388
388
  * discuss extending this limit and your use case.
389
389
  */
390
390
  timeframe_end: string;
391
391
 
392
392
  /**
393
393
  * The (inclusive) start of the usage timeframe affected by this backfill. By
394
- * default, Orb allows backfills up to 10 days in duration at a time. Reach out to
394
+ * default, Orb allows backfills up to 31 days in duration at a time. Reach out to
395
395
  * discuss extending this limit and your use case.
396
396
  */
397
397
  timeframe_start: string;
@@ -451,7 +451,7 @@ export namespace EventSearchResponse {
451
451
  * A dictionary of custom properties. Values in this dictionary must be numeric,
452
452
  * boolean, or strings. Nested dictionaries are disallowed.
453
453
  */
454
- properties: Record<string, unknown>;
454
+ properties: { [key: string]: unknown };
455
455
 
456
456
  /**
457
457
  * An ISO 8601 format date with no timezone offset (i.e. UTC). This should
@@ -472,7 +472,7 @@ export interface EventUpdateParams {
472
472
  * A dictionary of custom properties. Values in this dictionary must be numeric,
473
473
  * boolean, or strings. Nested dictionaries are disallowed.
474
474
  */
475
- properties: Record<string, unknown>;
475
+ properties: { [key: string]: unknown };
476
476
 
477
477
  /**
478
478
  * An ISO 8601 format date with no timezone offset (i.e. UTC). This should
@@ -530,7 +530,7 @@ export namespace EventIngestParams {
530
530
  * A dictionary of custom properties. Values in this dictionary must be numeric,
531
531
  * boolean, or strings. Nested dictionaries are disallowed.
532
532
  */
533
- properties: Record<string, unknown>;
533
+ properties: { [key: string]: unknown };
534
534
 
535
535
  /**
536
536
  * An ISO 8601 format date with no timezone offset (i.e. UTC). This should
@@ -5,6 +5,7 @@ export {
5
5
  AlertsPage,
6
6
  Alerts,
7
7
  type Alert,
8
+ type Threshold,
8
9
  type AlertUpdateParams,
9
10
  type AlertListParams,
10
11
  type AlertCreateForCustomerParams,
@@ -35,17 +36,19 @@ export {
35
36
  type CouponCreateParams,
36
37
  type CouponListParams,
37
38
  } from './coupons/coupons';
38
- export {
39
- CreditNotesPage,
40
- CreditNotes,
41
- type CreditNote,
42
- type CreditNoteCreateParams,
43
- type CreditNoteListParams,
44
- } from './credit-notes';
39
+ export { CreditNotes, type CreditNoteCreateParams, type CreditNoteListParams } from './credit-notes';
45
40
  export {
46
41
  CustomersPage,
47
42
  Customers,
43
+ type AccountingProviderConfig,
44
+ type AddressInput,
48
45
  type Customer,
46
+ type CustomerHierarchyConfig,
47
+ type NewAccountingSyncConfiguration,
48
+ type NewAvalaraTaxConfiguration,
49
+ type NewReportingConfiguration,
50
+ type NewSphereConfiguration,
51
+ type NewTaxJarConfiguration,
49
52
  type CustomerCreateParams,
50
53
  type CustomerUpdateParams,
51
54
  type CustomerListParams,
@@ -74,9 +77,7 @@ export {
74
77
  type InvoiceLineItemCreateParams,
75
78
  } from './invoice-line-items';
76
79
  export {
77
- InvoicesPage,
78
80
  Invoices,
79
- type Invoice,
80
81
  type InvoiceFetchUpcomingResponse,
81
82
  type InvoiceCreateParams,
82
83
  type InvoiceUpdateParams,
@@ -102,20 +103,21 @@ export {
102
103
  type PlanListParams,
103
104
  } from './plans/plans';
104
105
  export {
105
- PricesPage,
106
106
  Prices,
107
107
  type EvaluatePriceGroup,
108
- type Price,
109
108
  type PriceEvaluateResponse,
110
109
  type PriceEvaluateMultipleResponse,
110
+ type PriceEvaluatePreviewEventsResponse,
111
111
  type PriceCreateParams,
112
112
  type PriceUpdateParams,
113
113
  type PriceListParams,
114
114
  type PriceEvaluateParams,
115
115
  type PriceEvaluateMultipleParams,
116
+ type PriceEvaluatePreviewEventsParams,
116
117
  } from './prices/prices';
117
118
  export {
118
119
  SubscriptionChanges,
120
+ type MutatedSubscription,
119
121
  type SubscriptionChangeRetrieveResponse,
120
122
  type SubscriptionChangeApplyResponse,
121
123
  type SubscriptionChangeCancelResponse,
@@ -125,21 +127,39 @@ export {
125
127
  SubscriptionsPage,
126
128
  SubscriptionFetchScheduleResponsesPage,
127
129
  Subscriptions,
130
+ type DiscountOverride,
131
+ type NewSubscriptionBPSPrice,
132
+ type NewSubscriptionBulkBPSPrice,
133
+ type NewSubscriptionBulkPrice,
134
+ type NewSubscriptionBulkWithProrationPrice,
135
+ type NewSubscriptionCumulativeGroupedBulkPrice,
136
+ type NewSubscriptionGroupedAllocationPrice,
137
+ type NewSubscriptionGroupedTieredPackagePrice,
138
+ type NewSubscriptionGroupedTieredPrice,
139
+ type NewSubscriptionGroupedWithMeteredMinimumPrice,
140
+ type NewSubscriptionGroupedWithProratedMinimumPrice,
141
+ type NewSubscriptionMatrixPrice,
142
+ type NewSubscriptionMatrixWithAllocationPrice,
143
+ type NewSubscriptionMatrixWithDisplayNamePrice,
144
+ type NewSubscriptionMaxGroupTieredPackagePrice,
145
+ type NewSubscriptionPackagePrice,
146
+ type NewSubscriptionPackageWithAllocationPrice,
147
+ type NewSubscriptionScalableMatrixWithTieredPricingPrice,
148
+ type NewSubscriptionScalableMatrixWithUnitPricingPrice,
149
+ type NewSubscriptionThresholdTotalAmountPrice,
150
+ type NewSubscriptionTierWithProrationPrice,
151
+ type NewSubscriptionTieredBPSPrice,
152
+ type NewSubscriptionTieredPackagePrice,
153
+ type NewSubscriptionTieredPackageWithMinimumPrice,
154
+ type NewSubscriptionTieredPrice,
155
+ type NewSubscriptionTieredWithMinimumPrice,
156
+ type NewSubscriptionUnitPrice,
157
+ type NewSubscriptionUnitWithPercentPrice,
158
+ type NewSubscriptionUnitWithProrationPrice,
128
159
  type Subscription,
129
160
  type SubscriptionUsage,
130
- type SubscriptionCreateResponse,
131
- type SubscriptionCancelResponse,
132
161
  type SubscriptionFetchCostsResponse,
133
162
  type SubscriptionFetchScheduleResponse,
134
- type SubscriptionPriceIntervalsResponse,
135
- type SubscriptionRedeemCouponResponse,
136
- type SubscriptionSchedulePlanChangeResponse,
137
- type SubscriptionTriggerPhaseResponse,
138
- type SubscriptionUnscheduleCancellationResponse,
139
- type SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse,
140
- type SubscriptionUnschedulePendingPlanChangesResponse,
141
- type SubscriptionUpdateFixedFeeQuantityResponse,
142
- type SubscriptionUpdateTrialResponse,
143
163
  type SubscriptionCreateParams,
144
164
  type SubscriptionUpdateParams,
145
165
  type SubscriptionListParams,