orb-billing 5.44.0 → 5.45.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 (265) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/core.d.ts +1 -1
  3. package/core.d.ts.map +1 -1
  4. package/core.js +8 -17
  5. package/core.js.map +1 -1
  6. package/core.mjs +8 -17
  7. package/core.mjs.map +1 -1
  8. package/index.d.mts +91 -5
  9. package/index.d.ts +91 -5
  10. package/index.d.ts.map +1 -1
  11. package/index.js +90 -2
  12. package/index.js.map +1 -1
  13. package/index.mjs +91 -3
  14. package/index.mjs.map +1 -1
  15. package/internal/utils/query.d.ts +2 -0
  16. package/internal/utils/query.d.ts.map +1 -0
  17. package/internal/utils/query.js +33 -0
  18. package/internal/utils/query.js.map +1 -0
  19. package/internal/utils/query.mjs +6 -0
  20. package/internal/utils/query.mjs.map +1 -0
  21. package/package.json +1 -1
  22. package/resources/alerts.d.ts +21 -0
  23. package/resources/alerts.d.ts.map +1 -1
  24. package/resources/alerts.js +6 -0
  25. package/resources/alerts.js.map +1 -1
  26. package/resources/alerts.mjs +6 -0
  27. package/resources/alerts.mjs.map +1 -1
  28. package/resources/beta/beta.d.ts +8293 -140
  29. package/resources/beta/beta.d.ts.map +1 -1
  30. package/resources/beta/beta.js +5 -0
  31. package/resources/beta/beta.js.map +1 -1
  32. package/resources/beta/beta.mjs +5 -0
  33. package/resources/beta/beta.mjs.map +1 -1
  34. package/resources/beta/external-plan-id.d.ts +8293 -140
  35. package/resources/beta/external-plan-id.d.ts.map +1 -1
  36. package/resources/beta/external-plan-id.js +5 -0
  37. package/resources/beta/external-plan-id.js.map +1 -1
  38. package/resources/beta/external-plan-id.mjs +5 -0
  39. package/resources/beta/external-plan-id.mjs.map +1 -1
  40. package/resources/coupons/coupons.d.ts +3 -0
  41. package/resources/coupons/coupons.d.ts.map +1 -1
  42. package/resources/coupons/coupons.js +3 -0
  43. package/resources/coupons/coupons.js.map +1 -1
  44. package/resources/coupons/coupons.mjs +3 -0
  45. package/resources/coupons/coupons.mjs.map +1 -1
  46. package/resources/coupons/subscriptions.d.ts +3 -0
  47. package/resources/coupons/subscriptions.d.ts.map +1 -1
  48. package/resources/coupons/subscriptions.js +3 -0
  49. package/resources/coupons/subscriptions.js.map +1 -1
  50. package/resources/coupons/subscriptions.mjs +3 -0
  51. package/resources/coupons/subscriptions.mjs.map +1 -1
  52. package/resources/credit-blocks.d.ts +85 -1
  53. package/resources/credit-blocks.d.ts.map +1 -1
  54. package/resources/credit-blocks.js +22 -0
  55. package/resources/credit-blocks.js.map +1 -1
  56. package/resources/credit-blocks.mjs +22 -0
  57. package/resources/credit-blocks.mjs.map +1 -1
  58. package/resources/credit-notes.d.ts +4 -0
  59. package/resources/credit-notes.d.ts.map +1 -1
  60. package/resources/credit-notes.js +4 -0
  61. package/resources/credit-notes.js.map +1 -1
  62. package/resources/credit-notes.mjs +4 -0
  63. package/resources/credit-notes.mjs.map +1 -1
  64. package/resources/customers/balance-transactions.d.ts +16 -0
  65. package/resources/customers/balance-transactions.d.ts.map +1 -1
  66. package/resources/customers/balance-transactions.js +16 -0
  67. package/resources/customers/balance-transactions.js.map +1 -1
  68. package/resources/customers/balance-transactions.mjs +16 -0
  69. package/resources/customers/balance-transactions.mjs.map +1 -1
  70. package/resources/customers/costs.d.ts +16 -0
  71. package/resources/customers/costs.d.ts.map +1 -1
  72. package/resources/customers/costs.js +16 -0
  73. package/resources/customers/costs.js.map +1 -1
  74. package/resources/customers/costs.mjs +16 -0
  75. package/resources/customers/costs.mjs.map +1 -1
  76. package/resources/customers/credits/credits.d.ts +39 -0
  77. package/resources/customers/credits/credits.d.ts.map +1 -1
  78. package/resources/customers/credits/credits.js +3 -0
  79. package/resources/customers/credits/credits.js.map +1 -1
  80. package/resources/customers/credits/credits.mjs +3 -0
  81. package/resources/customers/credits/credits.mjs.map +1 -1
  82. package/resources/customers/credits/ledger.d.ts +31 -4
  83. package/resources/customers/credits/ledger.d.ts.map +1 -1
  84. package/resources/customers/credits/ledger.js +19 -2
  85. package/resources/customers/credits/ledger.js.map +1 -1
  86. package/resources/customers/credits/ledger.mjs +19 -2
  87. package/resources/customers/credits/ledger.mjs.map +1 -1
  88. package/resources/customers/credits/top-ups.d.ts +3 -0
  89. package/resources/customers/credits/top-ups.d.ts.map +1 -1
  90. package/resources/customers/credits/top-ups.js +3 -0
  91. package/resources/customers/credits/top-ups.js.map +1 -1
  92. package/resources/customers/credits/top-ups.mjs +3 -0
  93. package/resources/customers/credits/top-ups.mjs.map +1 -1
  94. package/resources/customers/customers.d.ts +33 -12
  95. package/resources/customers/customers.d.ts.map +1 -1
  96. package/resources/customers/customers.js +20 -3
  97. package/resources/customers/customers.js.map +1 -1
  98. package/resources/customers/customers.mjs +20 -3
  99. package/resources/customers/customers.mjs.map +1 -1
  100. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +1 -1
  101. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -1
  102. package/resources/events/backfills.d.ts +5 -0
  103. package/resources/events/backfills.d.ts.map +1 -1
  104. package/resources/events/backfills.js +5 -0
  105. package/resources/events/backfills.js.map +1 -1
  106. package/resources/events/backfills.mjs +5 -0
  107. package/resources/events/backfills.mjs.map +1 -1
  108. package/resources/events/events.d.ts +5 -0
  109. package/resources/events/events.d.ts.map +1 -1
  110. package/resources/events/events.js +5 -0
  111. package/resources/events/events.js.map +1 -1
  112. package/resources/events/events.mjs +5 -0
  113. package/resources/events/events.mjs.map +1 -1
  114. package/resources/events/volume.d.ts +5 -0
  115. package/resources/events/volume.d.ts.map +1 -1
  116. package/resources/events/volume.js +5 -0
  117. package/resources/events/volume.js.map +1 -1
  118. package/resources/events/volume.mjs +5 -0
  119. package/resources/events/volume.mjs.map +1 -1
  120. package/resources/index.d.ts +4 -2
  121. package/resources/index.d.ts.map +1 -1
  122. package/resources/index.js +7 -1
  123. package/resources/index.js.map +1 -1
  124. package/resources/index.mjs +3 -1
  125. package/resources/index.mjs.map +1 -1
  126. package/resources/invoice-line-items.d.ts +6 -0
  127. package/resources/invoice-line-items.d.ts.map +1 -1
  128. package/resources/invoice-line-items.js +6 -0
  129. package/resources/invoice-line-items.js.map +1 -1
  130. package/resources/invoice-line-items.mjs +6 -0
  131. package/resources/invoice-line-items.mjs.map +1 -1
  132. package/resources/invoices.d.ts +432 -7
  133. package/resources/invoices.d.ts.map +1 -1
  134. package/resources/invoices.js +18 -5
  135. package/resources/invoices.js.map +1 -1
  136. package/resources/invoices.mjs +18 -5
  137. package/resources/invoices.mjs.map +1 -1
  138. package/resources/items.d.ts +6 -2
  139. package/resources/items.d.ts.map +1 -1
  140. package/resources/items.js +4 -0
  141. package/resources/items.js.map +1 -1
  142. package/resources/items.mjs +4 -0
  143. package/resources/items.mjs.map +1 -1
  144. package/resources/license-types.d.ts +113 -0
  145. package/resources/license-types.d.ts.map +1 -0
  146. package/resources/license-types.js +44 -0
  147. package/resources/license-types.js.map +1 -0
  148. package/resources/license-types.mjs +39 -0
  149. package/resources/license-types.mjs.map +1 -0
  150. package/resources/licenses/external-licenses.d.ts +114 -0
  151. package/resources/licenses/external-licenses.d.ts.map +1 -0
  152. package/resources/licenses/external-licenses.js +18 -0
  153. package/resources/licenses/external-licenses.js.map +1 -0
  154. package/resources/licenses/external-licenses.mjs +14 -0
  155. package/resources/licenses/external-licenses.mjs.map +1 -0
  156. package/resources/licenses/index.d.ts +4 -0
  157. package/resources/licenses/index.d.ts.map +1 -0
  158. package/resources/licenses/index.js +12 -0
  159. package/resources/licenses/index.js.map +1 -0
  160. package/resources/licenses/index.mjs +5 -0
  161. package/resources/licenses/index.mjs.map +1 -0
  162. package/resources/licenses/licenses.d.ts +133 -0
  163. package/resources/licenses/licenses.d.ts.map +1 -0
  164. package/resources/licenses/licenses.js +86 -0
  165. package/resources/licenses/licenses.js.map +1 -0
  166. package/resources/licenses/licenses.mjs +58 -0
  167. package/resources/licenses/licenses.mjs.map +1 -0
  168. package/resources/licenses/usage.d.ts +211 -0
  169. package/resources/licenses/usage.d.ts.map +1 -0
  170. package/resources/licenses/usage.js +25 -0
  171. package/resources/licenses/usage.js.map +1 -0
  172. package/resources/licenses/usage.mjs +21 -0
  173. package/resources/licenses/usage.mjs.map +1 -0
  174. package/resources/licenses.d.ts +2 -0
  175. package/resources/licenses.d.ts.map +1 -0
  176. package/resources/licenses.js +19 -0
  177. package/resources/licenses.js.map +1 -0
  178. package/resources/licenses.mjs +3 -0
  179. package/resources/licenses.mjs.map +1 -0
  180. package/resources/metrics.d.ts +7 -0
  181. package/resources/metrics.d.ts.map +1 -1
  182. package/resources/metrics.js +4 -0
  183. package/resources/metrics.js.map +1 -1
  184. package/resources/metrics.mjs +4 -0
  185. package/resources/metrics.mjs.map +1 -1
  186. package/resources/plans/external-plan-id.d.ts +5 -0
  187. package/resources/plans/external-plan-id.d.ts.map +1 -1
  188. package/resources/plans/external-plan-id.js +5 -0
  189. package/resources/plans/external-plan-id.js.map +1 -1
  190. package/resources/plans/external-plan-id.mjs +5 -0
  191. package/resources/plans/external-plan-id.mjs.map +1 -1
  192. package/resources/plans/migrations.d.ts +5 -0
  193. package/resources/plans/migrations.d.ts.map +1 -1
  194. package/resources/plans/migrations.js +5 -0
  195. package/resources/plans/migrations.js.map +1 -1
  196. package/resources/plans/migrations.mjs +5 -0
  197. package/resources/plans/migrations.mjs.map +1 -1
  198. package/resources/plans/plans.d.ts +4200 -121
  199. package/resources/plans/plans.d.ts.map +1 -1
  200. package/resources/plans/plans.js +5 -0
  201. package/resources/plans/plans.js.map +1 -1
  202. package/resources/plans/plans.mjs +5 -0
  203. package/resources/plans/plans.mjs.map +1 -1
  204. package/resources/prices/external-price-id.d.ts +9 -0
  205. package/resources/prices/external-price-id.d.ts.map +1 -1
  206. package/resources/prices/external-price-id.js +9 -0
  207. package/resources/prices/external-price-id.js.map +1 -1
  208. package/resources/prices/external-price-id.mjs +9 -0
  209. package/resources/prices/external-price-id.mjs.map +1 -1
  210. package/resources/prices/prices.d.ts +198 -0
  211. package/resources/prices/prices.d.ts.map +1 -1
  212. package/resources/prices/prices.js +9 -0
  213. package/resources/prices/prices.js.map +1 -1
  214. package/resources/prices/prices.mjs +9 -0
  215. package/resources/prices/prices.mjs.map +1 -1
  216. package/resources/shared.d.ts +1040 -6
  217. package/resources/shared.d.ts.map +1 -1
  218. package/resources/shared.js.map +1 -1
  219. package/resources/shared.mjs.map +1 -1
  220. package/resources/subscriptions.d.ts +262 -0
  221. package/resources/subscriptions.d.ts.map +1 -1
  222. package/resources/subscriptions.js.map +1 -1
  223. package/resources/subscriptions.mjs.map +1 -1
  224. package/src/core.ts +10 -21
  225. package/src/index.ts +149 -5
  226. package/src/internal/utils/query.ts +7 -0
  227. package/src/resources/alerts.ts +24 -0
  228. package/src/resources/beta/beta.ts +9945 -194
  229. package/src/resources/beta/external-plan-id.ts +9945 -194
  230. package/src/resources/coupons/coupons.ts +3 -0
  231. package/src/resources/coupons/subscriptions.ts +3 -0
  232. package/src/resources/credit-blocks.ts +110 -1
  233. package/src/resources/credit-notes.ts +4 -0
  234. package/src/resources/customers/balance-transactions.ts +16 -0
  235. package/src/resources/customers/costs.ts +16 -0
  236. package/src/resources/customers/credits/credits.ts +45 -0
  237. package/src/resources/customers/credits/ledger.ts +33 -4
  238. package/src/resources/customers/credits/top-ups.ts +3 -0
  239. package/src/resources/customers/customers.ts +61 -12
  240. package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +1 -1
  241. package/src/resources/events/backfills.ts +5 -0
  242. package/src/resources/events/events.ts +5 -0
  243. package/src/resources/events/volume.ts +5 -0
  244. package/src/resources/index.ts +29 -1
  245. package/src/resources/invoice-line-items.ts +6 -0
  246. package/src/resources/invoices.ts +523 -6
  247. package/src/resources/items.ts +8 -2
  248. package/src/resources/license-types.ts +163 -0
  249. package/src/resources/licenses/external-licenses.ts +147 -0
  250. package/src/resources/licenses/index.ts +27 -0
  251. package/src/resources/licenses/licenses.ts +248 -0
  252. package/src/resources/licenses/usage.ts +280 -0
  253. package/src/resources/licenses.ts +3 -0
  254. package/src/resources/metrics.ts +6 -0
  255. package/src/resources/plans/external-plan-id.ts +5 -0
  256. package/src/resources/plans/migrations.ts +5 -0
  257. package/src/resources/plans/plans.ts +5004 -126
  258. package/src/resources/prices/external-price-id.ts +9 -0
  259. package/src/resources/prices/prices.ts +237 -0
  260. package/src/resources/shared.ts +1213 -0
  261. package/src/resources/subscriptions.ts +311 -0
  262. package/src/version.ts +1 -1
  263. package/version.d.ts +1 -1
  264. package/version.js +1 -1
  265. package/version.mjs +1 -1
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { type Agent } from './_shims/index';
4
- import * as qs from './internal/qs';
4
+ import { stringifyQuery } from './internal/utils/query';
5
5
  import * as Core from './core';
6
6
  import * as Errors from './error';
7
7
  import * as Pagination from './pagination';
@@ -21,7 +21,11 @@ import {
21
21
  AlertsPage,
22
22
  Threshold,
23
23
  } from './resources/alerts';
24
- import { CreditBlockRetrieveResponse, CreditBlocks } from './resources/credit-blocks';
24
+ import {
25
+ CreditBlockListInvoicesResponse,
26
+ CreditBlockRetrieveResponse,
27
+ CreditBlocks,
28
+ } from './resources/credit-blocks';
25
29
  import { CreditNoteCreateParams, CreditNoteListParams, CreditNotes } from './resources/credit-notes';
26
30
  import {
27
31
  InvoiceLineItemCreateParams,
@@ -33,6 +37,8 @@ import {
33
37
  InvoiceFetchUpcomingParams,
34
38
  InvoiceFetchUpcomingResponse,
35
39
  InvoiceIssueParams,
40
+ InvoiceIssueSummaryParams,
41
+ InvoiceIssueSummaryResponse,
36
42
  InvoiceListParams,
37
43
  InvoiceListSummaryParams,
38
44
  InvoiceListSummaryResponse,
@@ -49,6 +55,15 @@ import {
49
55
  Items,
50
56
  ItemsPage,
51
57
  } from './resources/items';
58
+ import {
59
+ LicenseTypeCreateParams,
60
+ LicenseTypeCreateResponse,
61
+ LicenseTypeListParams,
62
+ LicenseTypeListResponse,
63
+ LicenseTypeListResponsesPage,
64
+ LicenseTypeRetrieveResponse,
65
+ LicenseTypes,
66
+ } from './resources/license-types';
52
67
  import {
53
68
  BillableMetric,
54
69
  BillableMetricsPage,
@@ -167,6 +182,19 @@ import {
167
182
  EventUpdateResponse,
168
183
  Events,
169
184
  } from './resources/events/events';
185
+ import {
186
+ LicenseCreateParams,
187
+ LicenseCreateResponse,
188
+ LicenseDeactivateParams,
189
+ LicenseDeactivateResponse,
190
+ LicenseListParams,
191
+ LicenseListResponse,
192
+ LicenseListResponsesPage,
193
+ LicenseRetrieveByExternalIDParams,
194
+ LicenseRetrieveByExternalIDResponse,
195
+ LicenseRetrieveResponse,
196
+ Licenses,
197
+ } from './resources/licenses/licenses';
170
198
  import {
171
199
  Plan,
172
200
  PlanCreateParams,
@@ -317,23 +345,105 @@ export class Orb extends Core.APIClient {
317
345
  }
318
346
 
319
347
  topLevel: API.TopLevel = new API.TopLevel(this);
348
+ /**
349
+ * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
350
+ * customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
351
+ * in the [Price resource](/reference/price).
352
+ */
320
353
  beta: API.Beta = new API.Beta(this);
354
+ /**
355
+ * A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users.
356
+ */
321
357
  coupons: API.Coupons = new API.Coupons(this);
358
+ /**
359
+ * The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a
360
+ * particular invoice.
361
+ */
322
362
  creditNotes: API.CreditNotes = new API.CreditNotes(this);
363
+ /**
364
+ * A customer is a buyer of your products, and the other party to the billing relationship.
365
+ *
366
+ * In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these
367
+ * match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an
368
+ * `external_customer_id` with your own identifier. See
369
+ * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these
370
+ * aliases work in Orb.
371
+ *
372
+ * In addition to having an identifier in your system, a customer may exist in a payment provider solution like
373
+ * Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping.
374
+ *
375
+ * A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which
376
+ * defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for
377
+ * information on what this timezone parameter influences within Orb.
378
+ */
323
379
  customers: API.Customers = new API.Customers(this);
380
+ /**
381
+ * The [Event](/core-concepts#event) resource represents a usage event that has been created for a
382
+ * customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for
383
+ * a given billing period.
384
+ */
324
385
  events: API.Events = new API.Events(this);
386
+ /**
387
+ * An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for
388
+ * a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and
389
+ * can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as
390
+ * the result of an action, such as a cancellation.
391
+ */
325
392
  invoiceLineItems: API.InvoiceLineItems = new API.InvoiceLineItems(this);
393
+ /**
394
+ * An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for
395
+ * a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and
396
+ * can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as
397
+ * the result of an action, such as a cancellation.
398
+ */
326
399
  invoices: API.Invoices = new API.Invoices(this);
400
+ /**
401
+ * The Item resource represents a sellable product or good. Items are associated with all line items, billable metrics,
402
+ * and prices and are used for defining external sync behavior for invoices and tax calculation purposes.
403
+ */
327
404
  items: API.Items = new API.Items(this);
405
+ /**
406
+ * The Metric resource represents a calculation of a quantity based on events.
407
+ * Metrics are defined by the query that transforms raw usage events into meaningful values for your customers.
408
+ */
328
409
  metrics: API.Metrics = new API.Metrics(this);
410
+ /**
411
+ * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
412
+ * customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
413
+ * in the [Price resource](/reference/price).
414
+ */
329
415
  plans: API.Plans = new API.Plans(this);
416
+ /**
417
+ * The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in
418
+ * the form of an invoice line item. Prices take a quantity and determine an amount to bill.
419
+ *
420
+ * Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a
421
+ * given Price object. The model_type field determines the key for the configuration object that is present.
422
+ *
423
+ * For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price)
424
+ */
330
425
  prices: API.Prices = new API.Prices(this);
331
426
  subscriptions: API.Subscriptions = new API.Subscriptions(this);
332
427
  webhooks: API.Webhooks = new API.Webhooks(this);
428
+ /**
429
+ * [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
430
+ * usage, or credit balance and trigger webhooks when a threshold is exceeded.
431
+ *
432
+ * Alerts created through the API can be scoped to either customers or subscriptions.
433
+ */
333
434
  alerts: API.Alerts = new API.Alerts(this);
334
435
  dimensionalPriceGroups: API.DimensionalPriceGroups = new API.DimensionalPriceGroups(this);
335
436
  subscriptionChanges: API.SubscriptionChanges = new API.SubscriptionChanges(this);
437
+ /**
438
+ * The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
439
+ */
336
440
  creditBlocks: API.CreditBlocks = new API.CreditBlocks(this);
441
+ /**
442
+ * The LicenseType resource represents a type of license that can be assigned to users.
443
+ * License types are used during billing by grouping metrics on the configured grouping key.
444
+ */
445
+ licenseTypes: API.LicenseTypes = new API.LicenseTypes(this);
446
+ licenses: API.Licenses = new API.Licenses(this);
337
447
 
338
448
  /**
339
449
  * Check whether the base URL is set to its default.
@@ -357,8 +467,8 @@ export class Orb extends Core.APIClient {
357
467
  return { Authorization: `Bearer ${this.apiKey}` };
358
468
  }
359
469
 
360
- protected override stringifyQuery(query: Record<string, unknown>): string {
361
- return qs.stringify(query, { arrayFormat: 'brackets' });
470
+ protected override stringifyQuery(query: object | Record<string, unknown>): string {
471
+ return stringifyQuery(query);
362
472
  }
363
473
 
364
474
  static Orb = this;
@@ -420,6 +530,10 @@ Orb.DimensionalPriceGroupsPage = DimensionalPriceGroupsPage;
420
530
  Orb.SubscriptionChanges = SubscriptionChanges;
421
531
  Orb.SubscriptionChangeListResponsesPage = SubscriptionChangeListResponsesPage;
422
532
  Orb.CreditBlocks = CreditBlocks;
533
+ Orb.LicenseTypes = LicenseTypes;
534
+ Orb.LicenseTypeListResponsesPage = LicenseTypeListResponsesPage;
535
+ Orb.Licenses = Licenses;
536
+ Orb.LicenseListResponsesPage = LicenseListResponsesPage;
423
537
 
424
538
  export declare namespace Orb {
425
539
  export type RequestOptions = Core.RequestOptions;
@@ -489,6 +603,7 @@ export declare namespace Orb {
489
603
  export {
490
604
  Invoices as Invoices,
491
605
  type InvoiceFetchUpcomingResponse as InvoiceFetchUpcomingResponse,
606
+ type InvoiceIssueSummaryResponse as InvoiceIssueSummaryResponse,
492
607
  type InvoiceListSummaryResponse as InvoiceListSummaryResponse,
493
608
  InvoiceListSummaryResponsesPage as InvoiceListSummaryResponsesPage,
494
609
  type InvoiceCreateParams as InvoiceCreateParams,
@@ -496,6 +611,7 @@ export declare namespace Orb {
496
611
  type InvoiceListParams as InvoiceListParams,
497
612
  type InvoiceFetchUpcomingParams as InvoiceFetchUpcomingParams,
498
613
  type InvoiceIssueParams as InvoiceIssueParams,
614
+ type InvoiceIssueSummaryParams as InvoiceIssueSummaryParams,
499
615
  type InvoiceListSummaryParams as InvoiceListSummaryParams,
500
616
  type InvoiceMarkPaidParams as InvoiceMarkPaidParams,
501
617
  };
@@ -626,7 +742,35 @@ export declare namespace Orb {
626
742
  type SubscriptionChangeApplyParams as SubscriptionChangeApplyParams,
627
743
  };
628
744
 
629
- export { CreditBlocks as CreditBlocks, type CreditBlockRetrieveResponse as CreditBlockRetrieveResponse };
745
+ export {
746
+ CreditBlocks as CreditBlocks,
747
+ type CreditBlockRetrieveResponse as CreditBlockRetrieveResponse,
748
+ type CreditBlockListInvoicesResponse as CreditBlockListInvoicesResponse,
749
+ };
750
+
751
+ export {
752
+ LicenseTypes as LicenseTypes,
753
+ type LicenseTypeCreateResponse as LicenseTypeCreateResponse,
754
+ type LicenseTypeRetrieveResponse as LicenseTypeRetrieveResponse,
755
+ type LicenseTypeListResponse as LicenseTypeListResponse,
756
+ LicenseTypeListResponsesPage as LicenseTypeListResponsesPage,
757
+ type LicenseTypeCreateParams as LicenseTypeCreateParams,
758
+ type LicenseTypeListParams as LicenseTypeListParams,
759
+ };
760
+
761
+ export {
762
+ Licenses as Licenses,
763
+ type LicenseCreateResponse as LicenseCreateResponse,
764
+ type LicenseRetrieveResponse as LicenseRetrieveResponse,
765
+ type LicenseListResponse as LicenseListResponse,
766
+ type LicenseDeactivateResponse as LicenseDeactivateResponse,
767
+ type LicenseRetrieveByExternalIDResponse as LicenseRetrieveByExternalIDResponse,
768
+ LicenseListResponsesPage as LicenseListResponsesPage,
769
+ type LicenseCreateParams as LicenseCreateParams,
770
+ type LicenseListParams as LicenseListParams,
771
+ type LicenseDeactivateParams as LicenseDeactivateParams,
772
+ type LicenseRetrieveByExternalIDParams as LicenseRetrieveByExternalIDParams,
773
+ };
630
774
 
631
775
  export type Address = API.Address;
632
776
  export type AdjustmentInterval = API.AdjustmentInterval;
@@ -0,0 +1,7 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import * as qs from '../qs/stringify';
4
+
5
+ export function stringifyQuery(query: object | Record<string, unknown>) {
6
+ return qs.stringify(query, { arrayFormat: 'brackets' });
7
+ }
@@ -6,6 +6,12 @@ import * as Core from '../core';
6
6
  import * as Shared from './shared';
7
7
  import { Page, type PageParams } from '../pagination';
8
8
 
9
+ /**
10
+ * [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
11
+ * usage, or credit balance and trigger webhooks when a threshold is exceeded.
12
+ *
13
+ * Alerts created through the API can be scoped to either customers or subscriptions.
14
+ */
9
15
  export class Alerts extends APIResource {
10
16
  /**
11
17
  * This endpoint retrieves an alert by its ID.
@@ -233,6 +239,12 @@ export interface Alert {
233
239
  */
234
240
  balance_alert_status?: Array<Alert.BalanceAlertStatus> | null;
235
241
 
242
+ /**
243
+ * The property keys to group cost alerts by. Only present for cost alerts with
244
+ * grouping enabled.
245
+ */
246
+ grouping_keys?: Array<string> | null;
247
+
236
248
  /**
237
249
  * Minified license type for alert serialization.
238
250
  */
@@ -378,10 +390,22 @@ export interface AlertCreateForSubscriptionParams {
378
390
  */
379
391
  type: 'usage_exceeded' | 'cost_exceeded';
380
392
 
393
+ /**
394
+ * The property keys to group cost alerts by. Only applicable for cost_exceeded
395
+ * alerts.
396
+ */
397
+ grouping_keys?: Array<string> | null;
398
+
381
399
  /**
382
400
  * The metric to track usage for.
383
401
  */
384
402
  metric_id?: string | null;
403
+
404
+ /**
405
+ * The pricing unit to use for grouped cost alerts. Required when grouping_keys is
406
+ * set.
407
+ */
408
+ pricing_unit_id?: string | null;
385
409
  }
386
410
 
387
411
  export interface AlertDisableParams {