@openmeter/client 1.0.0-beta-b5069d91dadb → 1.0.0-beta-985183028366
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/dist/index.d.ts +1 -1
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/models/schemas.d.ts +396 -414
- package/dist/models/schemas.js +28 -40
- package/dist/models/types.d.ts +55 -29
- package/package.json +1 -1
package/dist/models/schemas.js
CHANGED
|
@@ -2763,12 +2763,12 @@ export const createChargeCostBasis = z
|
|
|
2763
2763
|
createChargeCostBasisManual,
|
|
2764
2764
|
])
|
|
2765
2765
|
.describe('Cost basis selection for a custom-currency charge. The variant chosen fixes when and how the conversion rate is determined.');
|
|
2766
|
-
export const
|
|
2766
|
+
export const createTaxCodeConfig = z
|
|
2767
2767
|
.object({
|
|
2768
2768
|
behavior: taxBehavior.optional(),
|
|
2769
|
-
|
|
2769
|
+
code: createResourceReference.optional(),
|
|
2770
2770
|
})
|
|
2771
|
-
.describe('Tax configuration for a
|
|
2771
|
+
.describe('Tax configuration for a billable resource. Applies a tax code and tax behavior to the resulting invoice line items. When not set, the applicable default is used: the billing profile default tax configuration, then the organization default tax code.');
|
|
2772
2772
|
export const chargeCostBasis = z
|
|
2773
2773
|
.discriminatedUnion('type', [
|
|
2774
2774
|
chargeCostBasisDynamic,
|
|
@@ -2776,18 +2776,12 @@ export const chargeCostBasis = z
|
|
|
2776
2776
|
chargeCostBasisManual,
|
|
2777
2777
|
])
|
|
2778
2778
|
.describe('Cost basis selection for a custom-currency charge. The variant chosen fixes when and how the conversion rate is determined.');
|
|
2779
|
-
export const
|
|
2779
|
+
export const taxCodeConfig = z
|
|
2780
2780
|
.object({
|
|
2781
2781
|
behavior: taxBehavior.optional(),
|
|
2782
|
-
|
|
2783
|
-
})
|
|
2784
|
-
.describe('Tax configuration for a credit grant. Tax configuration should be provided to ensure correct revenue recognition, including for externally funded grants.');
|
|
2785
|
-
export const rateCardTaxConfig = z
|
|
2786
|
-
.object({
|
|
2787
|
-
behavior: taxBehavior.optional(),
|
|
2788
|
-
code: taxCodeReference,
|
|
2782
|
+
code: taxCodeReference.optional(),
|
|
2789
2783
|
})
|
|
2790
|
-
.describe('
|
|
2784
|
+
.describe('Tax configuration for a billable resource. Applies a tax code and tax behavior to the resulting invoice line items. When not set, the applicable default is used: the billing profile default tax configuration, then the organization default tax code.');
|
|
2791
2785
|
export const taxConfig = z
|
|
2792
2786
|
.object({
|
|
2793
2787
|
behavior: taxBehavior.optional(),
|
|
@@ -2879,12 +2873,12 @@ export const createPlanAddonRequest = z
|
|
|
2879
2873
|
.describe('The maximum number of times the add-on can be purchased for the plan. For single-instance add-ons this field must be omitted. For multi-instance add-ons when omitted, unlimited quantity can be purchased.'),
|
|
2880
2874
|
})
|
|
2881
2875
|
.describe('PlanAddon create request.');
|
|
2882
|
-
export const
|
|
2876
|
+
export const updateTaxCodeConfig = z
|
|
2883
2877
|
.object({
|
|
2884
2878
|
behavior: taxBehavior.optional(),
|
|
2885
|
-
code: updateResourceReference,
|
|
2879
|
+
code: updateResourceReference.optional(),
|
|
2886
2880
|
})
|
|
2887
|
-
.describe('
|
|
2881
|
+
.describe('Tax configuration for a billable resource. Applies a tax code and tax behavior to the resulting invoice line items. When not set, the applicable default is used: the billing profile default tax configuration, then the organization default tax code.');
|
|
2888
2882
|
export const listEventsParamsFilter = z
|
|
2889
2883
|
.object({
|
|
2890
2884
|
id: stringFieldFilter.optional(),
|
|
@@ -4068,7 +4062,7 @@ export const createCreditGrantRequest = z
|
|
|
4068
4062
|
currency: createCurrencyCode,
|
|
4069
4063
|
amount: numeric,
|
|
4070
4064
|
purchase: createCreditGrantPurchase.optional(),
|
|
4071
|
-
taxConfig:
|
|
4065
|
+
taxConfig: createTaxCodeConfig.optional(),
|
|
4072
4066
|
filters: createCreditGrantFilters.optional(),
|
|
4073
4067
|
priority: z
|
|
4074
4068
|
.number()
|
|
@@ -4104,7 +4098,7 @@ export const creditGrant = z
|
|
|
4104
4098
|
currency: billingCurrencyCode,
|
|
4105
4099
|
amount: numeric,
|
|
4106
4100
|
purchase: creditGrantPurchase.optional(),
|
|
4107
|
-
taxConfig:
|
|
4101
|
+
taxConfig: taxCodeConfig.optional(),
|
|
4108
4102
|
invoice: creditGrantInvoiceReference.optional(),
|
|
4109
4103
|
filters: creditGrantFilters.optional(),
|
|
4110
4104
|
priority: z
|
|
@@ -4258,14 +4252,14 @@ export const rateCard = z
|
|
|
4258
4252
|
paymentTerm: pricePaymentTerm.optional().default('in_arrears'),
|
|
4259
4253
|
commitments: spendCommitments.optional(),
|
|
4260
4254
|
discounts: rateCardDiscounts.optional(),
|
|
4261
|
-
taxConfig:
|
|
4255
|
+
taxConfig: taxCodeConfig.optional(),
|
|
4262
4256
|
entitlement: rateCardEntitlement.optional(),
|
|
4263
4257
|
})
|
|
4264
4258
|
.describe('A rate card defines the pricing and entitlement of a feature or service.');
|
|
4265
4259
|
export const invoiceLineRateCard = z
|
|
4266
4260
|
.object({
|
|
4267
4261
|
price: price,
|
|
4268
|
-
taxConfig:
|
|
4262
|
+
taxConfig: taxCodeConfig.optional(),
|
|
4269
4263
|
featureKey: resourceKey.optional(),
|
|
4270
4264
|
discounts: rateCardDiscounts.optional(),
|
|
4271
4265
|
unitConfig: unitConfig.optional(),
|
|
@@ -4340,7 +4334,7 @@ export const featurePagePaginatedResponse = z
|
|
|
4340
4334
|
export const updateInvoiceLineRateCard = z
|
|
4341
4335
|
.object({
|
|
4342
4336
|
price: updatePrice,
|
|
4343
|
-
taxConfig:
|
|
4337
|
+
taxConfig: updateTaxCodeConfig.optional(),
|
|
4344
4338
|
featureKey: resourceKey.optional(),
|
|
4345
4339
|
discounts: updateDiscounts.optional(),
|
|
4346
4340
|
})
|
|
@@ -8692,12 +8686,12 @@ export const createChargeCostBasisWire = z
|
|
|
8692
8686
|
createChargeCostBasisManualWire,
|
|
8693
8687
|
])
|
|
8694
8688
|
.describe('Cost basis selection for a custom-currency charge. The variant chosen fixes when and how the conversion rate is determined.');
|
|
8695
|
-
export const
|
|
8689
|
+
export const createTaxCodeConfigWire = z
|
|
8696
8690
|
.strictObject({
|
|
8697
8691
|
behavior: taxBehaviorWire.optional(),
|
|
8698
|
-
|
|
8692
|
+
code: createResourceReferenceWire.optional(),
|
|
8699
8693
|
})
|
|
8700
|
-
.describe('Tax configuration for a
|
|
8694
|
+
.describe('Tax configuration for a billable resource. Applies a tax code and tax behavior to the resulting invoice line items. When not set, the applicable default is used: the billing profile default tax configuration, then the organization default tax code.');
|
|
8701
8695
|
export const chargeCostBasisWire = z
|
|
8702
8696
|
.discriminatedUnion('type', [
|
|
8703
8697
|
chargeCostBasisDynamicWire,
|
|
@@ -8705,18 +8699,12 @@ export const chargeCostBasisWire = z
|
|
|
8705
8699
|
chargeCostBasisManualWire,
|
|
8706
8700
|
])
|
|
8707
8701
|
.describe('Cost basis selection for a custom-currency charge. The variant chosen fixes when and how the conversion rate is determined.');
|
|
8708
|
-
export const
|
|
8709
|
-
.strictObject({
|
|
8710
|
-
behavior: taxBehaviorWire.optional(),
|
|
8711
|
-
tax_code: taxCodeReferenceWire.optional(),
|
|
8712
|
-
})
|
|
8713
|
-
.describe('Tax configuration for a credit grant. Tax configuration should be provided to ensure correct revenue recognition, including for externally funded grants.');
|
|
8714
|
-
export const rateCardTaxConfigWire = z
|
|
8702
|
+
export const taxCodeConfigWire = z
|
|
8715
8703
|
.strictObject({
|
|
8716
8704
|
behavior: taxBehaviorWire.optional(),
|
|
8717
|
-
code: taxCodeReferenceWire,
|
|
8705
|
+
code: taxCodeReferenceWire.optional(),
|
|
8718
8706
|
})
|
|
8719
|
-
.describe('
|
|
8707
|
+
.describe('Tax configuration for a billable resource. Applies a tax code and tax behavior to the resulting invoice line items. When not set, the applicable default is used: the billing profile default tax configuration, then the organization default tax code.');
|
|
8720
8708
|
export const taxConfigWire = z
|
|
8721
8709
|
.strictObject({
|
|
8722
8710
|
behavior: taxBehaviorWire.optional(),
|
|
@@ -8808,12 +8796,12 @@ export const createPlanAddonRequestWire = z
|
|
|
8808
8796
|
.describe('The maximum number of times the add-on can be purchased for the plan. For single-instance add-ons this field must be omitted. For multi-instance add-ons when omitted, unlimited quantity can be purchased.'),
|
|
8809
8797
|
})
|
|
8810
8798
|
.describe('PlanAddon create request.');
|
|
8811
|
-
export const
|
|
8799
|
+
export const updateTaxCodeConfigWire = z
|
|
8812
8800
|
.strictObject({
|
|
8813
8801
|
behavior: taxBehaviorWire.optional(),
|
|
8814
|
-
code: updateResourceReferenceWire,
|
|
8802
|
+
code: updateResourceReferenceWire.optional(),
|
|
8815
8803
|
})
|
|
8816
|
-
.describe('
|
|
8804
|
+
.describe('Tax configuration for a billable resource. Applies a tax code and tax behavior to the resulting invoice line items. When not set, the applicable default is used: the billing profile default tax configuration, then the organization default tax code.');
|
|
8817
8805
|
export const listEventsParamsFilterWire = z
|
|
8818
8806
|
.strictObject({
|
|
8819
8807
|
id: stringFieldFilterWire.optional(),
|
|
@@ -9999,7 +9987,7 @@ export const createCreditGrantRequestWire = z
|
|
|
9999
9987
|
currency: createCurrencyCodeWire,
|
|
10000
9988
|
amount: numericWire,
|
|
10001
9989
|
purchase: createCreditGrantPurchaseWire.optional(),
|
|
10002
|
-
tax_config:
|
|
9990
|
+
tax_config: createTaxCodeConfigWire.optional(),
|
|
10003
9991
|
filters: createCreditGrantFiltersWire.optional(),
|
|
10004
9992
|
priority: z
|
|
10005
9993
|
.number()
|
|
@@ -10034,7 +10022,7 @@ export const creditGrantWire = z
|
|
|
10034
10022
|
currency: billingCurrencyCodeWire,
|
|
10035
10023
|
amount: numericWire,
|
|
10036
10024
|
purchase: creditGrantPurchaseWire.optional(),
|
|
10037
|
-
tax_config:
|
|
10025
|
+
tax_config: taxCodeConfigWire.optional(),
|
|
10038
10026
|
invoice: creditGrantInvoiceReferenceWire.optional(),
|
|
10039
10027
|
filters: creditGrantFiltersWire.optional(),
|
|
10040
10028
|
priority: z
|
|
@@ -10188,14 +10176,14 @@ export const rateCardWire = z
|
|
|
10188
10176
|
payment_term: pricePaymentTermWire.optional(),
|
|
10189
10177
|
commitments: spendCommitmentsWire.optional(),
|
|
10190
10178
|
discounts: rateCardDiscountsWire.optional(),
|
|
10191
|
-
tax_config:
|
|
10179
|
+
tax_config: taxCodeConfigWire.optional(),
|
|
10192
10180
|
entitlement: rateCardEntitlementWire.optional(),
|
|
10193
10181
|
})
|
|
10194
10182
|
.describe('A rate card defines the pricing and entitlement of a feature or service.');
|
|
10195
10183
|
export const invoiceLineRateCardWire = z
|
|
10196
10184
|
.strictObject({
|
|
10197
10185
|
price: priceWire,
|
|
10198
|
-
tax_config:
|
|
10186
|
+
tax_config: taxCodeConfigWire.optional(),
|
|
10199
10187
|
feature_key: resourceKeyWire.optional(),
|
|
10200
10188
|
discounts: rateCardDiscountsWire.optional(),
|
|
10201
10189
|
unit_config: unitConfigWire.optional(),
|
|
@@ -10270,7 +10258,7 @@ export const featurePagePaginatedResponseWire = z
|
|
|
10270
10258
|
export const updateInvoiceLineRateCardWire = z
|
|
10271
10259
|
.strictObject({
|
|
10272
10260
|
price: updatePriceWire,
|
|
10273
|
-
tax_config:
|
|
10261
|
+
tax_config: updateTaxCodeConfigWire.optional(),
|
|
10274
10262
|
feature_key: resourceKeyWire.optional(),
|
|
10275
10263
|
discounts: updateDiscountsWire.optional(),
|
|
10276
10264
|
})
|
package/dist/models/types.d.ts
CHANGED
|
@@ -2581,33 +2581,44 @@ export interface ListPlanAddonsParamsFilter {
|
|
|
2581
2581
|
planCurrency?: StringFieldFilter;
|
|
2582
2582
|
}
|
|
2583
2583
|
/**
|
|
2584
|
-
* Tax configuration for a
|
|
2584
|
+
* Tax configuration for a billable resource.
|
|
2585
2585
|
*
|
|
2586
|
-
*
|
|
2587
|
-
*
|
|
2586
|
+
* Applies a tax code and tax behavior to the resulting invoice line items. When
|
|
2587
|
+
* not set, the applicable default is used: the billing profile default tax
|
|
2588
|
+
* configuration, then the organization default tax code.
|
|
2588
2589
|
*/
|
|
2589
|
-
export interface
|
|
2590
|
-
/**
|
|
2590
|
+
export interface CreateTaxCodeConfig {
|
|
2591
|
+
/**
|
|
2592
|
+
* Tax behavior.
|
|
2593
|
+
*
|
|
2594
|
+
* This enum is used to specify whether tax is included in the price or excluded
|
|
2595
|
+
* from the price. If not specified, the billing profile is used to determine the
|
|
2596
|
+
* tax behavior. If not specified in the billing profile, the provider's default
|
|
2597
|
+
* behavior is used.
|
|
2598
|
+
*/
|
|
2591
2599
|
behavior?: 'inclusive' | 'exclusive';
|
|
2592
2600
|
/** Tax code applied to the invoice line item. */
|
|
2593
|
-
|
|
2601
|
+
code?: CreateResourceReference;
|
|
2594
2602
|
}
|
|
2595
2603
|
/**
|
|
2596
|
-
* Tax configuration for a
|
|
2604
|
+
* Tax configuration for a billable resource.
|
|
2597
2605
|
*
|
|
2598
|
-
*
|
|
2599
|
-
*
|
|
2606
|
+
* Applies a tax code and tax behavior to the resulting invoice line items. When
|
|
2607
|
+
* not set, the applicable default is used: the billing profile default tax
|
|
2608
|
+
* configuration, then the organization default tax code.
|
|
2600
2609
|
*/
|
|
2601
|
-
export interface
|
|
2602
|
-
/**
|
|
2610
|
+
export interface TaxCodeConfig {
|
|
2611
|
+
/**
|
|
2612
|
+
* Tax behavior.
|
|
2613
|
+
*
|
|
2614
|
+
* This enum is used to specify whether tax is included in the price or excluded
|
|
2615
|
+
* from the price. If not specified, the billing profile is used to determine the
|
|
2616
|
+
* tax behavior. If not specified in the billing profile, the provider's default
|
|
2617
|
+
* behavior is used.
|
|
2618
|
+
*/
|
|
2603
2619
|
behavior?: 'inclusive' | 'exclusive';
|
|
2604
2620
|
/** Tax code applied to the invoice line item. */
|
|
2605
|
-
|
|
2606
|
-
}
|
|
2607
|
-
/** The tax config of the rate card. */
|
|
2608
|
-
export interface RateCardTaxConfig {
|
|
2609
|
-
behavior?: 'inclusive' | 'exclusive';
|
|
2610
|
-
code: TaxCodeReference;
|
|
2621
|
+
code?: TaxCodeReference;
|
|
2611
2622
|
}
|
|
2612
2623
|
/** Set of provider specific tax configs. */
|
|
2613
2624
|
export interface TaxConfig {
|
|
@@ -2741,10 +2752,25 @@ export interface CreatePlanAddonRequest {
|
|
|
2741
2752
|
*/
|
|
2742
2753
|
maxQuantity?: number;
|
|
2743
2754
|
}
|
|
2744
|
-
/**
|
|
2745
|
-
|
|
2755
|
+
/**
|
|
2756
|
+
* Tax configuration for a billable resource.
|
|
2757
|
+
*
|
|
2758
|
+
* Applies a tax code and tax behavior to the resulting invoice line items. When
|
|
2759
|
+
* not set, the applicable default is used: the billing profile default tax
|
|
2760
|
+
* configuration, then the organization default tax code.
|
|
2761
|
+
*/
|
|
2762
|
+
export interface UpdateTaxCodeConfig {
|
|
2763
|
+
/**
|
|
2764
|
+
* Tax behavior.
|
|
2765
|
+
*
|
|
2766
|
+
* This enum is used to specify whether tax is included in the price or excluded
|
|
2767
|
+
* from the price. If not specified, the billing profile is used to determine the
|
|
2768
|
+
* tax behavior. If not specified in the billing profile, the provider's default
|
|
2769
|
+
* behavior is used.
|
|
2770
|
+
*/
|
|
2746
2771
|
behavior?: 'inclusive' | 'exclusive';
|
|
2747
|
-
code
|
|
2772
|
+
/** Tax code applied to the invoice line item. */
|
|
2773
|
+
code?: UpdateResourceReference;
|
|
2748
2774
|
}
|
|
2749
2775
|
/** Filter options for listing ingested events. */
|
|
2750
2776
|
export interface ListEventsParamsFilter {
|
|
@@ -4428,7 +4454,7 @@ export interface CreateCreditGrantRequest {
|
|
|
4428
4454
|
* credit grant tax code is applied, if that's not set the global default taxcode
|
|
4429
4455
|
* is used.
|
|
4430
4456
|
*/
|
|
4431
|
-
taxConfig?:
|
|
4457
|
+
taxConfig?: CreateTaxCodeConfig;
|
|
4432
4458
|
filters?: CreateCreditGrantFilters;
|
|
4433
4459
|
/** Draw-down priority of the grant. Lower values have higher priority. */
|
|
4434
4460
|
priority: number;
|
|
@@ -4501,7 +4527,7 @@ export interface CreditGrant {
|
|
|
4501
4527
|
* credit grant tax code is applied, if that's not set the global default taxcode
|
|
4502
4528
|
* is used.
|
|
4503
4529
|
*/
|
|
4504
|
-
taxConfig?:
|
|
4530
|
+
taxConfig?: TaxCodeConfig;
|
|
4505
4531
|
/** Available when `funding_method` is `invoice`. */
|
|
4506
4532
|
invoice?: CreditGrantInvoiceReference;
|
|
4507
4533
|
filters?: CreditGrantFilters;
|
|
@@ -4775,7 +4801,7 @@ export interface RateCard {
|
|
|
4775
4801
|
/** The discounts of the rate card. */
|
|
4776
4802
|
discounts?: RateCardDiscounts;
|
|
4777
4803
|
/** The tax config of the rate card. */
|
|
4778
|
-
taxConfig?:
|
|
4804
|
+
taxConfig?: TaxCodeConfig;
|
|
4779
4805
|
/**
|
|
4780
4806
|
* The entitlement template granted to subscribers of a plan or addon containing
|
|
4781
4807
|
* this rate card. Requires `feature` to be set.
|
|
@@ -4787,7 +4813,7 @@ export interface InvoiceLineRateCard {
|
|
|
4787
4813
|
/** The price definition used to calculate charges for this line. */
|
|
4788
4814
|
price: Price;
|
|
4789
4815
|
/** Tax configuration snapshot for this line. */
|
|
4790
|
-
taxConfig?:
|
|
4816
|
+
taxConfig?: TaxCodeConfig;
|
|
4791
4817
|
/** The feature key associated with this line's rate card. */
|
|
4792
4818
|
featureKey?: string;
|
|
4793
4819
|
/** Discount configuration from the rate card. */
|
|
@@ -4927,7 +4953,7 @@ export interface UpdateInvoiceLineRateCard {
|
|
|
4927
4953
|
/** The price definition used to calculate charges for this line. */
|
|
4928
4954
|
price: UpdatePrice;
|
|
4929
4955
|
/** Tax configuration snapshot for this line. */
|
|
4930
|
-
taxConfig?:
|
|
4956
|
+
taxConfig?: UpdateTaxCodeConfig;
|
|
4931
4957
|
/** The feature key associated with this line's rate card. */
|
|
4932
4958
|
featureKey?: string;
|
|
4933
4959
|
/** Discount configuration from the rate card. */
|
|
@@ -7238,7 +7264,7 @@ export interface CreateCreditGrantRequestInput {
|
|
|
7238
7264
|
* credit grant tax code is applied, if that's not set the global default taxcode
|
|
7239
7265
|
* is used.
|
|
7240
7266
|
*/
|
|
7241
|
-
taxConfig?:
|
|
7267
|
+
taxConfig?: CreateTaxCodeConfig;
|
|
7242
7268
|
filters?: CreateCreditGrantFilters;
|
|
7243
7269
|
/** Draw-down priority of the grant. Lower values have higher priority. */
|
|
7244
7270
|
priority?: number;
|
|
@@ -7311,7 +7337,7 @@ export interface CreditGrantInput {
|
|
|
7311
7337
|
* credit grant tax code is applied, if that's not set the global default taxcode
|
|
7312
7338
|
* is used.
|
|
7313
7339
|
*/
|
|
7314
|
-
taxConfig?:
|
|
7340
|
+
taxConfig?: TaxCodeConfig;
|
|
7315
7341
|
/** Available when `funding_method` is `invoice`. */
|
|
7316
7342
|
invoice?: CreditGrantInvoiceReference;
|
|
7317
7343
|
filters?: CreditGrantFilters;
|
|
@@ -7517,7 +7543,7 @@ export interface RateCardInput {
|
|
|
7517
7543
|
/** The discounts of the rate card. */
|
|
7518
7544
|
discounts?: RateCardDiscounts;
|
|
7519
7545
|
/** The tax config of the rate card. */
|
|
7520
|
-
taxConfig?:
|
|
7546
|
+
taxConfig?: TaxCodeConfig;
|
|
7521
7547
|
/**
|
|
7522
7548
|
* The entitlement template granted to subscribers of a plan or addon containing
|
|
7523
7549
|
* this rate card. Requires `feature` to be set.
|
|
@@ -7529,7 +7555,7 @@ export interface InvoiceLineRateCardInput {
|
|
|
7529
7555
|
/** The price definition used to calculate charges for this line. */
|
|
7530
7556
|
price: Price;
|
|
7531
7557
|
/** Tax configuration snapshot for this line. */
|
|
7532
|
-
taxConfig?:
|
|
7558
|
+
taxConfig?: TaxCodeConfig;
|
|
7533
7559
|
/** The feature key associated with this line's rate card. */
|
|
7534
7560
|
featureKey?: string;
|
|
7535
7561
|
/** Discount configuration from the rate card. */
|