orb-billing 6.8.0 → 6.10.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 (77) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/package.json +1 -1
  3. package/resources/beta/beta.d.mts +252 -2
  4. package/resources/beta/beta.d.mts.map +1 -1
  5. package/resources/beta/beta.d.ts +252 -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 +252 -2
  10. package/resources/beta/external-plan-id.d.mts.map +1 -1
  11. package/resources/beta/external-plan-id.d.ts +252 -2
  12. package/resources/beta/external-plan-id.d.ts.map +1 -1
  13. package/resources/customers/costs.d.mts +20 -0
  14. package/resources/customers/costs.d.mts.map +1 -1
  15. package/resources/customers/costs.d.ts +20 -0
  16. package/resources/customers/costs.d.ts.map +1 -1
  17. package/resources/customers/costs.js +20 -0
  18. package/resources/customers/costs.js.map +1 -1
  19. package/resources/customers/costs.mjs +20 -0
  20. package/resources/customers/costs.mjs.map +1 -1
  21. package/resources/invoices.d.mts +9 -9
  22. package/resources/invoices.d.ts +9 -9
  23. package/resources/licenses/external-licenses.d.mts +7 -0
  24. package/resources/licenses/external-licenses.d.mts.map +1 -1
  25. package/resources/licenses/external-licenses.d.ts +7 -0
  26. package/resources/licenses/external-licenses.d.ts.map +1 -1
  27. package/resources/licenses/external-licenses.js +7 -0
  28. package/resources/licenses/external-licenses.js.map +1 -1
  29. package/resources/licenses/external-licenses.mjs +7 -0
  30. package/resources/licenses/external-licenses.mjs.map +1 -1
  31. package/resources/licenses/usage.d.mts +3 -0
  32. package/resources/licenses/usage.d.mts.map +1 -1
  33. package/resources/licenses/usage.d.ts +3 -0
  34. package/resources/licenses/usage.d.ts.map +1 -1
  35. package/resources/licenses/usage.js +3 -0
  36. package/resources/licenses/usage.js.map +1 -1
  37. package/resources/licenses/usage.mjs +3 -0
  38. package/resources/licenses/usage.mjs.map +1 -1
  39. package/resources/plans/plans.d.mts +126 -1
  40. package/resources/plans/plans.d.mts.map +1 -1
  41. package/resources/plans/plans.d.ts +126 -1
  42. package/resources/plans/plans.d.ts.map +1 -1
  43. package/resources/plans/plans.js.map +1 -1
  44. package/resources/plans/plans.mjs.map +1 -1
  45. package/resources/prices/prices.d.mts +360 -3
  46. package/resources/prices/prices.d.mts.map +1 -1
  47. package/resources/prices/prices.d.ts +360 -3
  48. package/resources/prices/prices.d.ts.map +1 -1
  49. package/resources/prices/prices.js.map +1 -1
  50. package/resources/prices/prices.mjs.map +1 -1
  51. package/resources/shared.d.mts +151 -7
  52. package/resources/shared.d.mts.map +1 -1
  53. package/resources/shared.d.ts +151 -7
  54. package/resources/shared.d.ts.map +1 -1
  55. package/resources/subscriptions.d.mts +655 -36
  56. package/resources/subscriptions.d.mts.map +1 -1
  57. package/resources/subscriptions.d.ts +655 -36
  58. package/resources/subscriptions.d.ts.map +1 -1
  59. package/src/resources/beta/beta.ts +298 -0
  60. package/src/resources/beta/external-plan-id.ts +298 -0
  61. package/src/resources/customers/costs.ts +20 -0
  62. package/src/resources/invoices.ts +9 -9
  63. package/src/resources/licenses/external-licenses.ts +7 -0
  64. package/src/resources/licenses/usage.ts +3 -0
  65. package/src/resources/plans/plans.ts +149 -0
  66. package/src/resources/prices/prices.ts +426 -0
  67. package/src/resources/shared.ts +191 -6
  68. package/src/resources/subscriptions.ts +845 -107
  69. package/src/version.ts +1 -1
  70. package/version.d.mts +1 -1
  71. package/version.d.mts.map +1 -1
  72. package/version.d.ts +1 -1
  73. package/version.d.ts.map +1 -1
  74. package/version.js +1 -1
  75. package/version.js.map +1 -1
  76. package/version.mjs +1 -1
  77. package/version.mjs.map +1 -1
@@ -599,9 +599,9 @@ export declare namespace ChangedSubscriptionResources {
599
599
  * If Orb has ever attempted payment auto-collection for this invoice, this field
600
600
  * will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
601
601
  * this can be used to tell whether the invoice is currently in dunning (that is,
602
- * `previously_attempted_at` is non-null, and `next_attempt_time` is non-null), or
603
- * if dunning has been exhausted (`previously_attempted_at` is non-null, but
604
- * `next_attempt_time` is null).
602
+ * `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
603
+ * dunning has been exhausted (`previously_attempted_at` is non-null, but
604
+ * `next_attempt_at` is null).
605
605
  */
606
606
  previously_attempted_at: string | null;
607
607
  }
@@ -1596,9 +1596,9 @@ export declare namespace Invoice {
1596
1596
  * If Orb has ever attempted payment auto-collection for this invoice, this field
1597
1597
  * will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
1598
1598
  * this can be used to tell whether the invoice is currently in dunning (that is,
1599
- * `previously_attempted_at` is non-null, and `next_attempt_time` is non-null), or
1600
- * if dunning has been exhausted (`previously_attempted_at` is non-null, but
1601
- * `next_attempt_time` is null).
1599
+ * `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
1600
+ * dunning has been exhausted (`previously_attempted_at` is non-null, but
1601
+ * `next_attempt_at` is null).
1602
1602
  */
1603
1603
  previously_attempted_at: string | null;
1604
1604
  }
@@ -8569,7 +8569,7 @@ export declare namespace PlanPhaseUsageDiscountAdjustment {
8569
8569
  * For more on the types of prices, see
8570
8570
  * [the core concepts documentation](/core-concepts#plan-and-price)
8571
8571
  */
8572
- export type Price = Price.UnitPrice | Price.TieredPrice | Price.BulkPrice | Price.BulkWithFiltersPrice | Price.PackagePrice | Price.MatrixPrice | Price.ThresholdTotalAmountPrice | Price.TieredPackagePrice | Price.TieredWithMinimumPrice | Price.GroupedTieredPrice | 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;
8572
+ 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;
8573
8573
  export declare namespace Price {
8574
8574
  interface UnitPrice {
8575
8575
  id: string;
@@ -9820,6 +9820,150 @@ export declare namespace Price {
9820
9820
  name: string;
9821
9821
  }
9822
9822
  }
9823
+ interface GroupedTieredMatrixPrice {
9824
+ id: string;
9825
+ billable_metric: Shared.BillableMetricTiny | null;
9826
+ billing_cycle_configuration: Shared.BillingCycleConfiguration;
9827
+ billing_mode: 'in_advance' | 'in_arrear';
9828
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
9829
+ composite_price_filters: Array<GroupedTieredMatrixPrice.CompositePriceFilter> | null;
9830
+ conversion_rate: number | null;
9831
+ conversion_rate_config: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
9832
+ created_at: string;
9833
+ credit_allocation: Shared.Allocation | null;
9834
+ currency: string;
9835
+ /**
9836
+ * @deprecated
9837
+ */
9838
+ discount: Shared.Discount | null;
9839
+ external_price_id: string | null;
9840
+ fixed_price_quantity: number | null;
9841
+ /**
9842
+ * Configuration for grouped_tiered_matrix pricing
9843
+ */
9844
+ grouped_tiered_matrix_config: GroupedTieredMatrixPrice.GroupedTieredMatrixConfig;
9845
+ invoice_grouping_key: string | null;
9846
+ invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
9847
+ /**
9848
+ * A minimal representation of an Item containing only the essential identifying
9849
+ * information.
9850
+ */
9851
+ item: Shared.ItemSlim;
9852
+ /**
9853
+ * @deprecated
9854
+ */
9855
+ maximum: Shared.Maximum | null;
9856
+ /**
9857
+ * @deprecated
9858
+ */
9859
+ maximum_amount: string | null;
9860
+ /**
9861
+ * User specified key-value pairs for the resource. If not present, this defaults
9862
+ * to an empty dictionary. Individual keys can be removed by setting the value to
9863
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
9864
+ * `null`.
9865
+ */
9866
+ metadata: {
9867
+ [key: string]: string;
9868
+ };
9869
+ /**
9870
+ * @deprecated
9871
+ */
9872
+ minimum: Shared.Minimum | null;
9873
+ /**
9874
+ * @deprecated
9875
+ */
9876
+ minimum_amount: string | null;
9877
+ /**
9878
+ * The pricing model type
9879
+ */
9880
+ model_type: 'grouped_tiered_matrix';
9881
+ name: string;
9882
+ plan_phase_order: number | null;
9883
+ price_type: 'usage_price' | 'fixed_price' | 'composite_price';
9884
+ /**
9885
+ * The price id this price replaces. This price will take the place of the replaced
9886
+ * price in plan version migrations.
9887
+ */
9888
+ replaces_price_id: string | null;
9889
+ dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null;
9890
+ /**
9891
+ * The LicenseType resource represents a type of license that can be assigned to
9892
+ * users. License types are used during billing by grouping metrics on the
9893
+ * configured grouping key.
9894
+ */
9895
+ license_type?: GroupedTieredMatrixPrice.LicenseType | null;
9896
+ }
9897
+ namespace GroupedTieredMatrixPrice {
9898
+ interface CompositePriceFilter {
9899
+ /**
9900
+ * The property of the price to filter on.
9901
+ */
9902
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
9903
+ /**
9904
+ * Should prices that match the filter be included or excluded.
9905
+ */
9906
+ operator: 'includes' | 'excludes';
9907
+ /**
9908
+ * The IDs or values that match this filter.
9909
+ */
9910
+ values: Array<string>;
9911
+ }
9912
+ /**
9913
+ * Configuration for grouped_tiered_matrix pricing
9914
+ */
9915
+ interface GroupedTieredMatrixConfig {
9916
+ /**
9917
+ * Per unit rate for usage whose dimension value has no configured tiers
9918
+ */
9919
+ default_unit_amount: string;
9920
+ /**
9921
+ * The billable metric property used to group usage before tiering
9922
+ */
9923
+ dimension: string;
9924
+ /**
9925
+ * Graduated tiers keyed by dimension value; usage for a value is tiered only
9926
+ * against its own rows
9927
+ */
9928
+ tiers: Array<GroupedTieredMatrixConfig.Tier>;
9929
+ }
9930
+ namespace GroupedTieredMatrixConfig {
9931
+ /**
9932
+ * Configuration for a single tier scoped to a dimension value
9933
+ */
9934
+ interface Tier {
9935
+ /**
9936
+ * The dimension value this tier applies to
9937
+ */
9938
+ dimension_value: string;
9939
+ tier_lower_bound: string;
9940
+ /**
9941
+ * Per unit amount
9942
+ */
9943
+ unit_amount: string;
9944
+ }
9945
+ }
9946
+ /**
9947
+ * The LicenseType resource represents a type of license that can be assigned to
9948
+ * users. License types are used during billing by grouping metrics on the
9949
+ * configured grouping key.
9950
+ */
9951
+ interface LicenseType {
9952
+ /**
9953
+ * The Orb-assigned unique identifier for the license type.
9954
+ */
9955
+ id: string;
9956
+ /**
9957
+ * The key used for grouping licenses of this type. This is typically a user
9958
+ * identifier field.
9959
+ */
9960
+ grouping_key: string;
9961
+ /**
9962
+ * The name of the license type.
9963
+ */
9964
+ name: string;
9965
+ }
9966
+ }
9823
9967
  interface TieredPackageWithMinimumPrice {
9824
9968
  id: string;
9825
9969
  billable_metric: Shared.BillableMetricTiny | null;