@openmeter/client 1.0.0-beta-8f93b11ab8cd → 1.0.0-beta-52bb0a888f9a

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.
@@ -970,6 +970,9 @@ export const numericFieldFilter = z
970
970
  export const chargeType = z
971
971
  .enum(['flat_fee', 'usage_based'])
972
972
  .describe('Type of a charge. Values: - `flat_fee`: A fixed-amount charge. - `usage_based`: A usage-priced charge.');
973
+ export const chargeCostBasisType = z
974
+ .enum(['dynamic', 'pinned', 'manual'])
975
+ .describe('Cost basis resolution mode of a charge.');
973
976
  export const invoiceType = z
974
977
  .enum(['standard'])
975
978
  .describe('The type of a billing invoice.');
@@ -1041,6 +1044,14 @@ export const appCustomerDataExternalInvoicing = z
1041
1044
  labels: labels.optional(),
1042
1045
  })
1043
1046
  .describe('External invoicing customer data.');
1047
+ export const chargeCostBasisDynamic = z
1048
+ .object({
1049
+ type: z
1050
+ .literal('dynamic')
1051
+ .describe('Discriminator selecting the cost basis mode.'),
1052
+ fiatCurrency: currencyCode,
1053
+ })
1054
+ .describe("Cost basis resolved at the charge's full service period start.");
1044
1055
  export const currencyFiat = z
1045
1056
  .object({
1046
1057
  type: z.literal('fiat').describe('The type of the currency.'),
@@ -1144,6 +1155,15 @@ export const rateCardDiscounts = z
1144
1155
  usage: numeric.optional(),
1145
1156
  })
1146
1157
  .describe('Discount configuration for a rate card.');
1158
+ export const chargeCostBasisManual = z
1159
+ .object({
1160
+ type: z
1161
+ .literal('manual')
1162
+ .describe('Discriminator selecting the cost basis mode.'),
1163
+ fiatCurrency: currencyCode,
1164
+ rate: numeric,
1165
+ })
1166
+ .describe('Cost basis with an explicit conversion rate supplied with the charge.');
1147
1167
  export const totals = z
1148
1168
  .object({
1149
1169
  amount: numeric,
@@ -1201,12 +1221,6 @@ export const featureLlmUnitCostPricing = z
1201
1221
  cacheWritePerToken: numeric.optional(),
1202
1222
  })
1203
1223
  .describe('Resolved per-token pricing from the LLM cost database.');
1204
- export const currencyAmount = z
1205
- .object({
1206
- amount: numeric,
1207
- currency: currencyCode,
1208
- })
1209
- .describe('Monetary amount in a specific currency.');
1210
1224
  export const invoiceLineCreditsApplied = z
1211
1225
  .object({
1212
1226
  amount: numeric,
@@ -1258,6 +1272,12 @@ export const llmCostModelPricing = z
1258
1272
  reasoningPerToken: numeric.optional(),
1259
1273
  })
1260
1274
  .describe('Token pricing for an LLM model, denominated per token.');
1275
+ export const fiatCurrencyAmount = z
1276
+ .object({
1277
+ amount: numeric,
1278
+ currency: currencyCode,
1279
+ })
1280
+ .describe('Monetary amount in a specific fiat currency.');
1261
1281
  export const queryFilterNumeric = z
1262
1282
  .object({
1263
1283
  gt: numeric.optional(),
@@ -1380,6 +1400,15 @@ export const subscriptionReference = z
1380
1400
  .describe('The phase of the subscription.'),
1381
1401
  })
1382
1402
  .describe('Subscription reference represents a reference to the specific subscription item this entity represents.');
1403
+ export const chargeCostBasisPinned = z
1404
+ .object({
1405
+ type: z
1406
+ .literal('pinned')
1407
+ .describe('Discriminator selecting the cost basis mode.'),
1408
+ fiatCurrency: currencyCode,
1409
+ costBasisId: ulid,
1410
+ })
1411
+ .describe('Cost basis pinned to a specific cost basis resource of the custom currency.');
1383
1412
  export const appReference = z
1384
1413
  .object({
1385
1414
  id: ulid,
@@ -1520,6 +1549,14 @@ export const closedPeriod = z
1520
1549
  to: dateTime,
1521
1550
  })
1522
1551
  .describe('A period with defined start and end dates. The period is always inclusive at the start and exclusive at the end.');
1552
+ export const chargeResolvedCostBasis = z
1553
+ .object({
1554
+ fiatCurrency: currencyCode,
1555
+ rate: numeric,
1556
+ costBasisId: ulid.optional(),
1557
+ resolvedAt: dateTime,
1558
+ })
1559
+ .describe('Fiat conversion rate a custom-currency charge is invoiced at. Present once the cost basis is resolved; dynamic cost bases are exposed only after the service period has started.');
1523
1560
  export const subscriptionAddonTimelineSegment = z
1524
1561
  .object({
1525
1562
  activeFrom: dateTime,
@@ -2497,6 +2534,12 @@ export const creditTransaction = z
2497
2534
  .describe('The available balance before and after the transaction.'),
2498
2535
  })
2499
2536
  .describe("A credit transaction represents a single credit movement on the customer's balance. Credit transactions are immutable.");
2537
+ export const currencyAmount = z
2538
+ .object({
2539
+ amount: numeric,
2540
+ currency: billingCurrencyCode,
2541
+ })
2542
+ .describe('Monetary amount in a fiat or custom currency.');
2500
2543
  export const priceTier = z
2501
2544
  .object({
2502
2545
  upToAmount: numeric.optional(),
@@ -2657,6 +2700,13 @@ export const updateOrganizationDefaultTaxCodesRequest = z
2657
2700
  creditGrantTaxCode: taxCodeReference.optional(),
2658
2701
  })
2659
2702
  .describe('OrganizationDefaultTaxCodes update request.');
2703
+ export const chargeCostBasis = z
2704
+ .discriminatedUnion('type', [
2705
+ chargeCostBasisDynamic,
2706
+ chargeCostBasisPinned,
2707
+ chargeCostBasisManual,
2708
+ ])
2709
+ .describe('Cost basis selection for a custom-currency charge. The variant chosen fixes when and how the conversion rate is determined.');
2660
2710
  export const invoiceWorkflowAppsReferences = z
2661
2711
  .object({
2662
2712
  tax: appReference,
@@ -3070,30 +3120,6 @@ export const workflowCollectionAlignmentAnchored = z
3070
3120
  recurringPeriod: recurringPeriod,
3071
3121
  })
3072
3122
  .describe('BillingWorkflowCollectionAlignmentAnchored specifies the alignment for collecting the pending line items into an invoice.');
3073
- export const chargeFlatFeeSystemIntent = z
3074
- .object({
3075
- name: z
3076
- .string()
3077
- .min(1)
3078
- .max(256)
3079
- .describe('Display name of the resource. Between 1 and 256 characters.'),
3080
- description: z
3081
- .string()
3082
- .max(1024)
3083
- .optional()
3084
- .describe('Optional description of the resource. Maximum 1024 characters.'),
3085
- labels: labels.optional(),
3086
- invoiceAt: dateTime,
3087
- servicePeriod: closedPeriod,
3088
- fullServicePeriod: closedPeriod,
3089
- billingPeriod: closedPeriod,
3090
- paymentTerm: pricePaymentTerm,
3091
- discounts: chargeFlatFeeDiscounts.optional(),
3092
- prorationConfiguration: rateCardProrationConfiguration,
3093
- amountBeforeProration: currencyAmount,
3094
- deletedAt: dateTime.optional(),
3095
- })
3096
- .describe('Flat fee intent fields from the system lifecycle controller shadowed by a manual override.');
3097
3123
  export const invoiceStatusDetails = z
3098
3124
  .object({
3099
3125
  immutable: z
@@ -3283,6 +3309,30 @@ export const creditTransactionPaginatedResponse = z
3283
3309
  meta: cursorMeta,
3284
3310
  })
3285
3311
  .describe('Cursor paginated response.');
3312
+ export const chargeFlatFeeSystemIntent = z
3313
+ .object({
3314
+ name: z
3315
+ .string()
3316
+ .min(1)
3317
+ .max(256)
3318
+ .describe('Display name of the resource. Between 1 and 256 characters.'),
3319
+ description: z
3320
+ .string()
3321
+ .max(1024)
3322
+ .optional()
3323
+ .describe('Optional description of the resource. Maximum 1024 characters.'),
3324
+ labels: labels.optional(),
3325
+ invoiceAt: dateTime,
3326
+ servicePeriod: closedPeriod,
3327
+ fullServicePeriod: closedPeriod,
3328
+ billingPeriod: closedPeriod,
3329
+ paymentTerm: pricePaymentTerm,
3330
+ discounts: chargeFlatFeeDiscounts.optional(),
3331
+ prorationConfiguration: rateCardProrationConfiguration,
3332
+ amountBeforeProration: currencyAmount,
3333
+ deletedAt: dateTime.optional(),
3334
+ })
3335
+ .describe('Flat fee intent fields from the system lifecycle controller shadowed by a manual override.');
3286
3336
  export const priceGraduated = z
3287
3337
  .object({
3288
3338
  type: z.literal('graduated').describe('The type of the price.'),
@@ -3399,6 +3449,21 @@ export const creditGrant = z
3399
3449
  status: creditGrantStatus,
3400
3450
  })
3401
3451
  .describe('A credit grant allocates credits to a customer. Credits are drawn down against charges according to the settlement mode configured on the rate card.');
3452
+ export const workflowTaxSettings = z
3453
+ .object({
3454
+ enabled: z
3455
+ .boolean()
3456
+ .optional()
3457
+ .default(true)
3458
+ .describe('Enable automatic tax calculation when tax is supported by the app. For example, with Stripe Invoicing when enabled, tax is calculated via Stripe Tax.'),
3459
+ enforced: z
3460
+ .boolean()
3461
+ .optional()
3462
+ .default(false)
3463
+ .describe('Enforce tax calculation when tax is supported by the app. When enabled, the billing system will not allow to create an invoice without tax calculation. Enforcement is different per apps, for example, Stripe app requires customer to have a tax location when starting a paid subscription.'),
3464
+ defaultTaxConfig: taxConfig.optional(),
3465
+ })
3466
+ .describe('Tax settings for a billing workflow.');
3402
3467
  export const createChargeFlatFeeRequest = z
3403
3468
  .object({
3404
3469
  name: z
@@ -3413,7 +3478,8 @@ export const createChargeFlatFeeRequest = z
3413
3478
  .describe('Optional description of the resource. Maximum 1024 characters.'),
3414
3479
  labels: labels.optional(),
3415
3480
  type: z.literal('flat_fee').describe('The type of the charge.'),
3416
- currency: currencyCode,
3481
+ currency: billingCurrencyCode,
3482
+ costBasis: chargeCostBasis.optional(),
3417
3483
  invoiceAt: dateTime,
3418
3484
  servicePeriod: closedPeriod,
3419
3485
  uniqueReferenceId: z
@@ -3431,21 +3497,6 @@ export const createChargeFlatFeeRequest = z
3431
3497
  billingPeriod: closedPeriod.optional(),
3432
3498
  })
3433
3499
  .describe('Flat fee charge create request.');
3434
- export const workflowTaxSettings = z
3435
- .object({
3436
- enabled: z
3437
- .boolean()
3438
- .optional()
3439
- .default(true)
3440
- .describe('Enable automatic tax calculation when tax is supported by the app. For example, with Stripe Invoicing when enabled, tax is calculated via Stripe Tax.'),
3441
- enforced: z
3442
- .boolean()
3443
- .optional()
3444
- .default(false)
3445
- .describe('Enforce tax calculation when tax is supported by the app. When enabled, the billing system will not allow to create an invoice without tax calculation. Enforcement is different per apps, for example, Stripe app requires customer to have a tax location when starting a paid subscription.'),
3446
- defaultTaxConfig: taxConfig.optional(),
3447
- })
3448
- .describe('Tax settings for a billing workflow.');
3449
3500
  export const planAddonPagePaginatedResponse = z
3450
3501
  .object({
3451
3502
  data: z.array(planAddon),
@@ -4081,7 +4132,8 @@ export const createChargeUsageBasedRequest = z
4081
4132
  .describe('Optional description of the resource. Maximum 1024 characters.'),
4082
4133
  labels: labels.optional(),
4083
4134
  type: z.literal('usage_based').describe('The type of the charge.'),
4084
- currency: currencyCode,
4135
+ currency: billingCurrencyCode,
4136
+ costBasis: chargeCostBasis.optional(),
4085
4137
  invoiceAt: dateTime,
4086
4138
  servicePeriod: closedPeriod,
4087
4139
  uniqueReferenceId: z
@@ -4719,7 +4771,8 @@ export const chargeFlatFee = z
4719
4771
  customer: customerOrReference,
4720
4772
  lifecycleController: lifecycleController,
4721
4773
  subscription: subscriptionOrReference.optional(),
4722
- currency: currencyCode,
4774
+ currency: billingCurrencyCode,
4775
+ resolvedCostBasis: chargeResolvedCostBasis.optional(),
4723
4776
  status: chargeStatus,
4724
4777
  invoiceAt: dateTime,
4725
4778
  servicePeriod: closedPeriod,
@@ -4765,7 +4818,8 @@ export const chargeUsageBased = z
4765
4818
  customer: customerOrReference,
4766
4819
  lifecycleController: lifecycleController,
4767
4820
  subscription: subscriptionOrReference.optional(),
4768
- currency: currencyCode,
4821
+ currency: billingCurrencyCode,
4822
+ resolvedCostBasis: chargeResolvedCostBasis.optional(),
4769
4823
  status: chargeStatus,
4770
4824
  invoiceAt: dateTime,
4771
4825
  servicePeriod: closedPeriod,
@@ -6487,6 +6541,9 @@ export const numericFieldFilterWire = z
6487
6541
  export const chargeTypeWire = z
6488
6542
  .enum(['flat_fee', 'usage_based'])
6489
6543
  .describe('Type of a charge. Values: - `flat_fee`: A fixed-amount charge. - `usage_based`: A usage-priced charge.');
6544
+ export const chargeCostBasisTypeWire = z
6545
+ .enum(['dynamic', 'pinned', 'manual'])
6546
+ .describe('Cost basis resolution mode of a charge.');
6490
6547
  export const invoiceTypeWire = z
6491
6548
  .enum(['standard'])
6492
6549
  .describe('The type of a billing invoice.');
@@ -6558,6 +6615,14 @@ export const appCustomerDataExternalInvoicingWire = z
6558
6615
  labels: labelsWire.optional(),
6559
6616
  })
6560
6617
  .describe('External invoicing customer data.');
6618
+ export const chargeCostBasisDynamicWire = z
6619
+ .strictObject({
6620
+ type: z
6621
+ .literal('dynamic')
6622
+ .describe('Discriminator selecting the cost basis mode.'),
6623
+ fiat_currency: currencyCodeWire,
6624
+ })
6625
+ .describe("Cost basis resolved at the charge's full service period start.");
6561
6626
  export const currencyFiatWire = z
6562
6627
  .strictObject({
6563
6628
  type: z.literal('fiat').describe('The type of the currency.'),
@@ -6661,6 +6726,15 @@ export const rateCardDiscountsWire = z
6661
6726
  usage: numericWire.optional(),
6662
6727
  })
6663
6728
  .describe('Discount configuration for a rate card.');
6729
+ export const chargeCostBasisManualWire = z
6730
+ .strictObject({
6731
+ type: z
6732
+ .literal('manual')
6733
+ .describe('Discriminator selecting the cost basis mode.'),
6734
+ fiat_currency: currencyCodeWire,
6735
+ rate: numericWire,
6736
+ })
6737
+ .describe('Cost basis with an explicit conversion rate supplied with the charge.');
6664
6738
  export const totalsWire = z
6665
6739
  .strictObject({
6666
6740
  amount: numericWire,
@@ -6718,12 +6792,6 @@ export const featureLlmUnitCostPricingWire = z
6718
6792
  cache_write_per_token: numericWire.optional(),
6719
6793
  })
6720
6794
  .describe('Resolved per-token pricing from the LLM cost database.');
6721
- export const currencyAmountWire = z
6722
- .strictObject({
6723
- amount: numericWire,
6724
- currency: currencyCodeWire,
6725
- })
6726
- .describe('Monetary amount in a specific currency.');
6727
6795
  export const invoiceLineCreditsAppliedWire = z
6728
6796
  .strictObject({
6729
6797
  amount: numericWire,
@@ -6775,6 +6843,12 @@ export const llmCostModelPricingWire = z
6775
6843
  reasoning_per_token: numericWire.optional(),
6776
6844
  })
6777
6845
  .describe('Token pricing for an LLM model, denominated per token.');
6846
+ export const fiatCurrencyAmountWire = z
6847
+ .strictObject({
6848
+ amount: numericWire,
6849
+ currency: currencyCodeWire,
6850
+ })
6851
+ .describe('Monetary amount in a specific fiat currency.');
6778
6852
  export const queryFilterNumericWire = z
6779
6853
  .strictObject({
6780
6854
  gt: numericWire.optional(),
@@ -6897,6 +6971,15 @@ export const subscriptionReferenceWire = z
6897
6971
  .describe('The phase of the subscription.'),
6898
6972
  })
6899
6973
  .describe('Subscription reference represents a reference to the specific subscription item this entity represents.');
6974
+ export const chargeCostBasisPinnedWire = z
6975
+ .strictObject({
6976
+ type: z
6977
+ .literal('pinned')
6978
+ .describe('Discriminator selecting the cost basis mode.'),
6979
+ fiat_currency: currencyCodeWire,
6980
+ cost_basis_id: ulidWire,
6981
+ })
6982
+ .describe('Cost basis pinned to a specific cost basis resource of the custom currency.');
6900
6983
  export const appReferenceWire = z
6901
6984
  .strictObject({
6902
6985
  id: ulidWire,
@@ -7036,6 +7119,14 @@ export const closedPeriodWire = z
7036
7119
  to: dateTimeWire,
7037
7120
  })
7038
7121
  .describe('A period with defined start and end dates. The period is always inclusive at the start and exclusive at the end.');
7122
+ export const chargeResolvedCostBasisWire = z
7123
+ .strictObject({
7124
+ fiat_currency: currencyCodeWire,
7125
+ rate: numericWire,
7126
+ cost_basis_id: ulidWire.optional(),
7127
+ resolved_at: dateTimeWire,
7128
+ })
7129
+ .describe('Fiat conversion rate a custom-currency charge is invoiced at. Present once the cost basis is resolved; dynamic cost bases are exposed only after the service period has started.');
7039
7130
  export const subscriptionAddonTimelineSegmentWire = z
7040
7131
  .strictObject({
7041
7132
  active_from: dateTimeWire,
@@ -7990,6 +8081,12 @@ export const creditTransactionWire = z
7990
8081
  .describe('The available balance before and after the transaction.'),
7991
8082
  })
7992
8083
  .describe("A credit transaction represents a single credit movement on the customer's balance. Credit transactions are immutable.");
8084
+ export const currencyAmountWire = z
8085
+ .strictObject({
8086
+ amount: numericWire,
8087
+ currency: billingCurrencyCodeWire,
8088
+ })
8089
+ .describe('Monetary amount in a fiat or custom currency.');
7993
8090
  export const priceTierWire = z
7994
8091
  .strictObject({
7995
8092
  up_to_amount: numericWire.optional(),
@@ -8150,6 +8247,13 @@ export const updateOrganizationDefaultTaxCodesRequestWire = z
8150
8247
  credit_grant_tax_code: taxCodeReferenceWire.optional(),
8151
8248
  })
8152
8249
  .describe('OrganizationDefaultTaxCodes update request.');
8250
+ export const chargeCostBasisWire = z
8251
+ .discriminatedUnion('type', [
8252
+ chargeCostBasisDynamicWire,
8253
+ chargeCostBasisPinnedWire,
8254
+ chargeCostBasisManualWire,
8255
+ ])
8256
+ .describe('Cost basis selection for a custom-currency charge. The variant chosen fixes when and how the conversion rate is determined.');
8153
8257
  export const invoiceWorkflowAppsReferencesWire = z
8154
8258
  .strictObject({
8155
8259
  tax: appReferenceWire,
@@ -8563,30 +8667,6 @@ export const workflowCollectionAlignmentAnchoredWire = z
8563
8667
  recurring_period: recurringPeriodWire,
8564
8668
  })
8565
8669
  .describe('BillingWorkflowCollectionAlignmentAnchored specifies the alignment for collecting the pending line items into an invoice.');
8566
- export const chargeFlatFeeSystemIntentWire = z
8567
- .strictObject({
8568
- name: z
8569
- .string()
8570
- .min(1)
8571
- .max(256)
8572
- .describe('Display name of the resource. Between 1 and 256 characters.'),
8573
- description: z
8574
- .string()
8575
- .max(1024)
8576
- .optional()
8577
- .describe('Optional description of the resource. Maximum 1024 characters.'),
8578
- labels: labelsWire.optional(),
8579
- invoice_at: dateTimeWire,
8580
- service_period: closedPeriodWire,
8581
- full_service_period: closedPeriodWire,
8582
- billing_period: closedPeriodWire,
8583
- payment_term: pricePaymentTermWire,
8584
- discounts: chargeFlatFeeDiscountsWire.optional(),
8585
- proration_configuration: rateCardProrationConfigurationWire,
8586
- amount_before_proration: currencyAmountWire,
8587
- deleted_at: dateTimeWire.optional(),
8588
- })
8589
- .describe('Flat fee intent fields from the system lifecycle controller shadowed by a manual override.');
8590
8670
  export const invoiceStatusDetailsWire = z
8591
8671
  .strictObject({
8592
8672
  immutable: z
@@ -8780,6 +8860,30 @@ export const creditTransactionPaginatedResponseWire = z
8780
8860
  meta: cursorMetaWire,
8781
8861
  })
8782
8862
  .describe('Cursor paginated response.');
8863
+ export const chargeFlatFeeSystemIntentWire = z
8864
+ .strictObject({
8865
+ name: z
8866
+ .string()
8867
+ .min(1)
8868
+ .max(256)
8869
+ .describe('Display name of the resource. Between 1 and 256 characters.'),
8870
+ description: z
8871
+ .string()
8872
+ .max(1024)
8873
+ .optional()
8874
+ .describe('Optional description of the resource. Maximum 1024 characters.'),
8875
+ labels: labelsWire.optional(),
8876
+ invoice_at: dateTimeWire,
8877
+ service_period: closedPeriodWire,
8878
+ full_service_period: closedPeriodWire,
8879
+ billing_period: closedPeriodWire,
8880
+ payment_term: pricePaymentTermWire,
8881
+ discounts: chargeFlatFeeDiscountsWire.optional(),
8882
+ proration_configuration: rateCardProrationConfigurationWire,
8883
+ amount_before_proration: currencyAmountWire,
8884
+ deleted_at: dateTimeWire.optional(),
8885
+ })
8886
+ .describe('Flat fee intent fields from the system lifecycle controller shadowed by a manual override.');
8783
8887
  export const priceGraduatedWire = z
8784
8888
  .strictObject({
8785
8889
  type: z.literal('graduated').describe('The type of the price.'),
@@ -8897,6 +9001,19 @@ export const creditGrantWire = z
8897
9001
  status: creditGrantStatusWire,
8898
9002
  })
8899
9003
  .describe('A credit grant allocates credits to a customer. Credits are drawn down against charges according to the settlement mode configured on the rate card.');
9004
+ export const workflowTaxSettingsWire = z
9005
+ .strictObject({
9006
+ enabled: z
9007
+ .boolean()
9008
+ .optional()
9009
+ .describe('Enable automatic tax calculation when tax is supported by the app. For example, with Stripe Invoicing when enabled, tax is calculated via Stripe Tax.'),
9010
+ enforced: z
9011
+ .boolean()
9012
+ .optional()
9013
+ .describe('Enforce tax calculation when tax is supported by the app. When enabled, the billing system will not allow to create an invoice without tax calculation. Enforcement is different per apps, for example, Stripe app requires customer to have a tax location when starting a paid subscription.'),
9014
+ default_tax_config: taxConfigWire.optional(),
9015
+ })
9016
+ .describe('Tax settings for a billing workflow.');
8900
9017
  export const createChargeFlatFeeRequestWire = z
8901
9018
  .strictObject({
8902
9019
  name: z
@@ -8911,7 +9028,8 @@ export const createChargeFlatFeeRequestWire = z
8911
9028
  .describe('Optional description of the resource. Maximum 1024 characters.'),
8912
9029
  labels: labelsWire.optional(),
8913
9030
  type: z.literal('flat_fee').describe('The type of the charge.'),
8914
- currency: currencyCodeWire,
9031
+ currency: billingCurrencyCodeWire,
9032
+ cost_basis: chargeCostBasisWire.optional(),
8915
9033
  invoice_at: dateTimeWire,
8916
9034
  service_period: closedPeriodWire,
8917
9035
  unique_reference_id: z
@@ -8929,19 +9047,6 @@ export const createChargeFlatFeeRequestWire = z
8929
9047
  billing_period: closedPeriodWire.optional(),
8930
9048
  })
8931
9049
  .describe('Flat fee charge create request.');
8932
- export const workflowTaxSettingsWire = z
8933
- .strictObject({
8934
- enabled: z
8935
- .boolean()
8936
- .optional()
8937
- .describe('Enable automatic tax calculation when tax is supported by the app. For example, with Stripe Invoicing when enabled, tax is calculated via Stripe Tax.'),
8938
- enforced: z
8939
- .boolean()
8940
- .optional()
8941
- .describe('Enforce tax calculation when tax is supported by the app. When enabled, the billing system will not allow to create an invoice without tax calculation. Enforcement is different per apps, for example, Stripe app requires customer to have a tax location when starting a paid subscription.'),
8942
- default_tax_config: taxConfigWire.optional(),
8943
- })
8944
- .describe('Tax settings for a billing workflow.');
8945
9050
  export const planAddonPagePaginatedResponseWire = z
8946
9051
  .strictObject({
8947
9052
  data: z.array(planAddonWire),
@@ -9579,7 +9684,8 @@ export const createChargeUsageBasedRequestWire = z
9579
9684
  .describe('Optional description of the resource. Maximum 1024 characters.'),
9580
9685
  labels: labelsWire.optional(),
9581
9686
  type: z.literal('usage_based').describe('The type of the charge.'),
9582
- currency: currencyCodeWire,
9687
+ currency: billingCurrencyCodeWire,
9688
+ cost_basis: chargeCostBasisWire.optional(),
9583
9689
  invoice_at: dateTimeWire,
9584
9690
  service_period: closedPeriodWire,
9585
9691
  unique_reference_id: z
@@ -10212,7 +10318,8 @@ export const chargeFlatFeeWire = z
10212
10318
  customer: customerOrReferenceWire,
10213
10319
  lifecycle_controller: lifecycleControllerWire,
10214
10320
  subscription: subscriptionOrReferenceWire.optional(),
10215
- currency: currencyCodeWire,
10321
+ currency: billingCurrencyCodeWire,
10322
+ resolved_cost_basis: chargeResolvedCostBasisWire.optional(),
10216
10323
  status: chargeStatusWire,
10217
10324
  invoice_at: dateTimeWire,
10218
10325
  service_period: closedPeriodWire,
@@ -10258,7 +10365,8 @@ export const chargeUsageBasedWire = z
10258
10365
  customer: customerOrReferenceWire,
10259
10366
  lifecycle_controller: lifecycleControllerWire,
10260
10367
  subscription: subscriptionOrReferenceWire.optional(),
10261
- currency: currencyCodeWire,
10368
+ currency: billingCurrencyCodeWire,
10369
+ resolved_cost_basis: chargeResolvedCostBasisWire.optional(),
10262
10370
  status: chargeStatusWire,
10263
10371
  invoice_at: dateTimeWire,
10264
10372
  service_period: closedPeriodWire,