@openmeter/client 1.0.0-beta-9b1736df5373 → 1.0.0-beta-ee44d4c99979

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.
@@ -678,6 +678,20 @@ export const featureLlmTokenType = z
678
678
  'response',
679
679
  ])
680
680
  .describe('Token type for LLM cost lookup.');
681
+ export const invoiceDiscountReason = z
682
+ .enum(['maximum_spend', 'ratecard_percentage', 'ratecard_usage'])
683
+ .describe('The reason a discount was applied to an invoice line.');
684
+ export const invoiceLineExternalReferences = z
685
+ .object({
686
+ invoicingId: z
687
+ .string()
688
+ .optional()
689
+ .describe('The ID assigned by the external invoicing app.'),
690
+ })
691
+ .describe('External identifiers for an invoice line item assigned by third-party systems.');
692
+ export const invoiceDetailedLineCostCategory = z
693
+ .enum(['regular', 'commitment'])
694
+ .describe('Cost category of a detailed invoice line item.');
681
695
  export const subscriptionCreateTimingEnum = z
682
696
  .enum(['immediate'])
683
697
  .describe('Subscription create timing. Only immediate is supported as an enum value — unlike edit timing, next_billing_cycle is not accepted on create, since a new subscription has no current billing cycle to schedule against.');
@@ -772,20 +786,6 @@ export const workflowCollectionAlignmentSubscription = z
772
786
  export const workflowInvoicingSubscriptionEndProrationMode = z
773
787
  .enum(['bill_full_period', 'bill_actual_period'])
774
788
  .describe('Billing workflow subscription end proration mode.');
775
- export const invoiceDiscountReason = z
776
- .enum(['maximum_spend', 'ratecard_percentage', 'ratecard_usage'])
777
- .describe('The reason a discount was applied to an invoice line.');
778
- export const invoiceLineExternalReferences = z
779
- .object({
780
- invoicingId: z
781
- .string()
782
- .optional()
783
- .describe('The ID assigned by the external invoicing app.'),
784
- })
785
- .describe('External identifiers for an invoice line item assigned by third-party systems.');
786
- export const invoiceDetailedLineCostCategory = z
787
- .enum(['regular', 'commitment'])
788
- .describe('Cost category of a detailed invoice line item.');
789
789
  export const updateBillingInvoiceWorkflowInvoicingSettings = z
790
790
  .object({
791
791
  autoAdvance: z
@@ -1651,16 +1651,16 @@ export const chargeRealizationInvoiceReference = z
1651
1651
  id: ulid,
1652
1652
  })
1653
1653
  .describe('ChargeRealizationInvoice reference.');
1654
- export const addonReference = z
1654
+ export const chargeReference = z
1655
1655
  .object({
1656
1656
  id: ulid,
1657
1657
  })
1658
- .describe('Addon reference.');
1659
- export const chargeReference = z
1658
+ .describe('Reference to a charge associated with an invoice line.');
1659
+ export const addonReference = z
1660
1660
  .object({
1661
1661
  id: ulid,
1662
1662
  })
1663
- .describe('Reference to a charge associated with an invoice line.');
1663
+ .describe('Addon reference.');
1664
1664
  export const updateResourceReference = z
1665
1665
  .object({
1666
1666
  id: ulid,
@@ -1820,6 +1820,15 @@ export const chargeResolvedCostBasis = z
1820
1820
  resolvedAt: dateTime,
1821
1821
  })
1822
1822
  .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.');
1823
+ export const invoiceCustomerChargesInput = z
1824
+ .object({
1825
+ asOf: dateTime.optional(),
1826
+ progressiveBillingOverride: z
1827
+ .boolean()
1828
+ .optional()
1829
+ .describe("Override the customer's progressive billing setting for this collection. When enabled, eligible usage-based lines can be collected for a partial period."),
1830
+ })
1831
+ .describe("Options for manually collecting a customer's pending lines into invoices.");
1823
1832
  export const subscriptionAddonTimelineSegment = z
1824
1833
  .object({
1825
1834
  activeFrom: dateTime,
@@ -2504,6 +2513,41 @@ export const chargeRealizationPayment = z
2504
2513
  status: chargeRealizationPaymentStatus,
2505
2514
  })
2506
2515
  .describe('Payment state of a charge realization.');
2516
+ export const invoiceLineAmountDiscount = z
2517
+ .object({
2518
+ id: ulid,
2519
+ reason: invoiceDiscountReason,
2520
+ description: z
2521
+ .string()
2522
+ .optional()
2523
+ .describe('Optional human-readable description of the discount.'),
2524
+ externalReferences: invoiceLineExternalReferences.optional(),
2525
+ amount: numeric,
2526
+ })
2527
+ .describe('A monetary amount discount applied to an invoice line item.');
2528
+ export const invoiceLineUsageDiscount = z
2529
+ .object({
2530
+ id: ulid,
2531
+ reason: invoiceDiscountReason,
2532
+ description: z
2533
+ .string()
2534
+ .optional()
2535
+ .describe('Optional human-readable description of the discount.'),
2536
+ externalReferences: invoiceLineExternalReferences.optional(),
2537
+ quantity: numeric,
2538
+ })
2539
+ .describe('A usage quantity discount applied to an invoice line item.');
2540
+ export const invoiceLineBaseDiscount = z
2541
+ .object({
2542
+ id: ulid,
2543
+ reason: invoiceDiscountReason,
2544
+ description: z
2545
+ .string()
2546
+ .optional()
2547
+ .describe('Optional human-readable description of the discount.'),
2548
+ externalReferences: invoiceLineExternalReferences.optional(),
2549
+ })
2550
+ .describe('Base fields shared by all invoice line item discounts.');
2507
2551
  export const subscriptionCreateTiming = z
2508
2552
  .union([subscriptionCreateTimingEnum, dateTime])
2509
2553
  .describe('When a subscription should start: immediate (the default) or a custom timestamp to schedule a future start.');
@@ -2631,41 +2675,6 @@ export const workflowInvoicingSettings = z
2631
2675
  .default('bill_actual_period'),
2632
2676
  })
2633
2677
  .describe('Invoice settings for a billing workflow.');
2634
- export const invoiceLineAmountDiscount = z
2635
- .object({
2636
- id: ulid,
2637
- reason: invoiceDiscountReason,
2638
- description: z
2639
- .string()
2640
- .optional()
2641
- .describe('Optional human-readable description of the discount.'),
2642
- externalReferences: invoiceLineExternalReferences.optional(),
2643
- amount: numeric,
2644
- })
2645
- .describe('A monetary amount discount applied to an invoice line item.');
2646
- export const invoiceLineUsageDiscount = z
2647
- .object({
2648
- id: ulid,
2649
- reason: invoiceDiscountReason,
2650
- description: z
2651
- .string()
2652
- .optional()
2653
- .describe('Optional human-readable description of the discount.'),
2654
- externalReferences: invoiceLineExternalReferences.optional(),
2655
- quantity: numeric,
2656
- })
2657
- .describe('A usage quantity discount applied to an invoice line item.');
2658
- export const invoiceLineBaseDiscount = z
2659
- .object({
2660
- id: ulid,
2661
- reason: invoiceDiscountReason,
2662
- description: z
2663
- .string()
2664
- .optional()
2665
- .describe('Optional human-readable description of the discount.'),
2666
- externalReferences: invoiceLineExternalReferences.optional(),
2667
- })
2668
- .describe('Base fields shared by all invoice line item discounts.');
2669
2678
  export const updateBillingWorkflowPaymentSettings = z
2670
2679
  .discriminatedUnion('collectionMethod', [
2671
2680
  updateBillingWorkflowPaymentChargeAutomaticallySettings,
@@ -4043,6 +4052,18 @@ export const invoiceWorkflow = z
4043
4052
  payment: workflowPaymentSettings.optional(),
4044
4053
  })
4045
4054
  .describe('Invoice-level snapshot of the workflow configuration. Contains only the settings that are meaningful for an already-created invoice: invoicing behaviour and payment settings. Collection alignment and tax policy are gather-time / profile-wide concerns and are not included.');
4055
+ export const invoiceLineDiscounts = z
4056
+ .object({
4057
+ amount: z
4058
+ .array(invoiceLineAmountDiscount)
4059
+ .optional()
4060
+ .describe('Monetary amount discounts (e.g. from maximum spend commitments).'),
4061
+ usage: z
4062
+ .array(invoiceLineUsageDiscount)
4063
+ .optional()
4064
+ .describe('Usage quantity discounts (e.g. free tier usage allowances).'),
4065
+ })
4066
+ .describe('Discounts applied to an invoice line item.');
4046
4067
  export const subscriptionCancel = z
4047
4068
  .object({
4048
4069
  timing: subscriptionEditTiming.optional().default('immediate'),
@@ -4165,18 +4186,6 @@ export const updateAppRequest = z
4165
4186
  updateAppExternalInvoicingRequest,
4166
4187
  ])
4167
4188
  .describe('Request to update an installed app.');
4168
- export const invoiceLineDiscounts = z
4169
- .object({
4170
- amount: z
4171
- .array(invoiceLineAmountDiscount)
4172
- .optional()
4173
- .describe('Monetary amount discounts (e.g. from maximum spend commitments).'),
4174
- usage: z
4175
- .array(invoiceLineUsageDiscount)
4176
- .optional()
4177
- .describe('Usage quantity discounts (e.g. free tier usage allowances).'),
4178
- })
4179
- .describe('Discounts applied to an invoice line item.');
4180
4189
  export const updateBillingInvoiceWorkflow = z
4181
4190
  .object({
4182
4191
  invoicing: updateBillingInvoiceWorkflowInvoicingSettings.optional(),
@@ -4696,6 +4705,36 @@ export const invoiceWorkflowSettings = z
4696
4705
  workflow: invoiceWorkflow,
4697
4706
  })
4698
4707
  .describe('Snapshot of the billing workflow configuration captured at invoice creation.');
4708
+ export const invoiceDetailedLine = z
4709
+ .object({
4710
+ id: ulid,
4711
+ name: z
4712
+ .string()
4713
+ .min(1)
4714
+ .max(256)
4715
+ .describe('Display name of the resource. Between 1 and 256 characters.'),
4716
+ description: z
4717
+ .string()
4718
+ .max(1024)
4719
+ .optional()
4720
+ .describe('Optional description of the resource. Maximum 1024 characters.'),
4721
+ labels: labels.optional(),
4722
+ createdAt: dateTime,
4723
+ updatedAt: dateTime,
4724
+ deletedAt: dateTime.optional(),
4725
+ servicePeriod: closedPeriod,
4726
+ totals: totals,
4727
+ category: invoiceDetailedLineCostCategory.default('regular'),
4728
+ discounts: invoiceLineDiscounts.optional(),
4729
+ creditsApplied: z
4730
+ .array(invoiceLineCreditsApplied)
4731
+ .optional()
4732
+ .describe('Credit applied to this detailed line.'),
4733
+ externalReferences: invoiceLineExternalReferences.optional(),
4734
+ quantity: numeric,
4735
+ unitPrice: numeric,
4736
+ })
4737
+ .describe('A detailed (child) sub-line belonging to a parent invoice line. Detailed lines represent the individual flat-fee components that make up a usage-based parent line after quantity snapshotting.');
4699
4738
  export const taxCodePagePaginatedResponse = z
4700
4739
  .object({
4701
4740
  data: z.array(taxCode),
@@ -4903,36 +4942,6 @@ export const installedAppExternalInvoicing = z
4903
4942
  .describe('Default capabilities of the installed app.'),
4904
4943
  })
4905
4944
  .describe('Response of an installed app.');
4906
- export const invoiceDetailedLine = z
4907
- .object({
4908
- id: ulid,
4909
- name: z
4910
- .string()
4911
- .min(1)
4912
- .max(256)
4913
- .describe('Display name of the resource. Between 1 and 256 characters.'),
4914
- description: z
4915
- .string()
4916
- .max(1024)
4917
- .optional()
4918
- .describe('Optional description of the resource. Maximum 1024 characters.'),
4919
- labels: labels.optional(),
4920
- createdAt: dateTime,
4921
- updatedAt: dateTime,
4922
- deletedAt: dateTime.optional(),
4923
- servicePeriod: closedPeriod,
4924
- totals: totals,
4925
- category: invoiceDetailedLineCostCategory.default('regular'),
4926
- discounts: invoiceLineDiscounts.optional(),
4927
- creditsApplied: z
4928
- .array(invoiceLineCreditsApplied)
4929
- .optional()
4930
- .describe('Credit applied to this detailed line.'),
4931
- externalReferences: invoiceLineExternalReferences.optional(),
4932
- quantity: numeric,
4933
- unitPrice: numeric,
4934
- })
4935
- .describe('A detailed (child) sub-line belonging to a parent invoice line. Detailed lines represent the individual flat-fee components that make up a usage-based parent line after quantity snapshotting.');
4936
4945
  export const updateInvoiceWorkflowSettings = z
4937
4946
  .object({
4938
4947
  workflow: updateBillingInvoiceWorkflow,
@@ -6210,6 +6219,13 @@ export const chargeUsageBased = z
6210
6219
  systemIntent: chargeUsageBasedSystemIntent.optional(),
6211
6220
  })
6212
6221
  .describe('A usage-based charge for a customer.');
6222
+ export const invoiceCustomerChargesResult = z
6223
+ .object({
6224
+ invoices: z
6225
+ .array(invoice)
6226
+ .describe('Created standard invoices, one per collected currency.'),
6227
+ })
6228
+ .describe("Result of manually collecting a customer's pending lines into invoices.");
6213
6229
  export const invoicePagePaginatedResponse = z
6214
6230
  .object({
6215
6231
  data: z.array(invoice),
@@ -6618,6 +6634,11 @@ export const createCustomerChargesPathParams = z.object({
6618
6634
  });
6619
6635
  export const createCustomerChargesBody = createChargeRequest;
6620
6636
  export const createCustomerChargesResponse = charge;
6637
+ export const invoiceCustomerChargesPathParams = z.object({
6638
+ customerId: ulid,
6639
+ });
6640
+ export const invoiceCustomerChargesBody = invoiceCustomerChargesInput;
6641
+ export const invoiceCustomerChargesResponse = invoiceCustomerChargesResult;
6621
6642
  export const createSubscriptionBody = subscriptionCreate;
6622
6643
  export const createSubscriptionResponse = subscription;
6623
6644
  export const listSubscriptionsQueryParams = z.object({
@@ -7950,6 +7971,20 @@ export const featureLlmTokenTypeWire = z
7950
7971
  'response',
7951
7972
  ])
7952
7973
  .describe('Token type for LLM cost lookup.');
7974
+ export const invoiceDiscountReasonWire = z
7975
+ .enum(['maximum_spend', 'ratecard_percentage', 'ratecard_usage'])
7976
+ .describe('The reason a discount was applied to an invoice line.');
7977
+ export const invoiceLineExternalReferencesWire = z
7978
+ .strictObject({
7979
+ invoicing_id: z
7980
+ .string()
7981
+ .optional()
7982
+ .describe('The ID assigned by the external invoicing app.'),
7983
+ })
7984
+ .describe('External identifiers for an invoice line item assigned by third-party systems.');
7985
+ export const invoiceDetailedLineCostCategoryWire = z
7986
+ .enum(['regular', 'commitment'])
7987
+ .describe('Cost category of a detailed invoice line item.');
7953
7988
  export const subscriptionCreateTimingEnumWire = z
7954
7989
  .enum(['immediate'])
7955
7990
  .describe('Subscription create timing. Only immediate is supported as an enum value — unlike edit timing, next_billing_cycle is not accepted on create, since a new subscription has no current billing cycle to schedule against.');
@@ -8044,20 +8079,6 @@ export const workflowCollectionAlignmentSubscriptionWire = z
8044
8079
  export const workflowInvoicingSubscriptionEndProrationModeWire = z
8045
8080
  .enum(['bill_full_period', 'bill_actual_period'])
8046
8081
  .describe('Billing workflow subscription end proration mode.');
8047
- export const invoiceDiscountReasonWire = z
8048
- .enum(['maximum_spend', 'ratecard_percentage', 'ratecard_usage'])
8049
- .describe('The reason a discount was applied to an invoice line.');
8050
- export const invoiceLineExternalReferencesWire = z
8051
- .strictObject({
8052
- invoicing_id: z
8053
- .string()
8054
- .optional()
8055
- .describe('The ID assigned by the external invoicing app.'),
8056
- })
8057
- .describe('External identifiers for an invoice line item assigned by third-party systems.');
8058
- export const invoiceDetailedLineCostCategoryWire = z
8059
- .enum(['regular', 'commitment'])
8060
- .describe('Cost category of a detailed invoice line item.');
8061
8082
  export const updateBillingInvoiceWorkflowInvoicingSettingsWire = z
8062
8083
  .strictObject({
8063
8084
  auto_advance: z
@@ -8919,16 +8940,16 @@ export const chargeRealizationInvoiceReferenceWire = z
8919
8940
  id: ulidWire,
8920
8941
  })
8921
8942
  .describe('ChargeRealizationInvoice reference.');
8922
- export const addonReferenceWire = z
8943
+ export const chargeReferenceWire = z
8923
8944
  .strictObject({
8924
8945
  id: ulidWire,
8925
8946
  })
8926
- .describe('Addon reference.');
8927
- export const chargeReferenceWire = z
8947
+ .describe('Reference to a charge associated with an invoice line.');
8948
+ export const addonReferenceWire = z
8928
8949
  .strictObject({
8929
8950
  id: ulidWire,
8930
8951
  })
8931
- .describe('Reference to a charge associated with an invoice line.');
8952
+ .describe('Addon reference.');
8932
8953
  export const updateResourceReferenceWire = z
8933
8954
  .strictObject({
8934
8955
  id: ulidWire,
@@ -9086,6 +9107,15 @@ export const chargeResolvedCostBasisWire = z
9086
9107
  resolved_at: dateTimeWire,
9087
9108
  })
9088
9109
  .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.');
9110
+ export const invoiceCustomerChargesInputWire = z
9111
+ .strictObject({
9112
+ as_of: dateTimeWire.optional(),
9113
+ progressive_billing_override: z
9114
+ .boolean()
9115
+ .optional()
9116
+ .describe("Override the customer's progressive billing setting for this collection. When enabled, eligible usage-based lines can be collected for a partial period."),
9117
+ })
9118
+ .describe("Options for manually collecting a customer's pending lines into invoices.");
9089
9119
  export const subscriptionAddonTimelineSegmentWire = z
9090
9120
  .strictObject({
9091
9121
  active_from: dateTimeWire,
@@ -9757,6 +9787,41 @@ export const chargeRealizationPaymentWire = z
9757
9787
  status: chargeRealizationPaymentStatusWire,
9758
9788
  })
9759
9789
  .describe('Payment state of a charge realization.');
9790
+ export const invoiceLineAmountDiscountWire = z
9791
+ .strictObject({
9792
+ id: ulidWire,
9793
+ reason: invoiceDiscountReasonWire,
9794
+ description: z
9795
+ .string()
9796
+ .optional()
9797
+ .describe('Optional human-readable description of the discount.'),
9798
+ external_references: invoiceLineExternalReferencesWire.optional(),
9799
+ amount: numericWire,
9800
+ })
9801
+ .describe('A monetary amount discount applied to an invoice line item.');
9802
+ export const invoiceLineUsageDiscountWire = z
9803
+ .strictObject({
9804
+ id: ulidWire,
9805
+ reason: invoiceDiscountReasonWire,
9806
+ description: z
9807
+ .string()
9808
+ .optional()
9809
+ .describe('Optional human-readable description of the discount.'),
9810
+ external_references: invoiceLineExternalReferencesWire.optional(),
9811
+ quantity: numericWire,
9812
+ })
9813
+ .describe('A usage quantity discount applied to an invoice line item.');
9814
+ export const invoiceLineBaseDiscountWire = z
9815
+ .strictObject({
9816
+ id: ulidWire,
9817
+ reason: invoiceDiscountReasonWire,
9818
+ description: z
9819
+ .string()
9820
+ .optional()
9821
+ .describe('Optional human-readable description of the discount.'),
9822
+ external_references: invoiceLineExternalReferencesWire.optional(),
9823
+ })
9824
+ .describe('Base fields shared by all invoice line item discounts.');
9760
9825
  export const subscriptionCreateTimingWire = z
9761
9826
  .union([subscriptionCreateTimingEnumWire, dateTimeWire])
9762
9827
  .describe('When a subscription should start: immediate (the default) or a custom timestamp to schedule a future start.');
@@ -9881,41 +9946,6 @@ export const workflowInvoicingSettingsWire = z
9881
9946
  subscription_end_proration_mode: workflowInvoicingSubscriptionEndProrationModeWire.optional(),
9882
9947
  })
9883
9948
  .describe('Invoice settings for a billing workflow.');
9884
- export const invoiceLineAmountDiscountWire = z
9885
- .strictObject({
9886
- id: ulidWire,
9887
- reason: invoiceDiscountReasonWire,
9888
- description: z
9889
- .string()
9890
- .optional()
9891
- .describe('Optional human-readable description of the discount.'),
9892
- external_references: invoiceLineExternalReferencesWire.optional(),
9893
- amount: numericWire,
9894
- })
9895
- .describe('A monetary amount discount applied to an invoice line item.');
9896
- export const invoiceLineUsageDiscountWire = z
9897
- .strictObject({
9898
- id: ulidWire,
9899
- reason: invoiceDiscountReasonWire,
9900
- description: z
9901
- .string()
9902
- .optional()
9903
- .describe('Optional human-readable description of the discount.'),
9904
- external_references: invoiceLineExternalReferencesWire.optional(),
9905
- quantity: numericWire,
9906
- })
9907
- .describe('A usage quantity discount applied to an invoice line item.');
9908
- export const invoiceLineBaseDiscountWire = z
9909
- .strictObject({
9910
- id: ulidWire,
9911
- reason: invoiceDiscountReasonWire,
9912
- description: z
9913
- .string()
9914
- .optional()
9915
- .describe('Optional human-readable description of the discount.'),
9916
- external_references: invoiceLineExternalReferencesWire.optional(),
9917
- })
9918
- .describe('Base fields shared by all invoice line item discounts.');
9919
9949
  export const updateBillingWorkflowPaymentSettingsWire = z
9920
9950
  .discriminatedUnion('collection_method', [
9921
9951
  updateBillingWorkflowPaymentChargeAutomaticallySettingsWire,
@@ -11280,6 +11310,18 @@ export const invoiceWorkflowWire = z
11280
11310
  payment: workflowPaymentSettingsWire.optional(),
11281
11311
  })
11282
11312
  .describe('Invoice-level snapshot of the workflow configuration. Contains only the settings that are meaningful for an already-created invoice: invoicing behaviour and payment settings. Collection alignment and tax policy are gather-time / profile-wide concerns and are not included.');
11313
+ export const invoiceLineDiscountsWire = z
11314
+ .strictObject({
11315
+ amount: z
11316
+ .array(invoiceLineAmountDiscountWire)
11317
+ .optional()
11318
+ .describe('Monetary amount discounts (e.g. from maximum spend commitments).'),
11319
+ usage: z
11320
+ .array(invoiceLineUsageDiscountWire)
11321
+ .optional()
11322
+ .describe('Usage quantity discounts (e.g. free tier usage allowances).'),
11323
+ })
11324
+ .describe('Discounts applied to an invoice line item.');
11283
11325
  export const subscriptionCancelWire = z
11284
11326
  .strictObject({
11285
11327
  timing: subscriptionEditTimingWire.optional(),
@@ -11404,18 +11446,6 @@ export const updateAppRequestWire = z
11404
11446
  updateAppExternalInvoicingRequestWire,
11405
11447
  ])
11406
11448
  .describe('Request to update an installed app.');
11407
- export const invoiceLineDiscountsWire = z
11408
- .strictObject({
11409
- amount: z
11410
- .array(invoiceLineAmountDiscountWire)
11411
- .optional()
11412
- .describe('Monetary amount discounts (e.g. from maximum spend commitments).'),
11413
- usage: z
11414
- .array(invoiceLineUsageDiscountWire)
11415
- .optional()
11416
- .describe('Usage quantity discounts (e.g. free tier usage allowances).'),
11417
- })
11418
- .describe('Discounts applied to an invoice line item.');
11419
11449
  export const updateBillingInvoiceWorkflowWire = z
11420
11450
  .strictObject({
11421
11451
  invoicing: updateBillingInvoiceWorkflowInvoicingSettingsWire.optional(),
@@ -11926,6 +11956,36 @@ export const invoiceWorkflowSettingsWire = z
11926
11956
  workflow: invoiceWorkflowWire,
11927
11957
  })
11928
11958
  .describe('Snapshot of the billing workflow configuration captured at invoice creation.');
11959
+ export const invoiceDetailedLineWire = z
11960
+ .strictObject({
11961
+ id: ulidWire,
11962
+ name: z
11963
+ .string()
11964
+ .min(1)
11965
+ .max(256)
11966
+ .describe('Display name of the resource. Between 1 and 256 characters.'),
11967
+ description: z
11968
+ .string()
11969
+ .max(1024)
11970
+ .optional()
11971
+ .describe('Optional description of the resource. Maximum 1024 characters.'),
11972
+ labels: labelsWire.optional(),
11973
+ created_at: dateTimeWire,
11974
+ updated_at: dateTimeWire,
11975
+ deleted_at: dateTimeWire.optional(),
11976
+ service_period: closedPeriodWire,
11977
+ totals: totalsWire,
11978
+ category: invoiceDetailedLineCostCategoryWire,
11979
+ discounts: invoiceLineDiscountsWire.optional(),
11980
+ credits_applied: z
11981
+ .array(invoiceLineCreditsAppliedWire)
11982
+ .optional()
11983
+ .describe('Credit applied to this detailed line.'),
11984
+ external_references: invoiceLineExternalReferencesWire.optional(),
11985
+ quantity: numericWire,
11986
+ unit_price: numericWire,
11987
+ })
11988
+ .describe('A detailed (child) sub-line belonging to a parent invoice line. Detailed lines represent the individual flat-fee components that make up a usage-based parent line after quantity snapshotting.');
11929
11989
  export const taxCodePagePaginatedResponseWire = z
11930
11990
  .strictObject({
11931
11991
  data: z.array(taxCodeWire),
@@ -12133,36 +12193,6 @@ export const installedAppExternalInvoicingWire = z
12133
12193
  .describe('Default capabilities of the installed app.'),
12134
12194
  })
12135
12195
  .describe('Response of an installed app.');
12136
- export const invoiceDetailedLineWire = z
12137
- .strictObject({
12138
- id: ulidWire,
12139
- name: z
12140
- .string()
12141
- .min(1)
12142
- .max(256)
12143
- .describe('Display name of the resource. Between 1 and 256 characters.'),
12144
- description: z
12145
- .string()
12146
- .max(1024)
12147
- .optional()
12148
- .describe('Optional description of the resource. Maximum 1024 characters.'),
12149
- labels: labelsWire.optional(),
12150
- created_at: dateTimeWire,
12151
- updated_at: dateTimeWire,
12152
- deleted_at: dateTimeWire.optional(),
12153
- service_period: closedPeriodWire,
12154
- totals: totalsWire,
12155
- category: invoiceDetailedLineCostCategoryWire,
12156
- discounts: invoiceLineDiscountsWire.optional(),
12157
- credits_applied: z
12158
- .array(invoiceLineCreditsAppliedWire)
12159
- .optional()
12160
- .describe('Credit applied to this detailed line.'),
12161
- external_references: invoiceLineExternalReferencesWire.optional(),
12162
- quantity: numericWire,
12163
- unit_price: numericWire,
12164
- })
12165
- .describe('A detailed (child) sub-line belonging to a parent invoice line. Detailed lines represent the individual flat-fee components that make up a usage-based parent line after quantity snapshotting.');
12166
12196
  export const updateInvoiceWorkflowSettingsWire = z
12167
12197
  .strictObject({
12168
12198
  workflow: updateBillingInvoiceWorkflowWire,
@@ -13437,6 +13467,13 @@ export const chargeUsageBasedWire = z
13437
13467
  system_intent: chargeUsageBasedSystemIntentWire.optional(),
13438
13468
  })
13439
13469
  .describe('A usage-based charge for a customer.');
13470
+ export const invoiceCustomerChargesResultWire = z
13471
+ .strictObject({
13472
+ invoices: z
13473
+ .array(invoiceWire)
13474
+ .describe('Created standard invoices, one per collected currency.'),
13475
+ })
13476
+ .describe("Result of manually collecting a customer's pending lines into invoices.");
13440
13477
  export const invoicePagePaginatedResponseWire = z
13441
13478
  .strictObject({
13442
13479
  data: z.array(invoiceWire),
@@ -13874,6 +13911,11 @@ export const createCustomerChargesPathParamsWire = z.object({
13874
13911
  });
13875
13912
  export const createCustomerChargesBodyWire = createChargeRequestWire;
13876
13913
  export const createCustomerChargesResponseWire = chargeWire;
13914
+ export const invoiceCustomerChargesPathParamsWire = z.object({
13915
+ customerId: ulidWire,
13916
+ });
13917
+ export const invoiceCustomerChargesBodyWire = invoiceCustomerChargesInputWire;
13918
+ export const invoiceCustomerChargesResponseWire = invoiceCustomerChargesResultWire;
13877
13919
  export const createSubscriptionBodyWire = subscriptionCreateWire;
13878
13920
  export const createSubscriptionResponseWire = subscriptionWire;
13879
13921
  export const listSubscriptionsQueryParamsWire = z.object({