orb-billing 5.44.0 → 5.46.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 +52 -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 +57 -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 +443 -10
  133. package/resources/invoices.d.ts.map +1 -1
  134. package/resources/invoices.js +24 -9
  135. package/resources/invoices.js.map +1 -1
  136. package/resources/invoices.mjs +24 -9
  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 +151 -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 +89 -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 +30 -1
  245. package/src/resources/invoice-line-items.ts +6 -0
  246. package/src/resources/invoices.ts +541 -10
  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,11 +37,14 @@ import {
33
37
  InvoiceFetchUpcomingParams,
34
38
  InvoiceFetchUpcomingResponse,
35
39
  InvoiceIssueParams,
40
+ InvoiceIssueSummaryParams,
41
+ InvoiceIssueSummaryResponse,
36
42
  InvoiceListParams,
37
43
  InvoiceListSummaryParams,
38
44
  InvoiceListSummaryResponse,
39
45
  InvoiceListSummaryResponsesPage,
40
46
  InvoiceMarkPaidParams,
47
+ InvoicePayParams,
41
48
  InvoiceUpdateParams,
42
49
  Invoices,
43
50
  } from './resources/invoices';
@@ -49,6 +56,15 @@ import {
49
56
  Items,
50
57
  ItemsPage,
51
58
  } from './resources/items';
59
+ import {
60
+ LicenseTypeCreateParams,
61
+ LicenseTypeCreateResponse,
62
+ LicenseTypeListParams,
63
+ LicenseTypeListResponse,
64
+ LicenseTypeListResponsesPage,
65
+ LicenseTypeRetrieveResponse,
66
+ LicenseTypes,
67
+ } from './resources/license-types';
52
68
  import {
53
69
  BillableMetric,
54
70
  BillableMetricsPage,
@@ -167,6 +183,19 @@ import {
167
183
  EventUpdateResponse,
168
184
  Events,
169
185
  } from './resources/events/events';
186
+ import {
187
+ LicenseCreateParams,
188
+ LicenseCreateResponse,
189
+ LicenseDeactivateParams,
190
+ LicenseDeactivateResponse,
191
+ LicenseListParams,
192
+ LicenseListResponse,
193
+ LicenseListResponsesPage,
194
+ LicenseRetrieveByExternalIDParams,
195
+ LicenseRetrieveByExternalIDResponse,
196
+ LicenseRetrieveResponse,
197
+ Licenses,
198
+ } from './resources/licenses/licenses';
170
199
  import {
171
200
  Plan,
172
201
  PlanCreateParams,
@@ -317,23 +346,105 @@ export class Orb extends Core.APIClient {
317
346
  }
318
347
 
319
348
  topLevel: API.TopLevel = new API.TopLevel(this);
349
+ /**
350
+ * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
351
+ * customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
352
+ * in the [Price resource](/reference/price).
353
+ */
320
354
  beta: API.Beta = new API.Beta(this);
355
+ /**
356
+ * 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.
357
+ */
321
358
  coupons: API.Coupons = new API.Coupons(this);
359
+ /**
360
+ * The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a
361
+ * particular invoice.
362
+ */
322
363
  creditNotes: API.CreditNotes = new API.CreditNotes(this);
364
+ /**
365
+ * A customer is a buyer of your products, and the other party to the billing relationship.
366
+ *
367
+ * In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these
368
+ * match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an
369
+ * `external_customer_id` with your own identifier. See
370
+ * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these
371
+ * aliases work in Orb.
372
+ *
373
+ * In addition to having an identifier in your system, a customer may exist in a payment provider solution like
374
+ * Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping.
375
+ *
376
+ * A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which
377
+ * defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for
378
+ * information on what this timezone parameter influences within Orb.
379
+ */
323
380
  customers: API.Customers = new API.Customers(this);
381
+ /**
382
+ * The [Event](/core-concepts#event) resource represents a usage event that has been created for a
383
+ * customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for
384
+ * a given billing period.
385
+ */
324
386
  events: API.Events = new API.Events(this);
387
+ /**
388
+ * An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for
389
+ * a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and
390
+ * can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as
391
+ * the result of an action, such as a cancellation.
392
+ */
325
393
  invoiceLineItems: API.InvoiceLineItems = new API.InvoiceLineItems(this);
394
+ /**
395
+ * An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for
396
+ * a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and
397
+ * can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as
398
+ * the result of an action, such as a cancellation.
399
+ */
326
400
  invoices: API.Invoices = new API.Invoices(this);
401
+ /**
402
+ * The Item resource represents a sellable product or good. Items are associated with all line items, billable metrics,
403
+ * and prices and are used for defining external sync behavior for invoices and tax calculation purposes.
404
+ */
327
405
  items: API.Items = new API.Items(this);
406
+ /**
407
+ * The Metric resource represents a calculation of a quantity based on events.
408
+ * Metrics are defined by the query that transforms raw usage events into meaningful values for your customers.
409
+ */
328
410
  metrics: API.Metrics = new API.Metrics(this);
411
+ /**
412
+ * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
413
+ * customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
414
+ * in the [Price resource](/reference/price).
415
+ */
329
416
  plans: API.Plans = new API.Plans(this);
417
+ /**
418
+ * The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in
419
+ * the form of an invoice line item. Prices take a quantity and determine an amount to bill.
420
+ *
421
+ * Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a
422
+ * given Price object. The model_type field determines the key for the configuration object that is present.
423
+ *
424
+ * For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price)
425
+ */
330
426
  prices: API.Prices = new API.Prices(this);
331
427
  subscriptions: API.Subscriptions = new API.Subscriptions(this);
332
428
  webhooks: API.Webhooks = new API.Webhooks(this);
429
+ /**
430
+ * [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
431
+ * usage, or credit balance and trigger webhooks when a threshold is exceeded.
432
+ *
433
+ * Alerts created through the API can be scoped to either customers or subscriptions.
434
+ */
333
435
  alerts: API.Alerts = new API.Alerts(this);
334
436
  dimensionalPriceGroups: API.DimensionalPriceGroups = new API.DimensionalPriceGroups(this);
335
437
  subscriptionChanges: API.SubscriptionChanges = new API.SubscriptionChanges(this);
438
+ /**
439
+ * The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
440
+ */
336
441
  creditBlocks: API.CreditBlocks = new API.CreditBlocks(this);
442
+ /**
443
+ * The LicenseType resource represents a type of license that can be assigned to users.
444
+ * License types are used during billing by grouping metrics on the configured grouping key.
445
+ */
446
+ licenseTypes: API.LicenseTypes = new API.LicenseTypes(this);
447
+ licenses: API.Licenses = new API.Licenses(this);
337
448
 
338
449
  /**
339
450
  * Check whether the base URL is set to its default.
@@ -357,8 +468,8 @@ export class Orb extends Core.APIClient {
357
468
  return { Authorization: `Bearer ${this.apiKey}` };
358
469
  }
359
470
 
360
- protected override stringifyQuery(query: Record<string, unknown>): string {
361
- return qs.stringify(query, { arrayFormat: 'brackets' });
471
+ protected override stringifyQuery(query: object | Record<string, unknown>): string {
472
+ return stringifyQuery(query);
362
473
  }
363
474
 
364
475
  static Orb = this;
@@ -420,6 +531,10 @@ Orb.DimensionalPriceGroupsPage = DimensionalPriceGroupsPage;
420
531
  Orb.SubscriptionChanges = SubscriptionChanges;
421
532
  Orb.SubscriptionChangeListResponsesPage = SubscriptionChangeListResponsesPage;
422
533
  Orb.CreditBlocks = CreditBlocks;
534
+ Orb.LicenseTypes = LicenseTypes;
535
+ Orb.LicenseTypeListResponsesPage = LicenseTypeListResponsesPage;
536
+ Orb.Licenses = Licenses;
537
+ Orb.LicenseListResponsesPage = LicenseListResponsesPage;
423
538
 
424
539
  export declare namespace Orb {
425
540
  export type RequestOptions = Core.RequestOptions;
@@ -489,6 +604,7 @@ export declare namespace Orb {
489
604
  export {
490
605
  Invoices as Invoices,
491
606
  type InvoiceFetchUpcomingResponse as InvoiceFetchUpcomingResponse,
607
+ type InvoiceIssueSummaryResponse as InvoiceIssueSummaryResponse,
492
608
  type InvoiceListSummaryResponse as InvoiceListSummaryResponse,
493
609
  InvoiceListSummaryResponsesPage as InvoiceListSummaryResponsesPage,
494
610
  type InvoiceCreateParams as InvoiceCreateParams,
@@ -496,8 +612,10 @@ export declare namespace Orb {
496
612
  type InvoiceListParams as InvoiceListParams,
497
613
  type InvoiceFetchUpcomingParams as InvoiceFetchUpcomingParams,
498
614
  type InvoiceIssueParams as InvoiceIssueParams,
615
+ type InvoiceIssueSummaryParams as InvoiceIssueSummaryParams,
499
616
  type InvoiceListSummaryParams as InvoiceListSummaryParams,
500
617
  type InvoiceMarkPaidParams as InvoiceMarkPaidParams,
618
+ type InvoicePayParams as InvoicePayParams,
501
619
  };
502
620
 
503
621
  export {
@@ -626,7 +744,35 @@ export declare namespace Orb {
626
744
  type SubscriptionChangeApplyParams as SubscriptionChangeApplyParams,
627
745
  };
628
746
 
629
- export { CreditBlocks as CreditBlocks, type CreditBlockRetrieveResponse as CreditBlockRetrieveResponse };
747
+ export {
748
+ CreditBlocks as CreditBlocks,
749
+ type CreditBlockRetrieveResponse as CreditBlockRetrieveResponse,
750
+ type CreditBlockListInvoicesResponse as CreditBlockListInvoicesResponse,
751
+ };
752
+
753
+ export {
754
+ LicenseTypes as LicenseTypes,
755
+ type LicenseTypeCreateResponse as LicenseTypeCreateResponse,
756
+ type LicenseTypeRetrieveResponse as LicenseTypeRetrieveResponse,
757
+ type LicenseTypeListResponse as LicenseTypeListResponse,
758
+ LicenseTypeListResponsesPage as LicenseTypeListResponsesPage,
759
+ type LicenseTypeCreateParams as LicenseTypeCreateParams,
760
+ type LicenseTypeListParams as LicenseTypeListParams,
761
+ };
762
+
763
+ export {
764
+ Licenses as Licenses,
765
+ type LicenseCreateResponse as LicenseCreateResponse,
766
+ type LicenseRetrieveResponse as LicenseRetrieveResponse,
767
+ type LicenseListResponse as LicenseListResponse,
768
+ type LicenseDeactivateResponse as LicenseDeactivateResponse,
769
+ type LicenseRetrieveByExternalIDResponse as LicenseRetrieveByExternalIDResponse,
770
+ LicenseListResponsesPage as LicenseListResponsesPage,
771
+ type LicenseCreateParams as LicenseCreateParams,
772
+ type LicenseListParams as LicenseListParams,
773
+ type LicenseDeactivateParams as LicenseDeactivateParams,
774
+ type LicenseRetrieveByExternalIDParams as LicenseRetrieveByExternalIDParams,
775
+ };
630
776
 
631
777
  export type Address = API.Address;
632
778
  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 {