orb-billing 6.14.0 → 6.16.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 (88) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +1 -1
  3. package/resources/beta/beta.d.mts +276 -2
  4. package/resources/beta/beta.d.mts.map +1 -1
  5. package/resources/beta/beta.d.ts +276 -2
  6. package/resources/beta/beta.d.ts.map +1 -1
  7. package/resources/beta/beta.js.map +1 -1
  8. package/resources/beta/beta.mjs.map +1 -1
  9. package/resources/beta/external-plan-id.d.mts +276 -2
  10. package/resources/beta/external-plan-id.d.mts.map +1 -1
  11. package/resources/beta/external-plan-id.d.ts +276 -2
  12. package/resources/beta/external-plan-id.d.ts.map +1 -1
  13. package/resources/customers/credits/top-ups.d.mts +14 -2
  14. package/resources/customers/credits/top-ups.d.mts.map +1 -1
  15. package/resources/customers/credits/top-ups.d.ts +14 -2
  16. package/resources/customers/credits/top-ups.d.ts.map +1 -1
  17. package/resources/customers/credits/top-ups.js +14 -2
  18. package/resources/customers/credits/top-ups.js.map +1 -1
  19. package/resources/customers/credits/top-ups.mjs +14 -2
  20. package/resources/customers/credits/top-ups.mjs.map +1 -1
  21. package/resources/dimensional-price-groups/dimensional-price-groups.d.mts +11 -2
  22. package/resources/dimensional-price-groups/dimensional-price-groups.d.mts.map +1 -1
  23. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +11 -2
  24. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -1
  25. package/resources/dimensional-price-groups/dimensional-price-groups.js +11 -2
  26. package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -1
  27. package/resources/dimensional-price-groups/dimensional-price-groups.mjs +11 -2
  28. package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -1
  29. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts +4 -1
  30. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts.map +1 -1
  31. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +4 -1
  32. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -1
  33. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +4 -1
  34. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js.map +1 -1
  35. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +4 -1
  36. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -1
  37. package/resources/items.d.mts +3 -1
  38. package/resources/items.d.mts.map +1 -1
  39. package/resources/items.d.ts +3 -1
  40. package/resources/items.d.ts.map +1 -1
  41. package/resources/items.js +3 -1
  42. package/resources/items.js.map +1 -1
  43. package/resources/items.mjs +3 -1
  44. package/resources/items.mjs.map +1 -1
  45. package/resources/plans/migrations.d.mts +3 -1
  46. package/resources/plans/migrations.d.mts.map +1 -1
  47. package/resources/plans/migrations.d.ts +3 -1
  48. package/resources/plans/migrations.d.ts.map +1 -1
  49. package/resources/plans/migrations.js +3 -1
  50. package/resources/plans/migrations.js.map +1 -1
  51. package/resources/plans/migrations.mjs +3 -1
  52. package/resources/plans/migrations.mjs.map +1 -1
  53. package/resources/plans/plans.d.mts +138 -1
  54. package/resources/plans/plans.d.mts.map +1 -1
  55. package/resources/plans/plans.d.ts +138 -1
  56. package/resources/plans/plans.d.ts.map +1 -1
  57. package/resources/plans/plans.js.map +1 -1
  58. package/resources/plans/plans.mjs.map +1 -1
  59. package/resources/prices/prices.d.mts +396 -3
  60. package/resources/prices/prices.d.mts.map +1 -1
  61. package/resources/prices/prices.d.ts +396 -3
  62. package/resources/prices/prices.d.ts.map +1 -1
  63. package/resources/prices/prices.js.map +1 -1
  64. package/resources/prices/prices.mjs.map +1 -1
  65. package/resources/shared.d.mts +153 -1
  66. package/resources/shared.d.mts.map +1 -1
  67. package/resources/shared.d.ts +153 -1
  68. package/resources/shared.d.ts.map +1 -1
  69. package/resources/subscriptions.d.mts +702 -23
  70. package/resources/subscriptions.d.mts.map +1 -1
  71. package/resources/subscriptions.d.ts +702 -23
  72. package/resources/subscriptions.d.ts.map +1 -1
  73. package/src/resources/beta/beta.ts +324 -0
  74. package/src/resources/beta/external-plan-id.ts +324 -0
  75. package/src/resources/customers/credits/top-ups.ts +14 -2
  76. package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +11 -2
  77. package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +4 -1
  78. package/src/resources/items.ts +3 -1
  79. package/src/resources/plans/migrations.ts +3 -1
  80. package/src/resources/plans/plans.ts +162 -0
  81. package/src/resources/prices/prices.ts +465 -0
  82. package/src/resources/shared.ts +194 -0
  83. package/src/resources/subscriptions.ts +931 -128
  84. package/src/version.ts +1 -1
  85. package/version.d.mts +1 -1
  86. package/version.d.ts +1 -1
  87. package/version.js +1 -1
  88. package/version.mjs +1 -1
@@ -8791,7 +8791,7 @@ export declare namespace PlanPhaseUsageDiscountAdjustment {
8791
8791
  * For more on the types of prices, see
8792
8792
  * [the core concepts documentation](/core-concepts#plan-and-price)
8793
8793
  */
8794
- export type Price = Price.UnitPrice | Price.TieredPrice | Price.BulkPrice | Price.BulkWithFiltersPrice | Price.PackagePrice | Price.MatrixPrice | Price.ThresholdTotalAmountPrice | Price.TieredPackagePrice | Price.TieredWithMinimumPrice | Price.GroupedTieredPrice | Price.GroupedTieredMatrixPrice | Price.TieredPackageWithMinimumPrice | Price.PackageWithAllocationPrice | Price.UnitWithPercentPrice | Price.MatrixWithAllocationPrice | Price.MatrixWithThresholdDiscountsPrice | Price.TieredWithProrationPrice | Price.UnitWithProrationPrice | Price.GroupedAllocationPrice | Price.BulkWithProrationPrice | Price.GroupedWithProratedMinimumPrice | Price.GroupedWithMeteredMinimumPrice | Price.GroupedWithMinMaxThresholdsPrice | Price.MatrixWithDisplayNamePrice | Price.GroupedTieredPackagePrice | Price.MaxGroupTieredPackagePrice | Price.ScalableMatrixWithUnitPricingPrice | Price.ScalableMatrixWithTieredPricingPrice | Price.CumulativeGroupedBulkPrice | Price.CumulativeGroupedAllocationPrice | Price.DailyCreditAllowancePrice | Price.MeteredAllowancePrice | Price.MinimumCompositePrice | Price.PercentCompositePrice | Price.EventOutputPrice;
8794
+ export type Price = Price.UnitPrice | Price.TieredPrice | Price.BulkPrice | Price.BulkWithFiltersPrice | Price.PackagePrice | Price.MatrixPrice | Price.ThresholdTotalAmountPrice | Price.TieredPackagePrice | Price.TieredWithMinimumPrice | Price.GroupedTieredPrice | Price.GroupedTieredMatrixPrice | Price.TieredPackageWithMinimumPrice | Price.PackageWithAllocationPrice | Price.UnitWithPercentPrice | Price.MatrixWithAllocationPrice | Price.TieredMatrixWithAllocationPrice | Price.MatrixWithThresholdDiscountsPrice | Price.TieredWithProrationPrice | Price.UnitWithProrationPrice | Price.GroupedAllocationPrice | Price.BulkWithProrationPrice | Price.GroupedWithProratedMinimumPrice | Price.GroupedWithMeteredMinimumPrice | Price.GroupedWithMinMaxThresholdsPrice | Price.MatrixWithDisplayNamePrice | Price.GroupedTieredPackagePrice | Price.MaxGroupTieredPackagePrice | Price.ScalableMatrixWithUnitPricingPrice | Price.ScalableMatrixWithTieredPricingPrice | Price.CumulativeGroupedBulkPrice | Price.CumulativeGroupedAllocationPrice | Price.DailyCreditAllowancePrice | Price.MeteredAllowancePrice | Price.MinimumCompositePrice | Price.PercentCompositePrice | Price.EventOutputPrice;
8795
8795
  export declare namespace Price {
8796
8796
  interface UnitPrice {
8797
8797
  id: string;
@@ -10668,6 +10668,158 @@ export declare namespace Price {
10668
10668
  name: string;
10669
10669
  }
10670
10670
  }
10671
+ interface TieredMatrixWithAllocationPrice {
10672
+ id: string;
10673
+ billable_metric: Shared.BillableMetricTiny | null;
10674
+ billing_cycle_configuration: Shared.BillingCycleConfiguration;
10675
+ billing_mode: 'in_advance' | 'in_arrear';
10676
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
10677
+ composite_price_filters: Array<TieredMatrixWithAllocationPrice.CompositePriceFilter> | null;
10678
+ conversion_rate: number | null;
10679
+ conversion_rate_config: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
10680
+ created_at: string;
10681
+ credit_allocation: Shared.Allocation | null;
10682
+ currency: string;
10683
+ /**
10684
+ * @deprecated
10685
+ */
10686
+ discount: Shared.Discount | null;
10687
+ external_price_id: string | null;
10688
+ fixed_price_quantity: number | null;
10689
+ invoice_grouping_key: string | null;
10690
+ invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
10691
+ /**
10692
+ * A minimal representation of an Item containing only the essential identifying
10693
+ * information.
10694
+ */
10695
+ item: Shared.ItemSlim;
10696
+ /**
10697
+ * @deprecated
10698
+ */
10699
+ maximum: Shared.Maximum | null;
10700
+ /**
10701
+ * @deprecated
10702
+ */
10703
+ maximum_amount: string | null;
10704
+ /**
10705
+ * User specified key-value pairs for the resource. If not present, this defaults
10706
+ * to an empty dictionary. Individual keys can be removed by setting the value to
10707
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
10708
+ * `null`.
10709
+ */
10710
+ metadata: {
10711
+ [key: string]: string;
10712
+ };
10713
+ /**
10714
+ * @deprecated
10715
+ */
10716
+ minimum: Shared.Minimum | null;
10717
+ /**
10718
+ * @deprecated
10719
+ */
10720
+ minimum_amount: string | null;
10721
+ /**
10722
+ * The pricing model type
10723
+ */
10724
+ model_type: 'tiered_matrix_with_allocation';
10725
+ name: string;
10726
+ plan_phase_order: number | null;
10727
+ price_type: 'usage_price' | 'fixed_price' | 'composite_price';
10728
+ /**
10729
+ * The price id this price replaces. This price will take the place of the replaced
10730
+ * price in plan version migrations.
10731
+ */
10732
+ replaces_price_id: string | null;
10733
+ /**
10734
+ * Configuration for tiered_matrix_with_allocation pricing
10735
+ */
10736
+ tiered_matrix_with_allocation_config: TieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
10737
+ dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null;
10738
+ /**
10739
+ * The LicenseType resource represents a type of license that can be assigned to
10740
+ * users. License types are used during billing by grouping metrics on the
10741
+ * configured grouping key.
10742
+ */
10743
+ license_type?: TieredMatrixWithAllocationPrice.LicenseType | null;
10744
+ }
10745
+ namespace TieredMatrixWithAllocationPrice {
10746
+ interface CompositePriceFilter {
10747
+ /**
10748
+ * The property of the price to filter on.
10749
+ */
10750
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
10751
+ /**
10752
+ * Should prices that match the filter be included or excluded.
10753
+ */
10754
+ operator: 'includes' | 'excludes';
10755
+ /**
10756
+ * The IDs or values that match this filter.
10757
+ */
10758
+ values: Array<string>;
10759
+ }
10760
+ /**
10761
+ * Configuration for tiered_matrix_with_allocation pricing
10762
+ */
10763
+ interface TieredMatrixWithAllocationConfig {
10764
+ /**
10765
+ * Usage allocation, pooled across all matrix cells
10766
+ */
10767
+ allocation: string;
10768
+ /**
10769
+ * Per unit rate for usage whose matrix cell has no configured tiers
10770
+ */
10771
+ default_unit_amount: string;
10772
+ /**
10773
+ * One or two event property values to evaluate matrix cells by
10774
+ */
10775
+ dimensions: Array<string>;
10776
+ /**
10777
+ * Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
10778
+ * own rows
10779
+ */
10780
+ tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
10781
+ }
10782
+ namespace TieredMatrixWithAllocationConfig {
10783
+ /**
10784
+ * Configuration for a single tier scoped to one matrix cell
10785
+ */
10786
+ interface Tier {
10787
+ /**
10788
+ * The matrix cell this tier applies to, as one or two dimension values
10789
+ */
10790
+ dimension_values: Array<string>;
10791
+ /**
10792
+ * Exclusive tier starting value. The tier runs up to and including the next bound
10793
+ * configured for the same matrix cell.
10794
+ */
10795
+ tier_lower_bound: string;
10796
+ /**
10797
+ * Per unit amount
10798
+ */
10799
+ unit_amount: string;
10800
+ }
10801
+ }
10802
+ /**
10803
+ * The LicenseType resource represents a type of license that can be assigned to
10804
+ * users. License types are used during billing by grouping metrics on the
10805
+ * configured grouping key.
10806
+ */
10807
+ interface LicenseType {
10808
+ /**
10809
+ * The Orb-assigned unique identifier for the license type.
10810
+ */
10811
+ id: string;
10812
+ /**
10813
+ * The key used for grouping licenses of this type. This is typically a user
10814
+ * identifier field.
10815
+ */
10816
+ grouping_key: string;
10817
+ /**
10818
+ * The name of the license type.
10819
+ */
10820
+ name: string;
10821
+ }
10822
+ }
10671
10823
  interface MatrixWithThresholdDiscountsPrice {
10672
10824
  id: string;
10673
10825
  billable_metric: Shared.BillableMetricTiny | null;