lago-javascript-client 1.47.1 → 1.48.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.
@@ -2992,6 +2992,66 @@ export interface webhooks {
2992
2992
  patch?: never;
2993
2993
  trace?: never;
2994
2994
  };
2995
+ billable_metric_created: {
2996
+ parameters: {
2997
+ query?: never;
2998
+ header?: never;
2999
+ path?: never;
3000
+ cookie?: never;
3001
+ };
3002
+ get?: never;
3003
+ put?: never;
3004
+ /**
3005
+ * A new billable metric has been created
3006
+ * @description A new billable metric has been created
3007
+ */
3008
+ post: operations["billableMetricCreated"];
3009
+ delete?: never;
3010
+ options?: never;
3011
+ head?: never;
3012
+ patch?: never;
3013
+ trace?: never;
3014
+ };
3015
+ billable_metric_updated: {
3016
+ parameters: {
3017
+ query?: never;
3018
+ header?: never;
3019
+ path?: never;
3020
+ cookie?: never;
3021
+ };
3022
+ get?: never;
3023
+ put?: never;
3024
+ /**
3025
+ * A billable metric has been updated
3026
+ * @description A billable metric has been updated
3027
+ */
3028
+ post: operations["billableMetricUpdated"];
3029
+ delete?: never;
3030
+ options?: never;
3031
+ head?: never;
3032
+ patch?: never;
3033
+ trace?: never;
3034
+ };
3035
+ billable_metric_deleted: {
3036
+ parameters: {
3037
+ query?: never;
3038
+ header?: never;
3039
+ path?: never;
3040
+ cookie?: never;
3041
+ };
3042
+ get?: never;
3043
+ put?: never;
3044
+ /**
3045
+ * A billable metric has been deleted
3046
+ * @description A billable metric has been deleted
3047
+ */
3048
+ post: operations["billableMetricDeleted"];
3049
+ delete?: never;
3050
+ options?: never;
3051
+ head?: never;
3052
+ patch?: never;
3053
+ trace?: never;
3054
+ };
2995
3055
  customer_created: {
2996
3056
  parameters: {
2997
3057
  query?: never;
@@ -6225,6 +6285,18 @@ export interface components {
6225
6285
  */
6226
6286
  conversion_rate: string;
6227
6287
  };
6288
+ /** @description Array of usage breakdowns split by presentation group keys without affecting pricing or aggregation. */
6289
+ PresentationBreakdownsObject: {
6290
+ /** @description Key value list of event properties used for presentation grouping. */
6291
+ presentation_by?: {
6292
+ [key: string]: string;
6293
+ };
6294
+ /**
6295
+ * @description The number of units consumed for a specific presentation group.
6296
+ * @example 9.0
6297
+ */
6298
+ units?: string;
6299
+ }[];
6228
6300
  FeeObject: {
6229
6301
  /**
6230
6302
  * Format: uuid
@@ -6515,6 +6587,7 @@ export interface components {
6515
6587
  applied_taxes?: components["schemas"]["FeeAppliedTaxObject"][];
6516
6588
  /** @description Details about the pricing unit used and amounts for this fee. */
6517
6589
  pricing_unit_details?: components["schemas"]["PricingUnitDetailsObject"];
6590
+ presentation_breakdowns?: components["schemas"]["PresentationBreakdownsObject"];
6518
6591
  };
6519
6592
  CreditNoteItemObject: {
6520
6593
  /**
@@ -7766,55 +7839,6 @@ export interface components {
7766
7839
  */
7767
7840
  updated_at: string;
7768
7841
  };
7769
- BillingPeriodObject: {
7770
- /**
7771
- * Format: uuid
7772
- * @description Unique identifier assigned to the subscription, created by Lago.
7773
- * @example 1a901a90-1a90-1a90-1a90-1a901a901a90
7774
- */
7775
- lago_subscription_id: string;
7776
- /**
7777
- * @description Unique identifier assigned to the subscription in your application.
7778
- * @example external_id
7779
- */
7780
- external_subscription_id: string;
7781
- /**
7782
- * Format: uuid
7783
- * @description Unique identifier assigned to the plan, created by Lago.
7784
- * @example 1a901a90-1a90-1a90-1a90-1a901a901a90
7785
- */
7786
- lago_plan_id: string;
7787
- /**
7788
- * Format: date-time
7789
- * @description The beginning date of the subscription billing period. This field indicates the start date of the billing period associated with the subscription fee.
7790
- * @example 2022-04-29T08:59:51Z
7791
- */
7792
- subscription_from_datetime: string;
7793
- /**
7794
- * Format: date-time
7795
- * @description The ending date of the subscription billing period. This field indicates the end date of the billing period associated with the subscription fee.
7796
- * @example 2022-05-29T08:59:51Z
7797
- */
7798
- subscription_to_datetime: string;
7799
- /**
7800
- * Format: date-time
7801
- * @description The beginning date of the period that covers the charge fees. It is applicable only to the `charge` fees attached to the subscription. This field indicates the start date of the billing period or subscription period associated with the fees.
7802
- * @example 2022-04-29T08:59:51Z
7803
- */
7804
- charges_from_datetime: string;
7805
- /**
7806
- * Format: date-time
7807
- * @description The ending date of the period that covers the charge fees. It is applicable only to the `charge` fees attached to the subscription. This field indicates the end date of the billing period or subscription period associated with the fees.
7808
- * @example 2022-05-29T08:59:51Z
7809
- */
7810
- charges_to_datetime: string;
7811
- /**
7812
- * @description The reason explaining why this subscription appears on the invoice.
7813
- * @example subscription_starting
7814
- * @enum {string}
7815
- */
7816
- invoicing_reason: "subscription_starting" | "subscription_periodic" | "subscription_terminating" | "in_advance_charge" | "in_advance_charge_periodic" | "progressive_billing";
7817
- };
7818
7842
  InvoiceMetadataObject: {
7819
7843
  /**
7820
7844
  * Format: uuid
@@ -7939,7 +7963,6 @@ export interface components {
7939
7963
  InvoiceObject: components["schemas"]["InvoiceBaseObject"] & {
7940
7964
  /** @description The customer on which the invoice applies. It refers to the customer account or entity associated with the invoice. */
7941
7965
  customer?: components["schemas"]["CustomerObject"];
7942
- billing_periods?: components["schemas"]["BillingPeriodObject"][];
7943
7966
  metadata?: components["schemas"]["InvoiceMetadataObject"][];
7944
7967
  applied_taxes?: components["schemas"]["InvoiceAppliedTaxObject"][];
7945
7968
  /** @description The invoice custom sections applied to this invoice for PDF generation. */
@@ -8310,6 +8333,15 @@ export interface components {
8310
8333
  applied_invoice_custom_sections?: components["schemas"]["AppliedInvoiceCustomSectionObject"][];
8311
8334
  /** @description The payment method assigned to this subscription for processing payments. */
8312
8335
  payment_method?: components["schemas"]["PaymentMethodReference"];
8336
+ /**
8337
+ * @description Controls whether this subscription is eligible to be grouped with other subscriptions of the same customer on a consolidated recurring invoice.
8338
+ *
8339
+ * - `true` (default): the subscription is included in the customer's standard invoice grouping (by billing entity, currency and payment method).
8340
+ * - `false`: the subscription is excluded from consolidation and always billed on its own dedicated invoice, regardless of other grouping criteria.
8341
+ * @default true
8342
+ * @example true
8343
+ */
8344
+ consolidate_invoice: boolean;
8313
8345
  };
8314
8346
  SubscriptionsPaginated: {
8315
8347
  subscriptions: components["schemas"]["SubscriptionObject"][];
@@ -9173,6 +9205,7 @@ export interface components {
9173
9205
  values?: {
9174
9206
  [key: string]: string[];
9175
9207
  };
9208
+ presentation_breakdowns?: components["schemas"]["PresentationBreakdownsObject"];
9176
9209
  }[];
9177
9210
  /** @description Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. */
9178
9211
  CustomerChargeGroupedUsageObject: {
@@ -9202,6 +9235,7 @@ export interface components {
9202
9235
  [key: string]: string;
9203
9236
  };
9204
9237
  filters?: components["schemas"]["CustomerChargeFiltersUsageObject"];
9238
+ presentation_breakdowns?: components["schemas"]["PresentationBreakdownsObject"];
9205
9239
  }[];
9206
9240
  CustomerChargeUsageObject: {
9207
9241
  /**
@@ -9248,7 +9282,7 @@ export interface components {
9248
9282
  * @description Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
9249
9283
  * @example Setup
9250
9284
  */
9251
- invoice_display_name?: string;
9285
+ invoice_display_name?: string | null;
9252
9286
  };
9253
9287
  /** @description The related billable metric object. */
9254
9288
  billable_metric: {
@@ -9277,6 +9311,7 @@ export interface components {
9277
9311
  };
9278
9312
  filters?: components["schemas"]["CustomerChargeFiltersUsageObject"];
9279
9313
  grouped_usage?: components["schemas"]["CustomerChargeGroupedUsageObject"];
9314
+ presentation_breakdowns?: components["schemas"]["PresentationBreakdownsObject"];
9280
9315
  };
9281
9316
  CustomerUsageObject: {
9282
9317
  /**
@@ -9329,6 +9364,171 @@ export interface components {
9329
9364
  CustomerUsage: {
9330
9365
  customer_usage: components["schemas"]["CustomerUsageObject"];
9331
9366
  };
9367
+ /** @description Array of filter object, representing multiple dimensions for a charge item. */
9368
+ CustomerProjectedChargeFiltersUsageObject: {
9369
+ /**
9370
+ * @description The number of units consumed for a specific charge filter related to a charge item.
9371
+ * @example 0.9
9372
+ */
9373
+ units?: string;
9374
+ /**
9375
+ * @description The projected number of units that can be consumed for a specific charge filter related to a charge item.
9376
+ * @example 1.8
9377
+ */
9378
+ projected_units?: string;
9379
+ /**
9380
+ * @description The amount in cents, tax excluded, consumed for a specific charge filter related to a charge item.
9381
+ * @example 1000
9382
+ */
9383
+ amount_cents?: number;
9384
+ /**
9385
+ * @description The projected amount in cents, tax excluded, that can be consumed for a specific charge filter related to a charge item.
9386
+ * @example 2000
9387
+ */
9388
+ projected_amount_cents?: number;
9389
+ /**
9390
+ * @description The quantity of usage events that have been recorded for a particular charge filter during the specified time period. These events may also be referred to as the number of transactions in some contexts.
9391
+ * @example 10
9392
+ */
9393
+ events_count?: number;
9394
+ /**
9395
+ * @description Specifies the name that will be displayed on an invoice.
9396
+ * @example AWS eu-east-1
9397
+ */
9398
+ invoice_display_name?: string;
9399
+ pricing_unit_details?: components["schemas"]["UsagePricingUnitDetailsObject"];
9400
+ /**
9401
+ * @description List of filter values applied to the usage.
9402
+ * @example {
9403
+ * "region": [
9404
+ * "us-east-1"
9405
+ * ]
9406
+ * }
9407
+ */
9408
+ values?: {
9409
+ [key: string]: string[];
9410
+ };
9411
+ presentation_breakdowns?: components["schemas"]["PresentationBreakdownsObject"];
9412
+ projected_presentation_breakdowns?: components["schemas"]["PresentationBreakdownsObject"];
9413
+ }[];
9414
+ /** @description Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. */
9415
+ CustomerProjectedChargeGroupedUsageObject: {
9416
+ /**
9417
+ * @description The amount in cents, tax excluded, consumed for a specific group related to a charge item.
9418
+ * @example 1000
9419
+ */
9420
+ amount_cents?: number;
9421
+ /**
9422
+ * @description The projected amount in cents, tax excluded, that can be consumed for a specific group related to a charge item.
9423
+ * @example 2000
9424
+ */
9425
+ projected_amount_cents?: number;
9426
+ /**
9427
+ * @description The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts.
9428
+ * @example 10
9429
+ */
9430
+ events_count?: number;
9431
+ /**
9432
+ * @description The number of units consumed for a specific group related to a charge item.
9433
+ * @example 0.9
9434
+ */
9435
+ units?: string;
9436
+ /**
9437
+ * @description The projected number of units that can be consumed for a specific group related to a charge item.
9438
+ * @example 1.8
9439
+ */
9440
+ projected_units?: string;
9441
+ pricing_unit_details?: components["schemas"]["UsagePricingUnitDetailsObject"];
9442
+ /** @description Key value list of event properties aggregated by the charge model */
9443
+ grouped_by?: {
9444
+ [key: string]: string;
9445
+ };
9446
+ filters?: components["schemas"]["CustomerProjectedChargeFiltersUsageObject"];
9447
+ presentation_breakdowns?: components["schemas"]["PresentationBreakdownsObject"];
9448
+ projected_presentation_breakdowns?: components["schemas"]["PresentationBreakdownsObject"];
9449
+ }[];
9450
+ CustomerProjectedChargeUsageObject: {
9451
+ /**
9452
+ * @description The number of units consumed by the customer for a specific charge item.
9453
+ * @example 1.0
9454
+ */
9455
+ units: string;
9456
+ /**
9457
+ * @description The projected number of units that can be consumed by the customer for a specific charge item.
9458
+ * @example 2.0
9459
+ */
9460
+ projected_units: string;
9461
+ /**
9462
+ * @description The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts.
9463
+ * @example 10
9464
+ */
9465
+ events_count: number;
9466
+ /**
9467
+ * @description The amount in cents, tax excluded, consumed by the customer for a specific charge item.
9468
+ * @example 123
9469
+ */
9470
+ amount_cents: number;
9471
+ /**
9472
+ * @description The projected amount in cents, tax excluded, that can be consumed by the customer for a specific charge item.
9473
+ * @example 256
9474
+ */
9475
+ projected_amount_cents: number;
9476
+ /**
9477
+ * @description The currency of a usage item consumed by the customer.
9478
+ * @example EUR
9479
+ */
9480
+ amount_currency: components["schemas"]["Currency"];
9481
+ pricing_unit_details?: components["schemas"]["UsagePricingUnitDetailsObject"];
9482
+ /** @description Object listing all the properties for a specific charge item. */
9483
+ charge: {
9484
+ /**
9485
+ * Format: uuid
9486
+ * @description Unique identifier assigned to the charge within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the charge's record within the Lago system.
9487
+ * @example 1a901a90-1a90-1a90-1a90-1a901a901a90
9488
+ */
9489
+ lago_id: string;
9490
+ /**
9491
+ * @description The pricing model applied to this charge. Possible values are standard, `graduated`, `percentage`, `package` or `volume`.
9492
+ * @example graduated
9493
+ * @enum {string}
9494
+ */
9495
+ charge_model: "standard" | "graduated" | "package" | "percentage" | "volume";
9496
+ /**
9497
+ * @description Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
9498
+ * @example Setup
9499
+ */
9500
+ invoice_display_name?: string;
9501
+ };
9502
+ /** @description The related billable metric object. */
9503
+ billable_metric: {
9504
+ /**
9505
+ * Format: uuid
9506
+ * @description Unique identifier assigned to the billable metric within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the billable metric's record within the Lago system.
9507
+ * @example 1a901a90-1a90-1a90-1a90-1a901a901a90
9508
+ */
9509
+ lago_id: string;
9510
+ /**
9511
+ * @description The name of the billable metric used for this charge.
9512
+ * @example Storage
9513
+ */
9514
+ name: string;
9515
+ /**
9516
+ * @description The code of the billable metric used for this charge.
9517
+ * @example storage
9518
+ */
9519
+ code: string;
9520
+ /**
9521
+ * @description The aggregation type of the billable metric used for this charge. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`.
9522
+ * @example sum_agg
9523
+ * @enum {string}
9524
+ */
9525
+ aggregation_type: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg" | "weighted_sum_agg" | "latest_agg";
9526
+ };
9527
+ filters?: components["schemas"]["CustomerProjectedChargeFiltersUsageObject"];
9528
+ grouped_usage?: components["schemas"]["CustomerProjectedChargeGroupedUsageObject"];
9529
+ presentation_breakdowns?: components["schemas"]["PresentationBreakdownsObject"];
9530
+ projected_presentation_breakdowns?: components["schemas"]["PresentationBreakdownsObject"];
9531
+ };
9332
9532
  CustomerProjectedUsageObject: {
9333
9533
  /**
9334
9534
  * Format: date-time
@@ -9380,13 +9580,13 @@ export interface components {
9380
9580
  */
9381
9581
  total_amount_cents: number;
9382
9582
  /** @description Array of charges that comprise the current usage. It contains detailed information about individual charge items associated with the usage. */
9383
- charges_usage: components["schemas"]["CustomerChargeUsageObject"][];
9583
+ charges_usage: components["schemas"]["CustomerProjectedChargeUsageObject"][];
9384
9584
  };
9385
9585
  CustomerProjectedUsage: {
9386
9586
  customer_projected_usage: components["schemas"]["CustomerProjectedUsageObject"];
9387
9587
  };
9388
9588
  CustomerPastUsage: {
9389
- usage_periods: components["schemas"]["CustomerUsage"][];
9589
+ usage_periods: components["schemas"]["CustomerUsageObject"][];
9390
9590
  meta: components["schemas"]["PaginationMeta"];
9391
9591
  };
9392
9592
  CustomerCheckoutUrl: {
@@ -9916,7 +10116,57 @@ export interface components {
9916
10116
  payment_method?: components["schemas"]["PaymentMethodReference"];
9917
10117
  };
9918
10118
  };
10119
+ BillingPeriodObject: {
10120
+ /**
10121
+ * Format: uuid
10122
+ * @description Unique identifier assigned to the subscription, created by Lago.
10123
+ * @example 1a901a90-1a90-1a90-1a90-1a901a901a90
10124
+ */
10125
+ lago_subscription_id: string;
10126
+ /**
10127
+ * @description Unique identifier assigned to the subscription in your application.
10128
+ * @example external_id
10129
+ */
10130
+ external_subscription_id: string;
10131
+ /**
10132
+ * Format: uuid
10133
+ * @description Unique identifier assigned to the plan, created by Lago.
10134
+ * @example 1a901a90-1a90-1a90-1a90-1a901a901a90
10135
+ */
10136
+ lago_plan_id: string;
10137
+ /**
10138
+ * Format: date-time
10139
+ * @description The beginning date of the subscription billing period. This field indicates the start date of the billing period associated with the subscription fee.
10140
+ * @example 2022-04-29T08:59:51Z
10141
+ */
10142
+ subscription_from_datetime: string;
10143
+ /**
10144
+ * Format: date-time
10145
+ * @description The ending date of the subscription billing period. This field indicates the end date of the billing period associated with the subscription fee.
10146
+ * @example 2022-05-29T08:59:51Z
10147
+ */
10148
+ subscription_to_datetime: string;
10149
+ /**
10150
+ * Format: date-time
10151
+ * @description The beginning date of the period that covers the charge fees. It is applicable only to the `charge` fees attached to the subscription. This field indicates the start date of the billing period or subscription period associated with the fees.
10152
+ * @example 2022-04-29T08:59:51Z
10153
+ */
10154
+ charges_from_datetime: string;
10155
+ /**
10156
+ * Format: date-time
10157
+ * @description The ending date of the period that covers the charge fees. It is applicable only to the `charge` fees attached to the subscription. This field indicates the end date of the billing period or subscription period associated with the fees.
10158
+ * @example 2022-05-29T08:59:51Z
10159
+ */
10160
+ charges_to_datetime: string;
10161
+ /**
10162
+ * @description The reason explaining why this subscription appears on the invoice.
10163
+ * @example subscription_starting
10164
+ * @enum {string}
10165
+ */
10166
+ invoicing_reason: "subscription_starting" | "subscription_periodic" | "subscription_terminating" | "in_advance_charge" | "in_advance_charge_periodic" | "progressive_billing";
10167
+ };
9919
10168
  InvoiceObjectExtended: components["schemas"]["InvoiceObject"] & {
10169
+ billing_periods?: components["schemas"]["BillingPeriodObject"][];
9920
10170
  credits?: components["schemas"]["CreditObject"][];
9921
10171
  fees?: components["schemas"]["FeeObject"][];
9922
10172
  subscriptions?: components["schemas"]["SubscriptionObject"][];
@@ -10385,6 +10635,11 @@ export interface components {
10385
10635
  * @example false
10386
10636
  */
10387
10637
  finalize_zero_amount_invoice?: boolean;
10638
+ /**
10639
+ * @example clickhouse
10640
+ * @enum {string}
10641
+ */
10642
+ events_store?: "clickhouse" | "postgres";
10388
10643
  };
10389
10644
  Organization: {
10390
10645
  organization: components["schemas"]["OrganizationObject"];
@@ -10664,6 +10919,30 @@ export interface components {
10664
10919
  per_unit_amount: string;
10665
10920
  }[];
10666
10921
  };
10922
+ ChargeObjectProperties: components["schemas"]["ChargeProperties"] & {
10923
+ /**
10924
+ * @description Groups usage into sub-items on invoices for display only, without affecting pricing or aggregation.
10925
+ * @example [
10926
+ * {
10927
+ * "value": "region",
10928
+ * "options": {
10929
+ * "display_in_invoice": true
10930
+ * }
10931
+ * }
10932
+ * ]
10933
+ */
10934
+ presentation_group_keys?: {
10935
+ /**
10936
+ * @description The event property to group by.
10937
+ * @example region
10938
+ */
10939
+ value?: string;
10940
+ options?: {
10941
+ /** @example true */
10942
+ display_in_invoice?: boolean;
10943
+ };
10944
+ }[];
10945
+ };
10667
10946
  /** @description Values used to apply differentiated pricing based on additional event properties. */
10668
10947
  ChargeFilterObject: {
10669
10948
  /**
@@ -10755,7 +11034,7 @@ export interface components {
10755
11034
  */
10756
11035
  min_amount_cents: number;
10757
11036
  /** @description List of all thresholds utilized for calculating the charge. */
10758
- properties: components["schemas"]["ChargeProperties"];
11037
+ properties: components["schemas"]["ChargeObjectProperties"];
10759
11038
  /** @description List of filters used to apply differentiated pricing based on additional event properties. */
10760
11039
  filters: components["schemas"]["ChargeFilterObject"][];
10761
11040
  /** @description All taxes applied to the charge. */
@@ -11573,7 +11852,7 @@ export interface components {
11573
11852
  */
11574
11853
  min_amount_cents?: number;
11575
11854
  /** @description List of all thresholds utilized for calculating the charge. */
11576
- properties?: components["schemas"]["ChargeProperties"];
11855
+ properties?: components["schemas"]["ChargeObjectProperties"];
11577
11856
  /** @description List of filters used to apply differentiated pricing based on additional event properties. */
11578
11857
  filters?: components["schemas"]["ChargeFilterInput"][];
11579
11858
  tax_codes?: components["schemas"]["TaxCodes"];
@@ -11941,7 +12220,7 @@ export interface components {
11941
12220
  */
11942
12221
  min_amount_cents?: number;
11943
12222
  /** @description List of all thresholds utilized for calculating the charge. */
11944
- properties?: components["schemas"]["ChargeProperties"];
12223
+ properties?: components["schemas"]["ChargeObjectProperties"];
11945
12224
  /** @description List of filters used to apply differentiated pricing based on additional event properties. */
11946
12225
  filters?: components["schemas"]["ChargeFilterInput"][];
11947
12226
  tax_codes?: components["schemas"]["TaxCodes"];
@@ -12150,7 +12429,7 @@ export interface components {
12150
12429
  */
12151
12430
  min_amount_cents?: number;
12152
12431
  /** @description List of all thresholds utilized for calculating the charge. */
12153
- properties?: components["schemas"]["ChargeProperties"];
12432
+ properties?: components["schemas"]["ChargeObjectProperties"];
12154
12433
  /** @description List of filters used to apply differentiated pricing based on additional event properties. */
12155
12434
  filters?: components["schemas"]["ChargeFilterInput"][];
12156
12435
  tax_codes?: components["schemas"]["TaxCodes"];
@@ -12505,7 +12784,7 @@ export interface components {
12505
12784
  */
12506
12785
  min_amount_cents?: number;
12507
12786
  /** @description List of all thresholds utilized for calculating the charge. */
12508
- properties?: components["schemas"]["ChargeProperties"];
12787
+ properties?: components["schemas"]["ChargeObjectProperties"];
12509
12788
  /** @description List of filters used to apply differentiated pricing based on additional event properties. */
12510
12789
  filters?: components["schemas"]["ChargeFilterInput"][];
12511
12790
  tax_codes?: components["schemas"]["TaxCodes"];
@@ -12623,6 +12902,15 @@ export interface components {
12623
12902
  invoice_custom_section?: components["schemas"]["InvoiceCustomSectionInput"];
12624
12903
  /** @description Optional payment method to use for processing subscription payments. */
12625
12904
  payment_method?: components["schemas"]["PaymentMethodReference"];
12905
+ /**
12906
+ * @description Defines whether this subscription should be grouped with other subscriptions of the same customer when generating recurring invoices.
12907
+ *
12908
+ * - `true` (default): the subscription is included in the customer's standard invoice grouping (by billing entity, currency and payment method).
12909
+ * - `false`: the subscription is excluded from consolidation and always billed on its own dedicated invoice.
12910
+ * @default true
12911
+ * @example true
12912
+ */
12913
+ consolidate_invoice: boolean;
12626
12914
  };
12627
12915
  };
12628
12916
  ApplicableUsageThreshold: {
@@ -12679,6 +12967,14 @@ export interface components {
12679
12967
  invoice_custom_section?: components["schemas"]["InvoiceCustomSectionInput"];
12680
12968
  /** @description Optional payment method to use for processing subscription payments. */
12681
12969
  payment_method?: components["schemas"]["PaymentMethodReference"];
12970
+ /**
12971
+ * @description Defines whether this subscription should be grouped with other subscriptions of the same customer when generating recurring invoices.
12972
+ *
12973
+ * - `true`: the subscription is included in the customer's standard invoice grouping (by billing entity, currency and payment method).
12974
+ * - `false`: the subscription is excluded from consolidation and always billed on its own dedicated invoice.
12975
+ * @example false
12976
+ */
12977
+ consolidate_invoice?: boolean;
12682
12978
  };
12683
12979
  };
12684
12980
  Subscription: {
@@ -16315,6 +16611,8 @@ export interface operations {
16315
16611
  };
16316
16612
  /** @description When `true`, returns usage since subscription start instead of the current billing period. Requires one of `charge_id`, `charge_code`, `group` (or their deprecated `filter_by_*` equivalents) to be set. */
16317
16613
  full_usage?: boolean;
16614
+ /** @description Filter `presentation_breakdowns` by a JSON-encoded array of presentation group key values. Only breakdowns matching the provided values will be returned. Pass an empty array to disable `presentation_breakdowns` entirely. */
16615
+ filter_by_presentation?: string;
16318
16616
  };
16319
16617
  header?: never;
16320
16618
  path: {
@@ -20120,6 +20418,132 @@ export interface operations {
20120
20418
  };
20121
20419
  };
20122
20420
  };
20421
+ billableMetricCreated: {
20422
+ parameters: {
20423
+ query?: never;
20424
+ header: {
20425
+ /** @description Signature of the webhook payload */
20426
+ "X-Lago-Signature": components["parameters"]["webhook_signature"];
20427
+ /** @description Algorithm used to generate the signature */
20428
+ "X-Lago-Signature-Algorithm": components["parameters"]["webhook_signature_algorithm"];
20429
+ /** @description Unique id of the webhook. It can be used for idempotency */
20430
+ "X-Lago-Unique-Key": components["parameters"]["webhook_unique_key"];
20431
+ };
20432
+ path?: never;
20433
+ cookie?: never;
20434
+ };
20435
+ /** @description Details of the new billable metric */
20436
+ requestBody?: {
20437
+ content: {
20438
+ "application/json": {
20439
+ /** @enum {string} */
20440
+ webhook_type: "billable_metric.created";
20441
+ /** @enum {string} */
20442
+ object_type: "billable_metric";
20443
+ /**
20444
+ * Format: uuid
20445
+ * @description Unique identifier of the organization, created by Lago.
20446
+ * @example 1a901a90-1a90-1a90-1a90-1a901a901a90
20447
+ */
20448
+ organization_id: string;
20449
+ billable_metric: components["schemas"]["BillableMetricObject"];
20450
+ };
20451
+ };
20452
+ };
20453
+ responses: {
20454
+ /** @description Return a 200 status to indicate that the data was received successfully */
20455
+ 200: {
20456
+ headers: {
20457
+ [name: string]: unknown;
20458
+ };
20459
+ content?: never;
20460
+ };
20461
+ };
20462
+ };
20463
+ billableMetricUpdated: {
20464
+ parameters: {
20465
+ query?: never;
20466
+ header: {
20467
+ /** @description Signature of the webhook payload */
20468
+ "X-Lago-Signature": components["parameters"]["webhook_signature"];
20469
+ /** @description Algorithm used to generate the signature */
20470
+ "X-Lago-Signature-Algorithm": components["parameters"]["webhook_signature_algorithm"];
20471
+ /** @description Unique id of the webhook. It can be used for idempotency */
20472
+ "X-Lago-Unique-Key": components["parameters"]["webhook_unique_key"];
20473
+ };
20474
+ path?: never;
20475
+ cookie?: never;
20476
+ };
20477
+ /** @description Details of the billable metric */
20478
+ requestBody?: {
20479
+ content: {
20480
+ "application/json": {
20481
+ /** @enum {string} */
20482
+ webhook_type: "billable_metric.updated";
20483
+ /** @enum {string} */
20484
+ object_type: "billable_metric";
20485
+ /**
20486
+ * Format: uuid
20487
+ * @description Unique identifier of the organization, created by Lago.
20488
+ * @example 1a901a90-1a90-1a90-1a90-1a901a901a90
20489
+ */
20490
+ organization_id: string;
20491
+ billable_metric: components["schemas"]["BillableMetricObject"];
20492
+ };
20493
+ };
20494
+ };
20495
+ responses: {
20496
+ /** @description Return a 200 status to indicate that the data was received successfully */
20497
+ 200: {
20498
+ headers: {
20499
+ [name: string]: unknown;
20500
+ };
20501
+ content?: never;
20502
+ };
20503
+ };
20504
+ };
20505
+ billableMetricDeleted: {
20506
+ parameters: {
20507
+ query?: never;
20508
+ header: {
20509
+ /** @description Signature of the webhook payload */
20510
+ "X-Lago-Signature": components["parameters"]["webhook_signature"];
20511
+ /** @description Algorithm used to generate the signature */
20512
+ "X-Lago-Signature-Algorithm": components["parameters"]["webhook_signature_algorithm"];
20513
+ /** @description Unique id of the webhook. It can be used for idempotency */
20514
+ "X-Lago-Unique-Key": components["parameters"]["webhook_unique_key"];
20515
+ };
20516
+ path?: never;
20517
+ cookie?: never;
20518
+ };
20519
+ /** @description Details of the billable metric */
20520
+ requestBody?: {
20521
+ content: {
20522
+ "application/json": {
20523
+ /** @enum {string} */
20524
+ webhook_type: "billable_metric.deleted";
20525
+ /** @enum {string} */
20526
+ object_type: "billable_metric";
20527
+ /**
20528
+ * Format: uuid
20529
+ * @description Unique identifier of the organization, created by Lago.
20530
+ * @example 1a901a90-1a90-1a90-1a90-1a901a901a90
20531
+ */
20532
+ organization_id: string;
20533
+ billable_metric: components["schemas"]["BillableMetricObject"];
20534
+ };
20535
+ };
20536
+ };
20537
+ responses: {
20538
+ /** @description Return a 200 status to indicate that the data was received successfully */
20539
+ 200: {
20540
+ headers: {
20541
+ [name: string]: unknown;
20542
+ };
20543
+ content?: never;
20544
+ };
20545
+ };
20546
+ };
20123
20547
  customerCreated: {
20124
20548
  parameters: {
20125
20549
  query?: never;