orb-billing 6.15.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.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/resources/beta/beta.d.mts +276 -2
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +276 -2
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/external-plan-id.d.mts +276 -2
- package/resources/beta/external-plan-id.d.mts.map +1 -1
- package/resources/beta/external-plan-id.d.ts +276 -2
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/plans/plans.d.mts +138 -1
- package/resources/plans/plans.d.mts.map +1 -1
- package/resources/plans/plans.d.ts +138 -1
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/prices.d.mts +396 -3
- package/resources/prices/prices.d.mts.map +1 -1
- package/resources/prices/prices.d.ts +396 -3
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.mts +153 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +153 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/subscriptions.d.mts +702 -23
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +702 -23
- package/resources/subscriptions.d.ts.map +1 -1
- package/src/resources/beta/beta.ts +324 -0
- package/src/resources/beta/external-plan-id.ts +324 -0
- package/src/resources/plans/plans.ts +162 -0
- package/src/resources/prices/prices.ts +465 -0
- package/src/resources/shared.ts +194 -0
- package/src/resources/subscriptions.ts +931 -128
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/shared.ts
CHANGED
|
@@ -10759,6 +10759,7 @@ export type Price =
|
|
|
10759
10759
|
| Price.PackageWithAllocationPrice
|
|
10760
10760
|
| Price.UnitWithPercentPrice
|
|
10761
10761
|
| Price.MatrixWithAllocationPrice
|
|
10762
|
+
| Price.TieredMatrixWithAllocationPrice
|
|
10762
10763
|
| Price.MatrixWithThresholdDiscountsPrice
|
|
10763
10764
|
| Price.TieredWithProrationPrice
|
|
10764
10765
|
| Price.UnitWithProrationPrice
|
|
@@ -13206,6 +13207,199 @@ export namespace Price {
|
|
|
13206
13207
|
}
|
|
13207
13208
|
}
|
|
13208
13209
|
|
|
13210
|
+
export interface TieredMatrixWithAllocationPrice {
|
|
13211
|
+
id: string;
|
|
13212
|
+
|
|
13213
|
+
billable_metric: Shared.BillableMetricTiny | null;
|
|
13214
|
+
|
|
13215
|
+
billing_cycle_configuration: Shared.BillingCycleConfiguration;
|
|
13216
|
+
|
|
13217
|
+
billing_mode: 'in_advance' | 'in_arrear';
|
|
13218
|
+
|
|
13219
|
+
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
13220
|
+
|
|
13221
|
+
composite_price_filters: Array<TieredMatrixWithAllocationPrice.CompositePriceFilter> | null;
|
|
13222
|
+
|
|
13223
|
+
conversion_rate: number | null;
|
|
13224
|
+
|
|
13225
|
+
conversion_rate_config: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
13226
|
+
|
|
13227
|
+
created_at: string;
|
|
13228
|
+
|
|
13229
|
+
credit_allocation: Shared.Allocation | null;
|
|
13230
|
+
|
|
13231
|
+
currency: string;
|
|
13232
|
+
|
|
13233
|
+
/**
|
|
13234
|
+
* @deprecated
|
|
13235
|
+
*/
|
|
13236
|
+
discount: Shared.Discount | null;
|
|
13237
|
+
|
|
13238
|
+
external_price_id: string | null;
|
|
13239
|
+
|
|
13240
|
+
fixed_price_quantity: number | null;
|
|
13241
|
+
|
|
13242
|
+
invoice_grouping_key: string | null;
|
|
13243
|
+
|
|
13244
|
+
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
13245
|
+
|
|
13246
|
+
/**
|
|
13247
|
+
* A minimal representation of an Item containing only the essential identifying
|
|
13248
|
+
* information.
|
|
13249
|
+
*/
|
|
13250
|
+
item: Shared.ItemSlim;
|
|
13251
|
+
|
|
13252
|
+
/**
|
|
13253
|
+
* @deprecated
|
|
13254
|
+
*/
|
|
13255
|
+
maximum: Shared.Maximum | null;
|
|
13256
|
+
|
|
13257
|
+
/**
|
|
13258
|
+
* @deprecated
|
|
13259
|
+
*/
|
|
13260
|
+
maximum_amount: string | null;
|
|
13261
|
+
|
|
13262
|
+
/**
|
|
13263
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
13264
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
13265
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
13266
|
+
* `null`.
|
|
13267
|
+
*/
|
|
13268
|
+
metadata: { [key: string]: string };
|
|
13269
|
+
|
|
13270
|
+
/**
|
|
13271
|
+
* @deprecated
|
|
13272
|
+
*/
|
|
13273
|
+
minimum: Shared.Minimum | null;
|
|
13274
|
+
|
|
13275
|
+
/**
|
|
13276
|
+
* @deprecated
|
|
13277
|
+
*/
|
|
13278
|
+
minimum_amount: string | null;
|
|
13279
|
+
|
|
13280
|
+
/**
|
|
13281
|
+
* The pricing model type
|
|
13282
|
+
*/
|
|
13283
|
+
model_type: 'tiered_matrix_with_allocation';
|
|
13284
|
+
|
|
13285
|
+
name: string;
|
|
13286
|
+
|
|
13287
|
+
plan_phase_order: number | null;
|
|
13288
|
+
|
|
13289
|
+
price_type: 'usage_price' | 'fixed_price' | 'composite_price';
|
|
13290
|
+
|
|
13291
|
+
/**
|
|
13292
|
+
* The price id this price replaces. This price will take the place of the replaced
|
|
13293
|
+
* price in plan version migrations.
|
|
13294
|
+
*/
|
|
13295
|
+
replaces_price_id: string | null;
|
|
13296
|
+
|
|
13297
|
+
/**
|
|
13298
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
13299
|
+
*/
|
|
13300
|
+
tiered_matrix_with_allocation_config: TieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
|
|
13301
|
+
|
|
13302
|
+
dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null;
|
|
13303
|
+
|
|
13304
|
+
/**
|
|
13305
|
+
* The LicenseType resource represents a type of license that can be assigned to
|
|
13306
|
+
* users. License types are used during billing by grouping metrics on the
|
|
13307
|
+
* configured grouping key.
|
|
13308
|
+
*/
|
|
13309
|
+
license_type?: TieredMatrixWithAllocationPrice.LicenseType | null;
|
|
13310
|
+
}
|
|
13311
|
+
|
|
13312
|
+
export namespace TieredMatrixWithAllocationPrice {
|
|
13313
|
+
export interface CompositePriceFilter {
|
|
13314
|
+
/**
|
|
13315
|
+
* The property of the price to filter on.
|
|
13316
|
+
*/
|
|
13317
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
13318
|
+
|
|
13319
|
+
/**
|
|
13320
|
+
* Should prices that match the filter be included or excluded.
|
|
13321
|
+
*/
|
|
13322
|
+
operator: 'includes' | 'excludes';
|
|
13323
|
+
|
|
13324
|
+
/**
|
|
13325
|
+
* The IDs or values that match this filter.
|
|
13326
|
+
*/
|
|
13327
|
+
values: Array<string>;
|
|
13328
|
+
}
|
|
13329
|
+
|
|
13330
|
+
/**
|
|
13331
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
13332
|
+
*/
|
|
13333
|
+
export interface TieredMatrixWithAllocationConfig {
|
|
13334
|
+
/**
|
|
13335
|
+
* Usage allocation, pooled across all matrix cells
|
|
13336
|
+
*/
|
|
13337
|
+
allocation: string;
|
|
13338
|
+
|
|
13339
|
+
/**
|
|
13340
|
+
* Per unit rate for usage whose matrix cell has no configured tiers
|
|
13341
|
+
*/
|
|
13342
|
+
default_unit_amount: string;
|
|
13343
|
+
|
|
13344
|
+
/**
|
|
13345
|
+
* One or two event property values to evaluate matrix cells by
|
|
13346
|
+
*/
|
|
13347
|
+
dimensions: Array<string>;
|
|
13348
|
+
|
|
13349
|
+
/**
|
|
13350
|
+
* Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
13351
|
+
* own rows
|
|
13352
|
+
*/
|
|
13353
|
+
tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
|
|
13354
|
+
}
|
|
13355
|
+
|
|
13356
|
+
export namespace TieredMatrixWithAllocationConfig {
|
|
13357
|
+
/**
|
|
13358
|
+
* Configuration for a single tier scoped to one matrix cell
|
|
13359
|
+
*/
|
|
13360
|
+
export interface Tier {
|
|
13361
|
+
/**
|
|
13362
|
+
* The matrix cell this tier applies to, as one or two dimension values
|
|
13363
|
+
*/
|
|
13364
|
+
dimension_values: Array<string>;
|
|
13365
|
+
|
|
13366
|
+
/**
|
|
13367
|
+
* Exclusive tier starting value. The tier runs up to and including the next bound
|
|
13368
|
+
* configured for the same matrix cell.
|
|
13369
|
+
*/
|
|
13370
|
+
tier_lower_bound: string;
|
|
13371
|
+
|
|
13372
|
+
/**
|
|
13373
|
+
* Per unit amount
|
|
13374
|
+
*/
|
|
13375
|
+
unit_amount: string;
|
|
13376
|
+
}
|
|
13377
|
+
}
|
|
13378
|
+
|
|
13379
|
+
/**
|
|
13380
|
+
* The LicenseType resource represents a type of license that can be assigned to
|
|
13381
|
+
* users. License types are used during billing by grouping metrics on the
|
|
13382
|
+
* configured grouping key.
|
|
13383
|
+
*/
|
|
13384
|
+
export interface LicenseType {
|
|
13385
|
+
/**
|
|
13386
|
+
* The Orb-assigned unique identifier for the license type.
|
|
13387
|
+
*/
|
|
13388
|
+
id: string;
|
|
13389
|
+
|
|
13390
|
+
/**
|
|
13391
|
+
* The key used for grouping licenses of this type. This is typically a user
|
|
13392
|
+
* identifier field.
|
|
13393
|
+
*/
|
|
13394
|
+
grouping_key: string;
|
|
13395
|
+
|
|
13396
|
+
/**
|
|
13397
|
+
* The name of the license type.
|
|
13398
|
+
*/
|
|
13399
|
+
name: string;
|
|
13400
|
+
}
|
|
13401
|
+
}
|
|
13402
|
+
|
|
13209
13403
|
export interface MatrixWithThresholdDiscountsPrice {
|
|
13210
13404
|
id: string;
|
|
13211
13405
|
|