lago-javascript-client 1.43.0 → 1.45.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.
@@ -1045,6 +1045,17 @@ export interface AppliedCouponObject {
1045
1045
  * @example "Startup Deal"
1046
1046
  */
1047
1047
  coupon_name: string;
1048
+ /**
1049
+ * The status of the parent coupon. Can be either `active` or `terminated`.
1050
+ * @example "active"
1051
+ */
1052
+ coupon_status?: "active" | "terminated";
1053
+ /**
1054
+ * The date and time when the parent coupon was deleted. If null, the coupon still exists. It is expressed in UTC format according to the ISO 8601 datetime standard.
1055
+ * @format date-time
1056
+ * @example "2022-04-29T08:59:51Z"
1057
+ */
1058
+ coupon_deleted_at?: string | null;
1048
1059
  /**
1049
1060
  * Unique identifier of the customer, created by Lago.
1050
1061
  * @format uuid
@@ -2323,241 +2334,6 @@ export type CreditNoteAppliedTaxObject = BaseAppliedTax & {
2323
2334
  /** @example 100 */
2324
2335
  base_amount_cents?: number;
2325
2336
  };
2326
- /**
2327
- * Custom metadata stored as key-value pairs.
2328
- * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
2329
- * @example {"external_id":"ext-123","synced_at":"2024-01-15","source":null}
2330
- */
2331
- export type MetadataObject = object | null;
2332
- export interface CreditNoteErrorDetailsObject {
2333
- /**
2334
- * The credit note error details unique identifier, created by Lago.
2335
- * @format uuid
2336
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2337
- */
2338
- lago_id: string;
2339
- /**
2340
- * The type of the error.
2341
- * @example "tax_error"
2342
- */
2343
- error_code: "not_provided" | "tax_error" | "tax_voiding_error" | "invoice_generation_error";
2344
- /** The details of the error. */
2345
- details: object;
2346
- }
2347
- export interface CreditNoteObject {
2348
- /**
2349
- * The credit note unique identifier, created by Lago.
2350
- * @format uuid
2351
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2352
- */
2353
- lago_id: string;
2354
- /**
2355
- * The unique code of the billing entity associated with the credit note.
2356
- * @example "acme_corp"
2357
- */
2358
- billing_entity_code: string;
2359
- /**
2360
- * The sequential identifier of the credit note, specifically scoped on the associated invoice. It provides a unique numerical identifier for the credit note within the context of the invoice.
2361
- * @example 2
2362
- */
2363
- sequential_id: number;
2364
- /**
2365
- * The credit note unique number.
2366
- * @example "LAG-1234-CN2"
2367
- */
2368
- number: string;
2369
- /**
2370
- * Unique identifier assigned to the invoice that the credit note belongs to
2371
- * @format uuid
2372
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2373
- */
2374
- lago_invoice_id: string;
2375
- /**
2376
- * The invoice unique number, related to the credit note.
2377
- * @example "LAG-1234"
2378
- */
2379
- invoice_number: string;
2380
- /**
2381
- * The date of creation of the credit note. It follows the ISO 8601 date format and provides the specific date when the credit note was created.
2382
- * @format date
2383
- * @example "2022-12-06"
2384
- */
2385
- issuing_date: string;
2386
- /**
2387
- * The status of the credit portion of the credit note. It indicates the current state or condition of the credit amount associated with the credit note. The possible values for this field are:
2388
- *
2389
- * - `available`: this status indicates that an amount remains available for future usage. The credit can be applied towards future transactions or invoices.
2390
- * - `consumed`: this status indicates that the credit amount has been fully consumed. The remaining amount is 0, indicating that the credit has been utilized in its entirety.
2391
- * - `voided`: this status indicates that the remaining amount of the credit cannot be used any further. The credit has been voided and is no longer available for application or redemption.
2392
- * @example "available"
2393
- */
2394
- credit_status?: "available" | "consumed" | "voided";
2395
- /**
2396
- * The status of the refund portion of the credit note. It indicates the current state or condition of the refund associated with the credit note. The possible values for this field are:
2397
- *
2398
- * - `pending`: this status indicates that the refund is pending execution. The refund request has been initiated but has not been processed or completed yet.
2399
- * - `succeeded`: this status indicates that the refund has been successfully executed. The refund amount has been processed and returned to the customer or the designated recipient.
2400
- * - `failed`: this status indicates that the refund failed to execute. The refund request encountered an error or unsuccessful processing, and the refund amount could not be returned.
2401
- * @example "pending"
2402
- */
2403
- refund_status?: "pending" | "succeeded" | "failed";
2404
- /**
2405
- * The reason of the credit note creation.
2406
- * Possible values are `duplicated_charge`, `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge` or `other`.
2407
- * @example "other"
2408
- */
2409
- reason: "duplicated_charge" | "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "other";
2410
- /**
2411
- * The description of the credit note.
2412
- * @example "Free text"
2413
- */
2414
- description?: string | null;
2415
- /**
2416
- * The currency of the credit note.
2417
- * @example "EUR"
2418
- */
2419
- currency: Currency;
2420
- /**
2421
- * The total amount of the credit note, expressed in cents.
2422
- * @example 120
2423
- */
2424
- total_amount_cents: number;
2425
- /**
2426
- * The tax amount of the credit note, expressed in cents.
2427
- * @example 20
2428
- */
2429
- taxes_amount_cents: number;
2430
- /**
2431
- * The tax rate associated with this specific credit note.
2432
- * @example 20
2433
- */
2434
- taxes_rate: number;
2435
- /**
2436
- * The subtotal of the credit note excluding any applicable taxes, expressed in cents.
2437
- * @example 100
2438
- */
2439
- sub_total_excluding_taxes_amount_cents: number;
2440
- /**
2441
- * The remaining credit note amount, expressed in cents.
2442
- * @example 100
2443
- */
2444
- balance_amount_cents: number;
2445
- /**
2446
- * The credited amount of the credit note, expressed in cents.
2447
- * @example 100
2448
- */
2449
- credit_amount_cents: number;
2450
- /**
2451
- * The refunded amount of the credit note, expressed in cents.
2452
- * @example 0
2453
- */
2454
- refund_amount_cents: number;
2455
- /**
2456
- * The ofsetted amount (deducted from the invoice balance) of the credit note, expressed in cents.
2457
- * @example 0
2458
- */
2459
- offset_amount_cents: number;
2460
- /**
2461
- * The pro-rated amount of the coupons applied to the source invoice.
2462
- * @example 20
2463
- */
2464
- coupons_adjustment_amount_cents: number;
2465
- /**
2466
- * The date when the credit note was created. It is expressed in Coordinated Universal Time (UTC).
2467
- * @format date-time
2468
- * @example "2022-09-14T16:35:31Z"
2469
- */
2470
- created_at: string;
2471
- /**
2472
- * The date when the credit note was last updated. It is expressed in Coordinated Universal Time (UTC).
2473
- * @format date-time
2474
- * @example "2022-09-14T16:35:31Z"
2475
- */
2476
- updated_at: string;
2477
- /**
2478
- * The PDF file of the credit note.
2479
- * @example "https://getlago.com/credit_note/file"
2480
- */
2481
- file_url?: string | null;
2482
- /** Array of credit note's items. */
2483
- items?: CreditNoteItemObject[];
2484
- applied_taxes?: CreditNoteAppliedTaxObject[];
2485
- /**
2486
- * Indicates if the credit note belongs to self-billed invoice. Self-billing is a process where an organization creates the invoice on behalf of the partner.
2487
- * @example false
2488
- */
2489
- self_billed?: boolean;
2490
- /**
2491
- * Custom metadata stored as key-value pairs.
2492
- * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
2493
- */
2494
- metadata?: MetadataObject;
2495
- error_details?: any[] | null;
2496
- }
2497
- export interface CreditNotesPaginated {
2498
- credit_notes: CreditNoteObject[];
2499
- meta: PaginationMeta;
2500
- }
2501
- /**
2502
- * Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
2503
- * @example {"external_id":"ext-123","synced_at":"2024-01-15"}
2504
- */
2505
- export type MetadataInput = Record<string, string | null>;
2506
- export interface CreditNoteCreateInput {
2507
- credit_note: {
2508
- /**
2509
- * The invoice unique identifier, created by Lago.
2510
- * @format uuid
2511
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2512
- */
2513
- invoice_id: string;
2514
- /**
2515
- * The reason of the credit note creation.
2516
- * Possible values are `duplicated_charge`, `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge` or `other`.
2517
- * @example "duplicated_charge"
2518
- */
2519
- reason?: "duplicated_charge" | "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "other";
2520
- /**
2521
- * The description of the credit note.
2522
- * @example "description"
2523
- */
2524
- description?: string;
2525
- /**
2526
- * The total amount to be credited to the customer balance for discounts on future invoices. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
2527
- * @example 100
2528
- */
2529
- credit_amount_cents?: number | null;
2530
- /**
2531
- * The total amount to be refunded immediately to the payment method used by the customer. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
2532
- * @example 500
2533
- */
2534
- refund_amount_cents?: number | null;
2535
- /**
2536
- * The total amount to be immediately deducted from the invoice balance. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
2537
- * @example 200
2538
- */
2539
- offset_amount_cents?: number | null;
2540
- /**
2541
- * The list of credit note's items.
2542
- * @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":100},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":500},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","amount_cents":200}]
2543
- */
2544
- items: {
2545
- /**
2546
- * The fee unique identifier, created by Lago.
2547
- * @format uuid
2548
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2549
- */
2550
- fee_id: string;
2551
- /**
2552
- * This is the amount of the credit note item excluding taxes, expressed in cents.
2553
- * @example 100
2554
- */
2555
- amount_cents: number;
2556
- }[];
2557
- /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
2558
- metadata?: MetadataInput;
2559
- };
2560
- }
2561
2337
  /** @example "US" */
2562
2338
  export type CountryOrNull = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
2563
2339
  /** @example "America/Los_Angeles" */
@@ -2847,20 +2623,256 @@ export interface CustomerBaseObject {
2847
2623
  shipping_address?: Address;
2848
2624
  metadata?: CustomerMetadata[];
2849
2625
  }
2850
- export type CreditNoteExtendedObject = CreditNoteObject & {
2851
- customer?: CustomerBaseObject;
2852
- };
2853
- export interface CreditNoteExtended {
2854
- credit_note: CreditNoteExtendedObject;
2855
- }
2856
- export interface CreditNoteUpdateInput {
2857
- credit_note: {
2858
- /**
2859
- * The status of the refund portion of the credit note. It indicates the current state or condition of the refund associated with the credit note. The possible values for this field are:
2860
- *
2861
- * - `pending`: this status indicates that the refund is pending execution. The refund request has been initiated but has not been processed or completed yet.
2862
- * - `succeeded`: this status indicates that the refund has been successfully executed. The refund amount has been processed and returned to the customer or the designated recipient.
2863
- * - `failed`: this status indicates that the refund failed to execute. The refund request encountered an error or unsuccessful processing, and the refund amount could not be returned.
2626
+ /**
2627
+ * Custom metadata stored as key-value pairs.
2628
+ * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
2629
+ * @example {"external_id":"ext-123","synced_at":"2024-01-15","source":null}
2630
+ */
2631
+ export type MetadataObject = object | null;
2632
+ export interface CreditNoteErrorDetailsObject {
2633
+ /**
2634
+ * The credit note error details unique identifier, created by Lago.
2635
+ * @format uuid
2636
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2637
+ */
2638
+ lago_id: string;
2639
+ /**
2640
+ * The type of the error.
2641
+ * @example "tax_error"
2642
+ */
2643
+ error_code: "not_provided" | "tax_error" | "tax_voiding_error" | "invoice_generation_error";
2644
+ /** The details of the error. */
2645
+ details: object;
2646
+ }
2647
+ export interface CreditNoteObject {
2648
+ /**
2649
+ * The credit note unique identifier, created by Lago.
2650
+ * @format uuid
2651
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2652
+ */
2653
+ lago_id: string;
2654
+ /**
2655
+ * The unique code of the billing entity associated with the credit note.
2656
+ * @example "acme_corp"
2657
+ */
2658
+ billing_entity_code: string;
2659
+ /**
2660
+ * The sequential identifier of the credit note, specifically scoped on the associated invoice. It provides a unique numerical identifier for the credit note within the context of the invoice.
2661
+ * @example 2
2662
+ */
2663
+ sequential_id: number;
2664
+ /**
2665
+ * The credit note unique number.
2666
+ * @example "LAG-1234-CN2"
2667
+ */
2668
+ number: string;
2669
+ /**
2670
+ * Unique identifier assigned to the invoice that the credit note belongs to
2671
+ * @format uuid
2672
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2673
+ */
2674
+ lago_invoice_id: string;
2675
+ /**
2676
+ * The invoice unique number, related to the credit note.
2677
+ * @example "LAG-1234"
2678
+ */
2679
+ invoice_number: string;
2680
+ /**
2681
+ * The date of creation of the credit note. It follows the ISO 8601 date format and provides the specific date when the credit note was created.
2682
+ * @format date
2683
+ * @example "2022-12-06"
2684
+ */
2685
+ issuing_date: string;
2686
+ /**
2687
+ * The status of the credit portion of the credit note. It indicates the current state or condition of the credit amount associated with the credit note. The possible values for this field are:
2688
+ *
2689
+ * - `available`: this status indicates that an amount remains available for future usage. The credit can be applied towards future transactions or invoices.
2690
+ * - `consumed`: this status indicates that the credit amount has been fully consumed. The remaining amount is 0, indicating that the credit has been utilized in its entirety.
2691
+ * - `voided`: this status indicates that the remaining amount of the credit cannot be used any further. The credit has been voided and is no longer available for application or redemption.
2692
+ * @example "available"
2693
+ */
2694
+ credit_status?: "available" | "consumed" | "voided";
2695
+ /**
2696
+ * The status of the refund portion of the credit note. It indicates the current state or condition of the refund associated with the credit note. The possible values for this field are:
2697
+ *
2698
+ * - `pending`: this status indicates that the refund is pending execution. The refund request has been initiated but has not been processed or completed yet.
2699
+ * - `succeeded`: this status indicates that the refund has been successfully executed. The refund amount has been processed and returned to the customer or the designated recipient.
2700
+ * - `failed`: this status indicates that the refund failed to execute. The refund request encountered an error or unsuccessful processing, and the refund amount could not be returned.
2701
+ * @example "pending"
2702
+ */
2703
+ refund_status?: "pending" | "succeeded" | "failed";
2704
+ /**
2705
+ * The reason of the credit note creation.
2706
+ * Possible values are `duplicated_charge`, `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge` or `other`.
2707
+ * @example "other"
2708
+ */
2709
+ reason: "duplicated_charge" | "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "other";
2710
+ /**
2711
+ * The description of the credit note.
2712
+ * @example "Free text"
2713
+ */
2714
+ description?: string | null;
2715
+ /**
2716
+ * The currency of the credit note.
2717
+ * @example "EUR"
2718
+ */
2719
+ currency: Currency;
2720
+ /**
2721
+ * The total amount of the credit note, expressed in cents.
2722
+ * @example 120
2723
+ */
2724
+ total_amount_cents: number;
2725
+ /**
2726
+ * The tax amount of the credit note, expressed in cents.
2727
+ * @example 20
2728
+ */
2729
+ taxes_amount_cents: number;
2730
+ /**
2731
+ * The tax rate associated with this specific credit note.
2732
+ * @example 20
2733
+ */
2734
+ taxes_rate: number;
2735
+ /**
2736
+ * The subtotal of the credit note excluding any applicable taxes, expressed in cents.
2737
+ * @example 100
2738
+ */
2739
+ sub_total_excluding_taxes_amount_cents: number;
2740
+ /**
2741
+ * The remaining credit note amount, expressed in cents.
2742
+ * @example 100
2743
+ */
2744
+ balance_amount_cents: number;
2745
+ /**
2746
+ * The credited amount of the credit note, expressed in cents.
2747
+ * @example 100
2748
+ */
2749
+ credit_amount_cents: number;
2750
+ /**
2751
+ * The refunded amount of the credit note, expressed in cents.
2752
+ * @example 0
2753
+ */
2754
+ refund_amount_cents: number;
2755
+ /**
2756
+ * The ofsetted amount (deducted from the invoice balance) of the credit note, expressed in cents.
2757
+ * @example 0
2758
+ */
2759
+ offset_amount_cents: number;
2760
+ /**
2761
+ * The pro-rated amount of the coupons applied to the source invoice.
2762
+ * @example 20
2763
+ */
2764
+ coupons_adjustment_amount_cents: number;
2765
+ /**
2766
+ * The date when the credit note was created. It is expressed in Coordinated Universal Time (UTC).
2767
+ * @format date-time
2768
+ * @example "2022-09-14T16:35:31Z"
2769
+ */
2770
+ created_at: string;
2771
+ /**
2772
+ * The date when the credit note was last updated. It is expressed in Coordinated Universal Time (UTC).
2773
+ * @format date-time
2774
+ * @example "2022-09-14T16:35:31Z"
2775
+ */
2776
+ updated_at: string;
2777
+ /**
2778
+ * The PDF file of the credit note.
2779
+ * @example "https://getlago.com/credit_note/file"
2780
+ */
2781
+ file_url?: string | null;
2782
+ /** Array of credit note's items. */
2783
+ items?: CreditNoteItemObject[];
2784
+ applied_taxes?: CreditNoteAppliedTaxObject[];
2785
+ /**
2786
+ * Indicates if the credit note belongs to self-billed invoice. Self-billing is a process where an organization creates the invoice on behalf of the partner.
2787
+ * @example false
2788
+ */
2789
+ self_billed?: boolean;
2790
+ customer?: CustomerBaseObject;
2791
+ /**
2792
+ * Custom metadata stored as key-value pairs.
2793
+ * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
2794
+ */
2795
+ metadata?: MetadataObject;
2796
+ error_details?: any[] | null;
2797
+ }
2798
+ export interface CreditNotesPaginated {
2799
+ credit_notes: CreditNoteObject[];
2800
+ meta: PaginationMeta;
2801
+ }
2802
+ /**
2803
+ * Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
2804
+ * @example {"external_id":"ext-123","synced_at":"2024-01-15"}
2805
+ */
2806
+ export type MetadataInput = Record<string, string | null>;
2807
+ export interface CreditNoteCreateInput {
2808
+ credit_note: {
2809
+ /**
2810
+ * The invoice unique identifier, created by Lago.
2811
+ * @format uuid
2812
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2813
+ */
2814
+ invoice_id: string;
2815
+ /**
2816
+ * The reason of the credit note creation.
2817
+ * Possible values are `duplicated_charge`, `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge` or `other`.
2818
+ * @example "duplicated_charge"
2819
+ */
2820
+ reason?: "duplicated_charge" | "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "other";
2821
+ /**
2822
+ * The description of the credit note.
2823
+ * @example "description"
2824
+ */
2825
+ description?: string;
2826
+ /**
2827
+ * The total amount to be credited to the customer balance for discounts on future invoices. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
2828
+ * @example 100
2829
+ */
2830
+ credit_amount_cents?: number | null;
2831
+ /**
2832
+ * The total amount to be refunded immediately to the payment method used by the customer. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
2833
+ * @example 500
2834
+ */
2835
+ refund_amount_cents?: number | null;
2836
+ /**
2837
+ * The total amount to be immediately deducted from the invoice balance. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
2838
+ * @example 200
2839
+ */
2840
+ offset_amount_cents?: number | null;
2841
+ /**
2842
+ * The list of credit note's items.
2843
+ * @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":100},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":500},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","amount_cents":200}]
2844
+ */
2845
+ items: {
2846
+ /**
2847
+ * The fee unique identifier, created by Lago.
2848
+ * @format uuid
2849
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2850
+ */
2851
+ fee_id: string;
2852
+ /**
2853
+ * This is the amount of the credit note item excluding taxes, expressed in cents.
2854
+ * @example 100
2855
+ */
2856
+ amount_cents: number;
2857
+ }[];
2858
+ /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
2859
+ metadata?: MetadataInput;
2860
+ };
2861
+ }
2862
+ export type CreditNoteExtendedObject = CreditNoteObject & {
2863
+ customer?: CustomerBaseObject;
2864
+ };
2865
+ export interface CreditNoteExtended {
2866
+ credit_note: CreditNoteExtendedObject;
2867
+ }
2868
+ export interface CreditNoteUpdateInput {
2869
+ credit_note: {
2870
+ /**
2871
+ * The status of the refund portion of the credit note. It indicates the current state or condition of the refund associated with the credit note. The possible values for this field are:
2872
+ *
2873
+ * - `pending`: this status indicates that the refund is pending execution. The refund request has been initiated but has not been processed or completed yet.
2874
+ * - `succeeded`: this status indicates that the refund has been successfully executed. The refund amount has been processed and returned to the customer or the designated recipient.
2875
+ * - `failed`: this status indicates that the refund failed to execute. The refund request encountered an error or unsuccessful processing, and the refund amount could not be returned.
2864
2876
  * @example "succeeded"
2865
2877
  */
2866
2878
  refund_status: "pending" | "succeeded" | "failed";
@@ -3083,12 +3095,32 @@ export interface IntegrationCustomer {
3083
3095
  export type CustomerObject = CustomerBaseObject & {
3084
3096
  integration_customers?: IntegrationCustomer[];
3085
3097
  };
3086
- export type CustomerObjectExtended = CustomerObject & {
3087
- metadata?: CustomerMetadata[];
3088
- /** List of customer taxes */
3089
- taxes?: TaxObject[];
3090
- /** The customer’s invoice custom section used for generating invoices. */
3091
- applicable_invoice_custom_sections?: InvoiceCustomSectionObject[];
3098
+ export interface ErrorDetailObject {
3099
+ /**
3100
+ * Unique identifier assigned to the error_detail within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the error's record within the Lago system.
3101
+ * @format uuid
3102
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
3103
+ */
3104
+ lago_id: string | null;
3105
+ /**
3106
+ * Code that specifies part of the application / connection, where the error originally happened
3107
+ * @example "tax_error"
3108
+ */
3109
+ error_code: string;
3110
+ /**
3111
+ * Key value list of more elaborated error detail, where by the key of error_code an external service error details are stored
3112
+ * @example {"tax_error":"taxDateTooFarInFuture"}
3113
+ */
3114
+ details: Record<string, string>;
3115
+ }
3116
+ export type CustomerObjectExtended = CustomerObject & {
3117
+ metadata?: CustomerMetadata[];
3118
+ /** List of customer taxes */
3119
+ taxes?: TaxObject[];
3120
+ /** The customer’s invoice custom section used for generating invoices. */
3121
+ applicable_invoice_custom_sections?: InvoiceCustomSectionObject[];
3122
+ /** List of errors with details that might have been raised while processing backgroud actions for the customers */
3123
+ error_details?: ErrorDetailObject[];
3092
3124
  };
3093
3125
  export interface CustomersPaginated {
3094
3126
  customers: CustomerObjectExtended[];
@@ -3417,6 +3449,16 @@ export interface InvoiceBaseObject {
3417
3449
  * @example 0
3418
3450
  */
3419
3451
  prepaid_credit_amount_cents: number;
3452
+ /**
3453
+ * The portion of prepaid credits discounted on the invoice that originated from granted (free) credits, expressed in cents. Only populated for invoices associated with traceable wallets.
3454
+ * @example 0
3455
+ */
3456
+ prepaid_granted_credit_amount_cents?: number | null;
3457
+ /**
3458
+ * The portion of prepaid credits discounted on the invoice that originated from purchased (paid) credits, expressed in cents. Only populated for invoices associated with traceable wallets.
3459
+ * @example 0
3460
+ */
3461
+ prepaid_purchased_credit_amount_cents?: number | null;
3420
3462
  /**
3421
3463
  * The usage already billed in previous invoices. Only apply to `progressive_billing` and `subscription` invoices.
3422
3464
  * @example 0
@@ -3538,6 +3580,41 @@ export type InvoiceAppliedTaxObject = BaseAppliedTax & {
3538
3580
  */
3539
3581
  fees_amount_cents?: number;
3540
3582
  };
3583
+ export interface InvoiceAppliedInvoiceCustomSectionObject {
3584
+ /**
3585
+ * Unique identifier of the applied invoice custom section in the Lago application.
3586
+ * @format uuid
3587
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
3588
+ */
3589
+ lago_id: string;
3590
+ /**
3591
+ * Unique identifier of the invoice this custom section is applied to.
3592
+ * @format uuid
3593
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
3594
+ */
3595
+ lago_invoice_id: string;
3596
+ /**
3597
+ * Unique code identifying the invoice custom section.
3598
+ * @example "eu_bank_details"
3599
+ */
3600
+ code: string;
3601
+ /**
3602
+ * The value shown on the invoice PDF.
3603
+ * @example "Bank Name: Lago Bank, IBAN: FR7630004000031234567890143"
3604
+ */
3605
+ details: string;
3606
+ /**
3607
+ * The name of the invoice custom section displayed on the invoice.
3608
+ * @example "Bank Details:"
3609
+ */
3610
+ display_name: string;
3611
+ /**
3612
+ * The date of the applied invoice custom section creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
3613
+ * @format date-time
3614
+ * @example "2023-07-06T14:35:58Z"
3615
+ */
3616
+ created_at: string;
3617
+ }
3541
3618
  export interface UsageThresholdObject {
3542
3619
  /**
3543
3620
  * Unique identifier of the usage threshold created by Lago.
@@ -3593,6 +3670,8 @@ export type InvoiceObject = InvoiceBaseObject & {
3593
3670
  billing_periods?: BillingPeriodObject[];
3594
3671
  metadata?: InvoiceMetadataObject[];
3595
3672
  applied_taxes?: InvoiceAppliedTaxObject[];
3673
+ /** The invoice custom sections applied to this invoice for PDF generation. */
3674
+ applied_invoice_custom_sections?: InvoiceAppliedInvoiceCustomSectionObject[];
3596
3675
  applied_usage_thresholds?: AppliedUsageThresholdObject[];
3597
3676
  };
3598
3677
  export interface InvoicesPaginated {
@@ -3619,6 +3698,8 @@ export interface PaymentObject {
3619
3698
  external_customer_id: string;
3620
3699
  /** List of invoice IDs associated with the payment. */
3621
3700
  invoice_ids: string[];
3701
+ /** List of invoice numbers associated with the payment. */
3702
+ invoice_numbers?: string[];
3622
3703
  /**
3623
3704
  * The unique identifier of the paid resource, created by Lago.
3624
3705
  * @format uuid
@@ -3749,6 +3830,26 @@ export interface PaymentRequestsPaginated {
3749
3830
  payment_requests: PaymentRequestObject[];
3750
3831
  meta: PaginationMeta;
3751
3832
  }
3833
+ export interface AppliedInvoiceCustomSectionObject {
3834
+ /**
3835
+ * Unique identifier of the applied invoice custom section in the Lago application.
3836
+ * @format uuid
3837
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
3838
+ */
3839
+ lago_id: string;
3840
+ /**
3841
+ * Unique identifier of the invoice custom section that was applied.
3842
+ * @format uuid
3843
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
3844
+ */
3845
+ invoice_custom_section_id: string;
3846
+ /**
3847
+ * The date of the applied invoice custom section creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
3848
+ * @format date-time
3849
+ * @example "2023-07-06T14:35:58Z"
3850
+ */
3851
+ created_at: string;
3852
+ }
3752
3853
  /** Reference to a specific payment method for processing the payment. */
3753
3854
  export interface PaymentMethodReference {
3754
3855
  /**
@@ -3913,6 +4014,8 @@ export interface SubscriptionObject {
3913
4014
  * @example "generate"
3914
4015
  */
3915
4016
  on_termination_invoice: "generate" | "skip";
4017
+ /** The invoice custom sections applied to invoices generated by this subscription. */
4018
+ applied_invoice_custom_sections?: AppliedInvoiceCustomSectionObject[];
3916
4019
  /** The payment method assigned to this subscription for processing payments. */
3917
4020
  payment_method?: PaymentMethodReference;
3918
4021
  }
@@ -4015,6 +4118,8 @@ export interface WalletRecurringTransactionRule {
4015
4118
  * @example false
4016
4119
  */
4017
4120
  ignore_paid_top_up_limits: boolean;
4121
+ /** The invoice custom sections applied to invoices generated by this recurring transaction rule. */
4122
+ applied_invoice_custom_sections?: AppliedInvoiceCustomSectionObject[];
4018
4123
  /** The payment method assigned to this recurring transaction rule for processing top-up payments. */
4019
4124
  payment_method?: PaymentMethodReference;
4020
4125
  }
@@ -4168,6 +4273,8 @@ export interface WalletObject {
4168
4273
  * @example 1000
4169
4274
  */
4170
4275
  paid_top_up_max_amount_cents?: number | null;
4276
+ /** The invoice custom sections applied to invoices generated by this wallet. */
4277
+ applied_invoice_custom_sections?: AppliedInvoiceCustomSectionObject[];
4171
4278
  /** The payment method assigned to this wallet for processing top-up payments. */
4172
4279
  payment_method?: PaymentMethodReference;
4173
4280
  /**
@@ -4180,178 +4287,619 @@ export interface WalletsPaginated {
4180
4287
  wallets: WalletObject[];
4181
4288
  meta: PaginationMeta;
4182
4289
  }
4183
- /** Details about the pricing unit used for charge usage. */
4184
- export interface UsagePricingUnitDetailsObject {
4185
- /**
4186
- * The amount in cents in the pricing unit.
4187
- * @example 200
4188
- */
4189
- amount_cents: number;
4290
+ /** Configuration for invoice custom sections to apply to invoices generated by this resource. */
4291
+ export interface InvoiceCustomSectionInput {
4190
4292
  /**
4191
- * The short name of the pricing unit.
4192
- * @example "CR"
4293
+ * Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.
4294
+ * @example false
4193
4295
  */
4194
- short_name: string;
4296
+ skip_invoice_custom_sections?: boolean;
4195
4297
  /**
4196
- * The conversion rate from pricing units to the plan's currency.
4197
- * @example "0.5"
4298
+ * List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.
4299
+ * @example ["eu_bank_details"]
4198
4300
  */
4199
- conversion_rate: string;
4301
+ invoice_custom_section_codes?: string[];
4200
4302
  }
4201
- /** Array of filter object, representing multiple dimensions for a charge item. */
4202
- export type CustomerChargeFiltersUsageObject = {
4203
- /**
4204
- * The number of units consumed for a specific charge filter related to a charge item.
4205
- * @pattern ^[0-9]+.?[0-9]*$
4206
- * @example "0.9"
4207
- */
4208
- units?: string;
4209
- /**
4210
- * The total number of units consumed by the customer for a specific charge item, aggregated across all usage events.
4211
- * @pattern ^[0-9]+.?[0-9]*$
4212
- * @example "1.0"
4213
- */
4214
- total_aggregated_units?: string;
4215
- /**
4216
- * The amount in cents, tax excluded, consumed for a specific charge filter related to a charge item.
4217
- * @example 1000
4218
- */
4219
- amount_cents?: number;
4220
- /**
4221
- * 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.
4222
- * @example 10
4223
- */
4224
- events_count?: number;
4225
- /**
4226
- * Specifies the name that will be displayed on an invoice.
4227
- * @example "AWS eu-east-1"
4228
- */
4229
- invoice_display_name?: string;
4230
- /** Details about the pricing unit used for charge usage. */
4231
- pricing_unit_details?: UsagePricingUnitDetailsObject;
4232
- /**
4233
- * List of filter values applied to the usage.
4234
- * @example {"region":["us-east-1"]}
4235
- */
4236
- values?: Record<string, string[]>;
4237
- }[];
4238
- /** Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. */
4239
- export type CustomerChargeGroupedUsageObject = {
4240
- /**
4241
- * The amount in cents, tax excluded, consumed for a specific group related to a charge item.
4242
- * @example 1000
4243
- */
4244
- amount_cents?: number;
4245
- /**
4246
- * 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.
4247
- * @example 10
4248
- */
4249
- events_count?: number;
4250
- /**
4251
- * The number of units consumed for a specific group related to a charge item.
4252
- * @pattern ^[0-9]+.?[0-9]*$
4253
- * @example "0.9"
4254
- */
4255
- units?: string;
4256
- /**
4257
- * The total number of units consumed by the customer for a specific charge item, aggregated across all usage events.
4258
- * @pattern ^[0-9]+.?[0-9]*$
4259
- * @example "1.0"
4260
- */
4261
- total_aggregated_units?: string;
4262
- /** Details about the pricing unit used for charge usage. */
4263
- pricing_unit_details?: UsagePricingUnitDetailsObject;
4264
- /** Key value list of event properties aggregated by the charge model */
4265
- grouped_by?: Record<string, string>;
4266
- /** Array of filter object, representing multiple dimensions for a charge item. */
4267
- filters?: CustomerChargeFiltersUsageObject;
4268
- }[];
4269
- export interface CustomerChargeUsageObject {
4270
- /**
4271
- * The number of units consumed by the customer for a specific charge item.
4272
- * @pattern ^[0-9]+.?[0-9]*$
4273
- * @example "1.0"
4274
- */
4275
- units: string;
4276
- /**
4277
- * The total number of units consumed by the customer for a specific charge item, aggregated across all usage events.
4278
- * @pattern ^[0-9]+.?[0-9]*$
4279
- * @example "1.0"
4280
- */
4281
- total_aggregated_units: string;
4282
- /**
4283
- * 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.
4284
- * @example 10
4285
- */
4286
- events_count: number;
4287
- /**
4288
- * The amount in cents, tax excluded, consumed by the customer for a specific charge item.
4289
- * @example 123
4290
- */
4291
- amount_cents: number;
4292
- /**
4293
- * The currency of a usage item consumed by the customer.
4294
- * @example "EUR"
4295
- */
4296
- amount_currency: Currency;
4297
- /** Details about the pricing unit used for charge usage. */
4298
- pricing_unit_details?: UsagePricingUnitDetailsObject;
4299
- /** Object listing all the properties for a specific charge item. */
4300
- charge: {
4303
+ export interface WalletCreateInput {
4304
+ wallet?: {
4301
4305
  /**
4302
- * 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.
4303
- * @format uuid
4304
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4306
+ * The name of the wallet.
4307
+ * @example "Prepaid"
4305
4308
  */
4306
- lago_id: string;
4309
+ name?: string | null;
4307
4310
  /**
4308
- * The pricing model applied to this charge. Possible values are standard, `graduated`, `percentage`, `package` or `volume`.
4309
- * @example "graduated"
4311
+ * The code of the wallet.
4312
+ * @example "prepaid"
4310
4313
  */
4311
- charge_model: "standard" | "graduated" | "package" | "percentage" | "volume";
4314
+ code?: string | null;
4312
4315
  /**
4313
- * 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.
4314
- * @example "Setup"
4316
+ * Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.
4317
+ * @min 1
4318
+ * @max 50
4319
+ * @example 50
4315
4320
  */
4316
- invoice_display_name?: string;
4317
- };
4318
- /** The related billable metric object. */
4319
- billable_metric: {
4321
+ priority?: number;
4320
4322
  /**
4321
- * 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.
4322
- * @format uuid
4323
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4323
+ * The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.
4324
+ * @pattern ^[0-9]+.?[0-9]*$
4325
+ * @example "1.5"
4324
4326
  */
4325
- lago_id: string;
4327
+ rate_amount: string;
4326
4328
  /**
4327
- * The name of the billable metric used for this charge.
4328
- * @example "Storage"
4329
+ * The currency of the wallet.
4330
+ * @example "USD"
4329
4331
  */
4330
- name: string;
4332
+ currency: Currency;
4331
4333
  /**
4332
- * The code of the billable metric used for this charge.
4333
- * @example "storage"
4334
+ * The number of paid credits. Required only if there is no granted credits.
4335
+ * @pattern ^[0-9]+.?[0-9]*$
4336
+ * @example "20.0"
4334
4337
  */
4335
- code: string;
4338
+ paid_credits?: string | null;
4336
4339
  /**
4337
- * The aggregation type of the billable metric used for this charge. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`.
4338
- * @example "sum_agg"
4340
+ * The number of free granted credits. Required only if there is no paid credits.
4341
+ * @pattern ^[0-9]+.?[0-9]*$
4342
+ * @example "10.0"
4339
4343
  */
4340
- aggregation_type: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg" | "weighted_sum_agg" | "latest_agg";
4341
- };
4342
- /** Array of filter object, representing multiple dimensions for a charge item. */
4343
- filters?: CustomerChargeFiltersUsageObject;
4344
- /** Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. */
4345
- grouped_usage?: CustomerChargeGroupedUsageObject;
4346
- }
4347
- export interface CustomerUsageObject {
4348
- /**
4349
- * The lower bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC).
4350
- * @format date-time
4351
- * @example "2022-07-01T00:00:00Z"
4352
- */
4353
- from_datetime: string;
4354
- /**
4344
+ granted_credits?: string | null;
4345
+ /**
4346
+ * The customer external unique identifier (provided by your own application)
4347
+ * @example "hooli_1234"
4348
+ */
4349
+ external_customer_id: string;
4350
+ /**
4351
+ * The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
4352
+ * @format date-time
4353
+ * @example "2022-07-07T23:59:59Z"
4354
+ */
4355
+ expiration_at?: string | null;
4356
+ /**
4357
+ * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
4358
+ * @example false
4359
+ */
4360
+ invoice_requires_successful_payment?: boolean;
4361
+ /**
4362
+ * This optional field allows you to store a list of key-value pairs that provide additional information or custom attributes. These key-value pairs will be included in the metadata of wallet transactions generated during the wallet creation process.
4363
+ * @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
4364
+ */
4365
+ transaction_metadata?: any[] | null;
4366
+ /**
4367
+ * The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.
4368
+ * @example "Tokens for models 'high-fidelity-boost'"
4369
+ */
4370
+ transaction_name?: string | null;
4371
+ /** Set wallet limitations to fee types. */
4372
+ applies_to?: {
4373
+ /**
4374
+ * An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.
4375
+ * @example ["charge"]
4376
+ */
4377
+ fee_types?: any[] | null;
4378
+ /**
4379
+ * An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.
4380
+ * @example []
4381
+ */
4382
+ billable_metric_codes?: any[] | null;
4383
+ };
4384
+ /**
4385
+ * Minimum amount of cents that can be top-up with a single paid transaction.
4386
+ * @example 100
4387
+ */
4388
+ paid_top_up_min_amount_cents?: number | null;
4389
+ /**
4390
+ * Maximum amount of cents that can be top-up with a single paid transaction.
4391
+ * @example 1000
4392
+ */
4393
+ paid_top_up_max_amount_cents?: number | null;
4394
+ /**
4395
+ * If set to true, the wallet will ignore paid top-up limits on creation.
4396
+ * @example false
4397
+ */
4398
+ ignore_paid_top_up_limits_on_creation?: boolean | null;
4399
+ /** Configuration for invoice custom sections to apply to invoices generated by this resource. */
4400
+ invoice_custom_section?: InvoiceCustomSectionInput;
4401
+ /** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
4402
+ recurring_transaction_rules?: any[] | null;
4403
+ /** Optional payment method to use for processing wallet top-up payments. */
4404
+ payment_method?: PaymentMethodReference;
4405
+ /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
4406
+ metadata?: MetadataInput;
4407
+ };
4408
+ }
4409
+ export interface Wallet {
4410
+ wallet: WalletObject;
4411
+ }
4412
+ export interface WalletUpdateInput {
4413
+ wallet: {
4414
+ /**
4415
+ * The name of the wallet.
4416
+ * @example "new_name"
4417
+ */
4418
+ name?: string | null;
4419
+ /**
4420
+ * The code of the wallet.
4421
+ * @example "prepaid"
4422
+ */
4423
+ code?: string | null;
4424
+ /**
4425
+ * Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.
4426
+ * @min 1
4427
+ * @max 50
4428
+ * @example 50
4429
+ */
4430
+ priority?: number;
4431
+ /**
4432
+ * The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
4433
+ * @format date-time
4434
+ * @example "2022-07-07T23:59:59Z"
4435
+ */
4436
+ expiration_at?: string | null;
4437
+ /**
4438
+ * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
4439
+ * @example false
4440
+ */
4441
+ invoice_requires_successful_payment?: boolean;
4442
+ /** Configuration for invoice custom sections to apply to invoices generated by this resource. */
4443
+ invoice_custom_section?: InvoiceCustomSectionInput;
4444
+ /** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
4445
+ recurring_transaction_rules?: {
4446
+ /**
4447
+ * A unique identifier for the recurring transaction rule in the Lago application. Can be used to update a recurring transaction rule.
4448
+ * @format uuid
4449
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4450
+ */
4451
+ lago_id?: string;
4452
+ /**
4453
+ * The trigger. Possible values are `interval` or `threshold`.
4454
+ * @example "interval"
4455
+ */
4456
+ trigger?: "interval" | "threshold";
4457
+ /**
4458
+ * The method used for recurring top-up. Possible values are `fixed` or `target`.
4459
+ * @example "target"
4460
+ */
4461
+ method?: "fixed" | "target";
4462
+ /**
4463
+ * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly`, `semiannual` or `yearly`. Required only when trigger is set to `interval`.
4464
+ * @example "monthly"
4465
+ */
4466
+ interval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
4467
+ /**
4468
+ * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
4469
+ * @pattern ^[0-9]+.?[0-9]*$
4470
+ * @example "20.0"
4471
+ */
4472
+ threshold_credits?: string;
4473
+ /**
4474
+ * The number of paid credits. Required only if there is no granted credits.
4475
+ * @pattern ^[0-9]+.?[0-9]*$
4476
+ * @example "20.0"
4477
+ */
4478
+ paid_credits?: string | null;
4479
+ /**
4480
+ * The number of free granted credits. Required only if there is no paid credits.
4481
+ * @pattern ^[0-9]+.?[0-9]*$
4482
+ * @example "10.0"
4483
+ */
4484
+ granted_credits?: string | null;
4485
+ /**
4486
+ * The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
4487
+ * @format date-time
4488
+ * @example "2022-08-08T00:00:00Z"
4489
+ */
4490
+ started_at?: string | null;
4491
+ /**
4492
+ * The expiration date and time for this specific recurring transaction rule. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
4493
+ * @format date-time
4494
+ * @example "2023-09-30T23:59:59Z"
4495
+ */
4496
+ expiration_at?: string | null;
4497
+ /**
4498
+ * The target ongoing balance is the value set for the ongoing balance to be reached by the automatic top-up. Required only when trigger is set to `target`.
4499
+ * @pattern ^[0-9]+.?[0-9]*$
4500
+ * @example "200.0"
4501
+ */
4502
+ target_ongoing_balance?: string;
4503
+ /**
4504
+ * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
4505
+ * @example false
4506
+ */
4507
+ invoice_requires_successful_payment?: boolean;
4508
+ /**
4509
+ * This optional field allows you to store a list of key-value pairs containing additional information or custom attributes. These key-value pairs will populate the metadata of the wallet transactions triggered by this rule.
4510
+ * @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
4511
+ */
4512
+ transaction_metadata?: {
4513
+ /** The unique identifier for the attribute. */
4514
+ key?: string;
4515
+ /** The value associated with the key. */
4516
+ value?: string;
4517
+ }[];
4518
+ /**
4519
+ * The name of the wallet transactions triggered by this rule. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.
4520
+ * @example "Tokens for models 'high-fidelity-boost'"
4521
+ */
4522
+ transaction_name?: string | null;
4523
+ /** Configuration for invoice custom sections to apply to invoices generated by this resource. */
4524
+ invoice_custom_section?: InvoiceCustomSectionInput;
4525
+ /** Optional payment method to use for processing recurring top-up payments. */
4526
+ payment_method?: PaymentMethodReference;
4527
+ }[];
4528
+ /** Optional payment method to use for processing wallet top-up payments. */
4529
+ payment_method?: PaymentMethodReference;
4530
+ /** Set wallet limitations to fee types. */
4531
+ applies_to?: {
4532
+ /**
4533
+ * An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.
4534
+ * @example ["charge"]
4535
+ */
4536
+ fee_types?: any[] | null;
4537
+ /**
4538
+ * An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.
4539
+ * @example []
4540
+ */
4541
+ billable_metric_codes?: any[] | null;
4542
+ };
4543
+ /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
4544
+ metadata?: MetadataInput;
4545
+ };
4546
+ }
4547
+ export interface WalletMetadataResponse {
4548
+ /**
4549
+ * Custom metadata stored as key-value pairs.
4550
+ * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
4551
+ */
4552
+ metadata: MetadataObject;
4553
+ }
4554
+ export interface AlertThresholdBaseObject {
4555
+ /**
4556
+ * Unique identifier of the usage threshold created by Lago.
4557
+ * @example "warn"
4558
+ */
4559
+ code?: string | null;
4560
+ /**
4561
+ * This field when set to `true` indicates that the alert will be retrigger when this threshold is reached after the last non-recurring threshold. Only one recurring threshold per alert allowed.
4562
+ * @default false
4563
+ * @example false
4564
+ */
4565
+ recurring?: boolean;
4566
+ }
4567
+ export type AlertThresholdObject = AlertThresholdBaseObject & {
4568
+ /**
4569
+ * A value that should trigger this alert, formatted as a BigDecimal.
4570
+ * @pattern ^[0-9]+.?[0-9]*$
4571
+ * @example "99.0"
4572
+ */
4573
+ value: string;
4574
+ };
4575
+ export interface AlertObject {
4576
+ /**
4577
+ * Unique identifier of the alert, created by Lago.
4578
+ * @format uuid
4579
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4580
+ */
4581
+ lago_id: string;
4582
+ /**
4583
+ * Unique identifier of the organization, created by Lago.
4584
+ * @format uuid
4585
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4586
+ */
4587
+ lago_organization_id: string;
4588
+ /**
4589
+ * The subscription external unique identifier (provided by your own application).
4590
+ * @example "sub_1234567890"
4591
+ */
4592
+ external_subscription_id: string | null;
4593
+ /**
4594
+ * The customer external unique identifier (provided by your own application).
4595
+ * @example "cus_0987654321"
4596
+ */
4597
+ external_customer_id: string;
4598
+ /**
4599
+ * Unique identifier of the wallet, created by Lago.
4600
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4601
+ */
4602
+ lago_wallet_id?: string | null;
4603
+ /**
4604
+ * The wallet external unique identifier (provided by your own application).
4605
+ * @example "wallet_code"
4606
+ */
4607
+ wallet_code?: string | null;
4608
+ /** The billable metric associated with the alert. Only for alerts based on a billable metric. */
4609
+ billable_metric: BillableMetricObject;
4610
+ /**
4611
+ * The type of alert.
4612
+ * @example "billable_metric_current_usage_amount"
4613
+ */
4614
+ alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
4615
+ /**
4616
+ * Unique code used to identify the alert.
4617
+ * @example "storage_threshold_alert"
4618
+ */
4619
+ code: string;
4620
+ /**
4621
+ * The name of the alert.
4622
+ * @example "Storage Usage Alert"
4623
+ */
4624
+ name: string | null;
4625
+ /**
4626
+ * Indicates whether the alert is triggered when the monitored metric goes above or below the threshold.
4627
+ * @example "increasing"
4628
+ */
4629
+ direction?: "increasing" | "decreasing";
4630
+ /**
4631
+ * When the system checked if this alert should be triggered, this value was retrieved and checked against the thresholds.
4632
+ * @example 1000
4633
+ */
4634
+ previous_value: number;
4635
+ /**
4636
+ * The date and time in UTC (ISO 8601) when the system checked if this alert should be triggered. Null until it's processed for the first time.
4637
+ * @format date-time
4638
+ * @example "2025-05-19T10:04:21Z"
4639
+ */
4640
+ last_processed_at: string | null;
4641
+ /** Array of thresholds associated with the alert. */
4642
+ thresholds: AlertThresholdObject[];
4643
+ /**
4644
+ * The date and time in UTC (ISO 8601) when the alert was created.
4645
+ * @format date-time
4646
+ * @example "2025-03-20T10:00:00Z"
4647
+ */
4648
+ created_at: string;
4649
+ }
4650
+ export interface Alerts {
4651
+ alerts: AlertObject[];
4652
+ meta?: PaginationMeta;
4653
+ }
4654
+ export type AlertThresholdInput = AlertThresholdBaseObject & {
4655
+ /**
4656
+ * A value that should trigger this alert. This can be an integer or a string formatted as a BigDecimal.
4657
+ * @example 99
4658
+ */
4659
+ value: number | string;
4660
+ };
4661
+ export interface AlertBaseInput {
4662
+ /**
4663
+ * Unique code used to identify the alert.
4664
+ * @example "storage_threshold_alert"
4665
+ */
4666
+ code?: string;
4667
+ /**
4668
+ * The name of the alert.
4669
+ * @example "Storage Usage Alert"
4670
+ */
4671
+ name?: string | null;
4672
+ /** Array of thresholds associated with the alert. */
4673
+ thresholds?: AlertThresholdInput[];
4674
+ }
4675
+ export interface WalletAlertCreateInput {
4676
+ alert: AlertBaseInput & {
4677
+ /**
4678
+ * The type of alert.
4679
+ * @example "wallet_balance_amount"
4680
+ */
4681
+ alert_type: "wallet_balance_amount" | "wallet_credits_balance";
4682
+ /**
4683
+ * Unique code used to identify the alert.
4684
+ * @example "wallet_balance_alert"
4685
+ */
4686
+ code: string;
4687
+ /**
4688
+ * The name of the alert.
4689
+ * @example "Wallet Balance Alert"
4690
+ */
4691
+ name?: string | null;
4692
+ };
4693
+ }
4694
+ export interface WalletAlertBatchCreateInput {
4695
+ /** Array of alerts to create. All alerts are created atomically - if any fail validation, none are created. */
4696
+ alerts: (AlertBaseInput & {
4697
+ /**
4698
+ * The type of alert.
4699
+ * @example "wallet_balance_amount"
4700
+ */
4701
+ alert_type: "wallet_balance_amount" | "wallet_credits_balance";
4702
+ /**
4703
+ * Unique code used to identify the alert.
4704
+ * @example "wallet_balance_alert"
4705
+ */
4706
+ code: string;
4707
+ /**
4708
+ * The name of the alert.
4709
+ * @example "Wallet Balance Alert"
4710
+ */
4711
+ name?: string | null;
4712
+ })[];
4713
+ }
4714
+ export interface Alert {
4715
+ alert: AlertObject;
4716
+ }
4717
+ export interface WalletAlertUpdateInput {
4718
+ alert: AlertBaseInput & {
4719
+ /**
4720
+ * Unique code used to identify the alert.
4721
+ * @example "wallet_balance_alert"
4722
+ */
4723
+ code?: string;
4724
+ /**
4725
+ * The name of the alert.
4726
+ * @example "Wallet Balance Alert"
4727
+ */
4728
+ name?: string | null;
4729
+ };
4730
+ }
4731
+ /** Details about the pricing unit used for charge usage. */
4732
+ export interface UsagePricingUnitDetailsObject {
4733
+ /**
4734
+ * The amount in cents in the pricing unit.
4735
+ * @example 200
4736
+ */
4737
+ amount_cents: number;
4738
+ /**
4739
+ * The short name of the pricing unit.
4740
+ * @example "CR"
4741
+ */
4742
+ short_name: string;
4743
+ /**
4744
+ * The conversion rate from pricing units to the plan's currency.
4745
+ * @example "0.5"
4746
+ */
4747
+ conversion_rate: string;
4748
+ }
4749
+ /** Array of filter object, representing multiple dimensions for a charge item. */
4750
+ export type CustomerChargeFiltersUsageObject = {
4751
+ /**
4752
+ * The number of units consumed for a specific charge filter related to a charge item.
4753
+ * @pattern ^[0-9]+.?[0-9]*$
4754
+ * @example "0.9"
4755
+ */
4756
+ units?: string;
4757
+ /**
4758
+ * The total number of units consumed by the customer for a specific charge item, aggregated across all usage events.
4759
+ * @pattern ^[0-9]+.?[0-9]*$
4760
+ * @example "1.0"
4761
+ */
4762
+ total_aggregated_units?: string;
4763
+ /**
4764
+ * The amount in cents, tax excluded, consumed for a specific charge filter related to a charge item.
4765
+ * @example 1000
4766
+ */
4767
+ amount_cents?: number;
4768
+ /**
4769
+ * 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.
4770
+ * @example 10
4771
+ */
4772
+ events_count?: number;
4773
+ /**
4774
+ * Specifies the name that will be displayed on an invoice.
4775
+ * @example "AWS eu-east-1"
4776
+ */
4777
+ invoice_display_name?: string;
4778
+ /** Details about the pricing unit used for charge usage. */
4779
+ pricing_unit_details?: UsagePricingUnitDetailsObject;
4780
+ /**
4781
+ * List of filter values applied to the usage.
4782
+ * @example {"region":["us-east-1"]}
4783
+ */
4784
+ values?: Record<string, string[]>;
4785
+ }[];
4786
+ /** Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. */
4787
+ export type CustomerChargeGroupedUsageObject = {
4788
+ /**
4789
+ * The amount in cents, tax excluded, consumed for a specific group related to a charge item.
4790
+ * @example 1000
4791
+ */
4792
+ amount_cents?: number;
4793
+ /**
4794
+ * 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.
4795
+ * @example 10
4796
+ */
4797
+ events_count?: number;
4798
+ /**
4799
+ * The number of units consumed for a specific group related to a charge item.
4800
+ * @pattern ^[0-9]+.?[0-9]*$
4801
+ * @example "0.9"
4802
+ */
4803
+ units?: string;
4804
+ /**
4805
+ * The total number of units consumed by the customer for a specific charge item, aggregated across all usage events.
4806
+ * @pattern ^[0-9]+.?[0-9]*$
4807
+ * @example "1.0"
4808
+ */
4809
+ total_aggregated_units?: string;
4810
+ /** Details about the pricing unit used for charge usage. */
4811
+ pricing_unit_details?: UsagePricingUnitDetailsObject;
4812
+ /** Key value list of event properties aggregated by the charge model */
4813
+ grouped_by?: Record<string, string>;
4814
+ /** Array of filter object, representing multiple dimensions for a charge item. */
4815
+ filters?: CustomerChargeFiltersUsageObject;
4816
+ }[];
4817
+ export interface CustomerChargeUsageObject {
4818
+ /**
4819
+ * The number of units consumed by the customer for a specific charge item.
4820
+ * @pattern ^[0-9]+.?[0-9]*$
4821
+ * @example "1.0"
4822
+ */
4823
+ units: string;
4824
+ /**
4825
+ * The total number of units consumed by the customer for a specific charge item, aggregated across all usage events.
4826
+ * @pattern ^[0-9]+.?[0-9]*$
4827
+ * @example "1.0"
4828
+ */
4829
+ total_aggregated_units: string;
4830
+ /**
4831
+ * 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.
4832
+ * @example 10
4833
+ */
4834
+ events_count: number;
4835
+ /**
4836
+ * The amount in cents, tax excluded, consumed by the customer for a specific charge item.
4837
+ * @example 123
4838
+ */
4839
+ amount_cents: number;
4840
+ /**
4841
+ * The currency of a usage item consumed by the customer.
4842
+ * @example "EUR"
4843
+ */
4844
+ amount_currency: Currency;
4845
+ /** Details about the pricing unit used for charge usage. */
4846
+ pricing_unit_details?: UsagePricingUnitDetailsObject;
4847
+ /** Object listing all the properties for a specific charge item. */
4848
+ charge: {
4849
+ /**
4850
+ * 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.
4851
+ * @format uuid
4852
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4853
+ */
4854
+ lago_id: string;
4855
+ /**
4856
+ * The pricing model applied to this charge. Possible values are standard, `graduated`, `percentage`, `package` or `volume`.
4857
+ * @example "graduated"
4858
+ */
4859
+ charge_model: "standard" | "graduated" | "package" | "percentage" | "volume";
4860
+ /**
4861
+ * 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.
4862
+ * @example "Setup"
4863
+ */
4864
+ invoice_display_name?: string;
4865
+ };
4866
+ /** The related billable metric object. */
4867
+ billable_metric: {
4868
+ /**
4869
+ * 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.
4870
+ * @format uuid
4871
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4872
+ */
4873
+ lago_id: string;
4874
+ /**
4875
+ * The name of the billable metric used for this charge.
4876
+ * @example "Storage"
4877
+ */
4878
+ name: string;
4879
+ /**
4880
+ * The code of the billable metric used for this charge.
4881
+ * @example "storage"
4882
+ */
4883
+ code: string;
4884
+ /**
4885
+ * The aggregation type of the billable metric used for this charge. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`.
4886
+ * @example "sum_agg"
4887
+ */
4888
+ aggregation_type: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg" | "weighted_sum_agg" | "latest_agg";
4889
+ };
4890
+ /** Array of filter object, representing multiple dimensions for a charge item. */
4891
+ filters?: CustomerChargeFiltersUsageObject;
4892
+ /** Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. */
4893
+ grouped_usage?: CustomerChargeGroupedUsageObject;
4894
+ }
4895
+ export interface CustomerUsageObject {
4896
+ /**
4897
+ * The lower bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC).
4898
+ * @format date-time
4899
+ * @example "2022-07-01T00:00:00Z"
4900
+ */
4901
+ from_datetime: string;
4902
+ /**
4355
4903
  * The upper bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC).
4356
4904
  * @format date-time
4357
4905
  * @example "2022-07-31T23:59:59Z"
@@ -4960,28 +5508,12 @@ export interface InvoiceOneOffCreateInput {
4960
5508
  */
4961
5509
  skip_psp?: boolean | null;
4962
5510
  }[];
5511
+ /** Configuration for invoice custom sections to apply to invoices generated by this resource. */
5512
+ invoice_custom_section?: InvoiceCustomSectionInput;
4963
5513
  /** Optional payment method to use for processing the invoice payment. */
4964
5514
  payment_method?: PaymentMethodReference;
4965
5515
  };
4966
5516
  }
4967
- export interface ErrorDetailObject {
4968
- /**
4969
- * Unique identifier assigned to the error_detail within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the error's record within the Lago system.
4970
- * @format uuid
4971
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4972
- */
4973
- lago_id: string | null;
4974
- /**
4975
- * Code that specifies part of the application / connection, where the error originally happened
4976
- * @example "tax_error"
4977
- */
4978
- error_code: string;
4979
- /**
4980
- * Key value list of more elaborated error detail, where by the key of error_code an external service error details are stored
4981
- * @example {"tax_error":"taxDateTooFarInFuture"}
4982
- */
4983
- details: object;
4984
- }
4985
5517
  export type InvoiceObjectExtended = InvoiceObject & {
4986
5518
  credits?: CreditObject[];
4987
5519
  fees?: FeeObject[];
@@ -5756,6 +6288,11 @@ export interface ChargeObject {
5756
6288
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5757
6289
  */
5758
6290
  lago_billable_metric_id: string;
6291
+ /**
6292
+ * Unique code identifying the charge within the plan.
6293
+ * @example "api_requests_charge"
6294
+ */
6295
+ code?: string | null;
5759
6296
  /**
5760
6297
  * Unique code identifying a billable metric.
5761
6298
  * @example "requests"
@@ -5765,7 +6302,7 @@ export interface ChargeObject {
5765
6302
  * 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.
5766
6303
  * @example "Setup"
5767
6304
  */
5768
- invoice_display_name: string | null;
6305
+ invoice_display_name?: string | null;
5769
6306
  /**
5770
6307
  * The date and time when the charge was created. It is expressed in UTC format according to the ISO 8601 datetime standard.
5771
6308
  * @format date-time
@@ -5840,6 +6377,12 @@ export interface ChargeObject {
5840
6377
  * @example false
5841
6378
  */
5842
6379
  accepts_target_wallet?: boolean | null;
6380
+ /**
6381
+ * Unique identifier of the parent charge (if this is an override).
6382
+ * @format uuid
6383
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6384
+ */
6385
+ lago_parent_id?: string | null;
5843
6386
  }
5844
6387
  export interface FixedChargeProperties {
5845
6388
  /**
@@ -5937,7 +6480,7 @@ export interface FixedChargeObject {
5937
6480
  * Unique code for the fixed charge.
5938
6481
  * @example "setup_fee"
5939
6482
  */
5940
- code?: string;
6483
+ code: string;
5941
6484
  /**
5942
6485
  * The charge model for the fixed charge. Only `standard`, `graduated`, and `volume` models are supported for fixed charges.
5943
6486
  * @example "standard"
@@ -6220,6 +6763,11 @@ export interface PlanCreateInput {
6220
6763
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6221
6764
  */
6222
6765
  billable_metric_id: string;
6766
+ /**
6767
+ * Unique code identifying the charge within the plan.
6768
+ * @example "api_requests_charge"
6769
+ */
6770
+ code?: string;
6223
6771
  /**
6224
6772
  * Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:
6225
6773
  * - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)
@@ -6438,6 +6986,11 @@ export interface PlanUpdateInput {
6438
6986
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6439
6987
  */
6440
6988
  billable_metric_id?: string;
6989
+ /**
6990
+ * Unique code identifying the charge within the plan.
6991
+ * @example "api_requests_charge"
6992
+ */
6993
+ code?: string;
6441
6994
  /**
6442
6995
  * Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:
6443
6996
  * - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)
@@ -6603,6 +7156,312 @@ export interface PlanMetadataResponse {
6603
7156
  */
6604
7157
  metadata: MetadataObject;
6605
7158
  }
7159
+ export interface ChargesPaginated {
7160
+ charges: ChargeObject[];
7161
+ meta: PaginationMeta;
7162
+ }
7163
+ /** Properties of a charge that can be overridden at the subscription level. */
7164
+ export interface ChargeOverridableInput {
7165
+ /**
7166
+ * 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.
7167
+ * @example "Setup"
7168
+ */
7169
+ invoice_display_name?: string;
7170
+ /**
7171
+ * The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.
7172
+ * @example 0
7173
+ */
7174
+ min_amount_cents?: number;
7175
+ /** List of all thresholds utilized for calculating the charge. */
7176
+ properties?: ChargeProperties;
7177
+ /** List of filters used to apply differentiated pricing based on additional event properties. */
7178
+ filters?: ChargeFilterInput[];
7179
+ /** List of unique code used to identify the taxes. */
7180
+ tax_codes?: TaxCodes;
7181
+ /** The pricing unit to apply to the charge. */
7182
+ applied_pricing_unit?: {
7183
+ /**
7184
+ * The code of the pricing unit.
7185
+ * @example "credits"
7186
+ */
7187
+ code?: string;
7188
+ /**
7189
+ * The conversion rate from pricing units to the plan's currency.
7190
+ * This rate determines how many currency units (in the plan's base currency) equal one pricing unit.
7191
+ * For example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50.
7192
+ * @example "0.5"
7193
+ */
7194
+ conversion_rate?: string;
7195
+ };
7196
+ }
7197
+ export type ChargeInput = ChargeOverridableInput & {
7198
+ /**
7199
+ * Unique identifier of the billable metric created by Lago.
7200
+ * @format uuid
7201
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
7202
+ */
7203
+ billable_metric_id?: string;
7204
+ /**
7205
+ * Unique code identifying the charge within the plan.
7206
+ * @example "api_requests_charge"
7207
+ */
7208
+ code?: string;
7209
+ /**
7210
+ * Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:
7211
+ * - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)
7212
+ * - [`graduated_percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated-percentage)
7213
+ * - [`graduated`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated)
7214
+ * - [`package`](https://docs.getlago.com/guide/plans/charges/charge-models/package)
7215
+ * - [`percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/percentage)
7216
+ * - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard)
7217
+ * - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume)
7218
+ */
7219
+ charge_model?: ChargeModelEnum;
7220
+ /**
7221
+ * This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.
7222
+ * @example false
7223
+ */
7224
+ pay_in_advance?: boolean;
7225
+ /**
7226
+ * This field specifies whether the charge should be included in a proper invoice. If set to false, no invoice will be issued for this charge. You can only set it to `false` when `pay_in_advance` is `true`.
7227
+ * @example true
7228
+ */
7229
+ invoiceable?: boolean;
7230
+ /**
7231
+ * This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
7232
+ * This field determines whether and when the charge fee should be included in
7233
+ * the invoice. If `null`, no invoice will be issued for this charge fee.
7234
+ * If `invoice`, an invoice will be generated at the end of the period,
7235
+ * consolidating all charge fees with a succeeded payment status.
7236
+ * @example null
7237
+ */
7238
+ regroup_paid_fees?: "invoice";
7239
+ /**
7240
+ * Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
7241
+ *
7242
+ * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
7243
+ * - If set to `false`, the charge is billed in full.
7244
+ * - If not defined in the request, default value is `false`.
7245
+ * @example false
7246
+ */
7247
+ prorated?: boolean;
7248
+ };
7249
+ export interface ChargeCreateInput {
7250
+ charge: ChargeInput & {
7251
+ /**
7252
+ * This field determines whether the creation of the charge should be cascaded to the children plans. When set to `true`, the charge will be created in children plans. Conversely, when set to `false`, the charge will only be created in the plan itself. If not defined in the request, default value is `false`.
7253
+ * @example true
7254
+ */
7255
+ cascade_updates?: boolean;
7256
+ };
7257
+ }
7258
+ export interface Charge {
7259
+ charge: ChargeObject;
7260
+ }
7261
+ export interface ChargeUpdateInput {
7262
+ charge: ChargeInput & {
7263
+ /**
7264
+ * This field determines whether the changes made to the charge should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.
7265
+ * @example true
7266
+ */
7267
+ cascade_updates?: boolean;
7268
+ };
7269
+ }
7270
+ export interface ChargeDeleteInput {
7271
+ charge?: {
7272
+ /**
7273
+ * When set to `true`, the deletion will be cascaded to the children plans.
7274
+ * @example true
7275
+ */
7276
+ cascade_updates?: boolean;
7277
+ };
7278
+ }
7279
+ /** Charge filter values used to apply differentiated pricing based on additional event properties. */
7280
+ export interface ChargeFilterFullObject {
7281
+ /**
7282
+ * Unique identifier of the charge filter, created by Lago.
7283
+ * @format uuid
7284
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
7285
+ */
7286
+ lago_id: string;
7287
+ /**
7288
+ * Unique code identifying the charge this filter belongs to.
7289
+ * @example "api_requests_charge"
7290
+ */
7291
+ charge_code: string;
7292
+ /**
7293
+ * Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.
7294
+ * @example "AWS"
7295
+ */
7296
+ invoice_display_name: string | null;
7297
+ /** List of all thresholds utilized for calculating the charge. */
7298
+ properties: ChargeProperties;
7299
+ /**
7300
+ * List of possible filter values. The key and values must match one of the billable metric filters.
7301
+ * @example {"region":["us-east-1"]}
7302
+ */
7303
+ values: Record<string, string[]>;
7304
+ }
7305
+ export interface ChargeFiltersPaginated {
7306
+ filters: ChargeFilterFullObject[];
7307
+ meta: PaginationMeta;
7308
+ }
7309
+ export interface ChargeFilterCreateInput {
7310
+ filter: {
7311
+ /**
7312
+ * This field determines whether the creation of the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.
7313
+ * @example true
7314
+ */
7315
+ cascade_updates?: boolean;
7316
+ /**
7317
+ * Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.
7318
+ * @example "AWS"
7319
+ */
7320
+ invoice_display_name?: string | null;
7321
+ /** List of all thresholds utilized for calculating the charge. */
7322
+ properties: ChargeProperties;
7323
+ /**
7324
+ * List of possible filter values. The key and values must match one of the billable metric filters.
7325
+ * @example {"region":["us-east-1"]}
7326
+ */
7327
+ values: Record<string, string[]>;
7328
+ };
7329
+ }
7330
+ export interface ChargeFilterResponse {
7331
+ /** Charge filter values used to apply differentiated pricing based on additional event properties. */
7332
+ filter: ChargeFilterFullObject;
7333
+ }
7334
+ export interface ChargeFilterUpdateInput {
7335
+ filter: {
7336
+ /**
7337
+ * This field determines whether the changes made to the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.
7338
+ * @example true
7339
+ */
7340
+ cascade_updates?: boolean;
7341
+ /**
7342
+ * Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.
7343
+ * @example "AWS"
7344
+ */
7345
+ invoice_display_name?: string | null;
7346
+ /** List of all thresholds utilized for calculating the charge. */
7347
+ properties?: ChargeProperties;
7348
+ /**
7349
+ * List of possible filter values. The key and values must match one of the billable metric filters.
7350
+ * @example {"region":["us-east-1"]}
7351
+ */
7352
+ values?: Record<string, string[]>;
7353
+ };
7354
+ }
7355
+ export interface ChargeFilterDeleteInput {
7356
+ filter?: {
7357
+ /**
7358
+ * When set to `true`, the deletion will be cascaded to the children plans.
7359
+ * @example true
7360
+ */
7361
+ cascade_updates?: boolean;
7362
+ };
7363
+ }
7364
+ export interface FixedChargesPaginated {
7365
+ fixed_charges: FixedChargeObject[];
7366
+ meta: PaginationMeta;
7367
+ }
7368
+ /** Properties of a fixed charge that can be overridden at the subscription level. */
7369
+ export interface FixedChargeOverridableInput {
7370
+ /**
7371
+ * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name.
7372
+ * @example "Setup Fee"
7373
+ */
7374
+ invoice_display_name?: string | null;
7375
+ /**
7376
+ * The quantity of units for the fixed charge.
7377
+ * @example "1.0"
7378
+ */
7379
+ units?: string;
7380
+ /**
7381
+ * When set to `true`, the fixed charge units are applied immediately for active subscriptions. When set to `false`, the units are applied at the next billing period.
7382
+ * @example false
7383
+ */
7384
+ apply_units_immediately?: boolean;
7385
+ /** List of all thresholds utilized for calculating the fixed charge. */
7386
+ properties?: ChargeProperties;
7387
+ /** List of unique code used to identify the taxes. */
7388
+ tax_codes?: TaxCodes;
7389
+ }
7390
+ /**
7391
+ * Specifies the pricing model used for the calculation of the fixed charge fee. It can be any of the following values:
7392
+ * - `standard`
7393
+ * - `graduated`
7394
+ * - `volume`
7395
+ */
7396
+ export type FixedChargeModelEnum = "standard" | "graduated" | "volume";
7397
+ export type FixedChargeInput = FixedChargeOverridableInput & {
7398
+ /**
7399
+ * Unique identifier of the add-on. Either add_on_id or add_on_code is required.
7400
+ * @format uuid
7401
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
7402
+ */
7403
+ add_on_id?: string;
7404
+ /**
7405
+ * Unique code identifying an add-on. Either add_on_id or add_on_code is required.
7406
+ * @example "setup_fee"
7407
+ */
7408
+ add_on_code?: string;
7409
+ /**
7410
+ * Unique code identifying the fixed charge within the plan.
7411
+ * @example "setup_fee_charge"
7412
+ */
7413
+ code?: string;
7414
+ /**
7415
+ * Specifies the pricing model used for the calculation of the fixed charge fee. It can be any of the following values:
7416
+ * - `standard`
7417
+ * - `graduated`
7418
+ * - `volume`
7419
+ */
7420
+ charge_model?: FixedChargeModelEnum;
7421
+ /**
7422
+ * This field determines the billing timing for this fixed charge. When set to `true`, the charge is due and invoiced immediately at the beginning of the billing period. When set to `false`, the charge is due and invoiced at the end of the billing period.
7423
+ * @example true
7424
+ */
7425
+ pay_in_advance?: boolean;
7426
+ /**
7427
+ * Specifies whether a fixed charge is prorated based on the remaining number of days in the billing period or billed fully.
7428
+ *
7429
+ * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
7430
+ * - If set to `false`, the charge is billed in full.
7431
+ * @example false
7432
+ */
7433
+ prorated?: boolean;
7434
+ };
7435
+ export interface FixedChargeCreateInput {
7436
+ fixed_charge: FixedChargeInput & {
7437
+ /**
7438
+ * This field determines whether the creation of the fixed charge should be cascaded to the children plans. When set to `true`, the fixed charge will be created in children plans. Conversely, when set to `false`, the fixed charge will only be created in the plan itself. If not defined in the request, default value is `false`.
7439
+ * @example true
7440
+ */
7441
+ cascade_updates?: boolean;
7442
+ };
7443
+ }
7444
+ export interface FixedCharge {
7445
+ fixed_charge: FixedChargeObject;
7446
+ }
7447
+ export interface FixedChargeUpdateInput {
7448
+ fixed_charge: FixedChargeInput & {
7449
+ /**
7450
+ * This field determines whether the changes made to the fixed charge should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.
7451
+ * @example true
7452
+ */
7453
+ cascade_updates?: boolean;
7454
+ };
7455
+ }
7456
+ export interface FixedChargeDeleteInput {
7457
+ fixed_charge?: {
7458
+ /**
7459
+ * When set to `true`, the deletion will be cascaded to the children plans.
7460
+ * @example true
7461
+ */
7462
+ cascade_updates?: boolean;
7463
+ };
7464
+ }
6606
7465
  /** Based plan overrides. */
6607
7466
  export interface PlanOverridesObject {
6608
7467
  /**
@@ -6653,6 +7512,11 @@ export interface PlanOverridesObject {
6653
7512
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6654
7513
  */
6655
7514
  billable_metric_id?: string;
7515
+ /**
7516
+ * Unique code identifying the charge within the plan.
7517
+ * @example "api_requests_charge"
7518
+ */
7519
+ code?: string;
6656
7520
  /**
6657
7521
  * Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:
6658
7522
  * - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)
@@ -6792,14 +7656,35 @@ export interface SubscriptionCreateInput {
6792
7656
  subscription_at?: string;
6793
7657
  /** Based plan overrides. */
6794
7658
  plan_overrides?: PlanOverridesObject;
7659
+ /** Configuration for invoice custom sections to apply to invoices generated by this resource. */
7660
+ invoice_custom_section?: InvoiceCustomSectionInput;
6795
7661
  /** Optional payment method to use for processing subscription payments. */
6796
7662
  payment_method?: PaymentMethodReference;
6797
7663
  };
6798
7664
  }
7665
+ export interface ApplicableUsageThreshold {
7666
+ /**
7667
+ * The display name of the usage threshold.
7668
+ * @example "Threshold 1"
7669
+ */
7670
+ threshold_display_name: string | null;
7671
+ /**
7672
+ * The amount to reach to trigger a `progressive_billing` invoice.
7673
+ * @example 10000
7674
+ */
7675
+ amount_cents: number;
7676
+ /**
7677
+ * This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount.
7678
+ * @example true
7679
+ */
7680
+ recurring: boolean;
7681
+ }
6799
7682
  export type SubscriptionObjectExtended = SubscriptionObject & {
6800
7683
  plan?: PlanObject;
7684
+ /** List of usage thresholds applicable to this subscription. */
7685
+ applicable_usage_thresholds?: ApplicableUsageThreshold[];
6801
7686
  };
6802
- export interface Subscription {
7687
+ export interface SubscriptionExtended {
6803
7688
  subscription: SubscriptionObjectExtended;
6804
7689
  }
6805
7690
  export interface SubscriptionUpdateInput {
@@ -6821,577 +7706,239 @@ export interface SubscriptionUpdateInput {
6821
7706
  */
6822
7707
  ending_at: string | null;
6823
7708
  /**
6824
- * The start date and time of the subscription. This field can only be modified for pending subscriptions that have not yet started. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
6825
- * @format date-time
6826
- * @example "2022-08-08T00:00:00Z"
6827
- */
6828
- subscription_at?: string;
6829
- /** Based plan overrides. */
6830
- plan_overrides?: PlanOverridesObject;
6831
- /** Optional payment method to use for processing subscription payments. */
6832
- payment_method?: PaymentMethodReference;
6833
- };
6834
- }
6835
- export interface LifetimeUsageThresholdObject {
6836
- /**
6837
- * The usage threshold amount in cents.
6838
- * @example 100
6839
- */
6840
- amount_cents: number;
6841
- /**
6842
- * The completion ratio of the usage threshold.
6843
- * @example 0.5
6844
- */
6845
- completion_ratio: number;
6846
- /**
6847
- * The date and time when the usage threshold was reached. The date and time must be in ISO 8601 format.
6848
- * @format date-time
6849
- * @example "2024-01-01T00:00:00Z"
6850
- */
6851
- reached_at: string | null;
6852
- }
6853
- export interface LifetimeUsageObject {
6854
- /**
6855
- * Unique identifier assigned to the lifetime usage record within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the lifetime usage record within the Lago system
6856
- * @format uuid
6857
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6858
- */
6859
- lago_id: string;
6860
- /**
6861
- * Unique identifier assigned to the subscription record within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription record within the Lago system
6862
- * @format uuid
6863
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6864
- */
6865
- lago_subscription_id: string;
6866
- /**
6867
- * The subscription external unique identifier (provided by your own application).
6868
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
6869
- */
6870
- external_subscription_id: string;
6871
- /**
6872
- * The historical usage amount in cents for the subscription (provided by your own application).
6873
- * @example 100
6874
- */
6875
- external_historical_usage_amount_cents: number;
6876
- /**
6877
- * The total invoiced usage amount in cents for the subscription.
6878
- * @example 100
6879
- */
6880
- invoiced_usage_amount_cents: number;
6881
- /**
6882
- * The current usage amount in cents for the subscription on the current billing period.
6883
- * @example 100
6884
- */
6885
- current_usage_amount_cents: number;
6886
- /**
6887
- * The recording start date and time of the subscription lifetime usage. The date and time must be in ISO 8601 format.
6888
- * @format date-time
6889
- * @example "2024-01-01T00:00:00Z"
6890
- */
6891
- from_datetime: string | null;
6892
- /**
6893
- * The recording end date and time of the subscription lifetime usage. The date and time must be in ISO 8601 format.
6894
- * @format date-time
6895
- * @example "2024-12-31T23:59:59Z"
6896
- */
6897
- to_datetime: string;
6898
- /** Array of usage thresholds attached to the subscription's plan. */
6899
- usage_thresholds?: LifetimeUsageThresholdObject[];
6900
- }
6901
- export interface LifetimeUsage {
6902
- lifetime_usage: LifetimeUsageObject;
6903
- }
6904
- export interface LifetimeUsageInput {
6905
- lifetime_usage: {
6906
- /**
6907
- * The historical usage amount in cents for the subscription (provided by your own application).
6908
- * @example 100
6909
- */
6910
- external_historical_usage_amount_cents: number;
6911
- };
6912
- }
6913
- export interface AlertThresholdBaseObject {
6914
- /**
6915
- * Unique identifier of the usage threshold created by Lago.
6916
- * @example "warn"
6917
- */
6918
- code?: string | null;
6919
- /**
6920
- * This field when set to `true` indicates that the alert will be retrigger when this threshold is reached after the last non-recurring threshold. Only one recurring threshold per alert allowed.
6921
- * @default false
6922
- * @example false
6923
- */
6924
- recurring?: boolean;
6925
- }
6926
- export type AlertThresholdObject = AlertThresholdBaseObject & {
6927
- /**
6928
- * A value that should trigger this alert, formatted as a BigDecimal.
6929
- * @pattern ^[0-9]+.?[0-9]*$
6930
- * @example "99.0"
6931
- */
6932
- value: string;
6933
- };
6934
- export interface AlertObject {
6935
- /**
6936
- * Unique identifier of the alert, created by Lago.
6937
- * @format uuid
6938
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6939
- */
6940
- lago_id: string;
6941
- /**
6942
- * Unique identifier of the organization, created by Lago.
6943
- * @format uuid
6944
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6945
- */
6946
- lago_organization_id: string;
6947
- /**
6948
- * The subscription external unique identifier (provided by your own application).
6949
- * @example "sub_1234567890"
6950
- */
6951
- external_subscription_id: string;
6952
- /**
6953
- * The customer external unique identifier (provided by your own application).
6954
- * @example "cus_0987654321"
6955
- */
6956
- external_customer_id: string;
6957
- /** The billable metric associated with the alert. Only for alerts based on a billable metric. */
6958
- billable_metric: BillableMetricObject;
6959
- /**
6960
- * The type of alert.
6961
- * @example "billable_metric_current_usage_amount"
6962
- */
6963
- alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
6964
- /**
6965
- * Unique code used to identify the alert.
6966
- * @example "storage_threshold_alert"
6967
- */
6968
- code: string;
6969
- /**
6970
- * The name of the alert.
6971
- * @example "Storage Usage Alert"
6972
- */
6973
- name: string | null;
6974
- /**
6975
- * When the system checked if this alert should be triggered, this value was retrieved and checked against the thresholds.
6976
- * @example 1000
6977
- */
6978
- previous_value: number;
6979
- /**
6980
- * The date and time in UTC (ISO 8601) when the system checked if this alert should be triggered. Null until it's processed for the first time.
6981
- * @format date-time
6982
- * @example "2025-05-19T10:04:21Z"
6983
- */
6984
- last_processed_at: string | null;
6985
- /** Array of thresholds associated with the alert. */
6986
- thresholds: AlertThresholdObject[];
6987
- /**
6988
- * The date and time in UTC (ISO 8601) when the alert was created.
6989
- * @format date-time
6990
- * @example "2025-03-20T10:00:00Z"
6991
- */
6992
- created_at: string;
6993
- }
6994
- export interface Alerts {
6995
- alerts: AlertObject[];
6996
- meta?: PaginationMeta;
6997
- }
6998
- export type AlertThresholdInput = AlertThresholdBaseObject & {
6999
- /**
7000
- * A value that should trigger this alert. This can be an integer or a string formatted as a BigDecimal.
7001
- * @example 99
7002
- */
7003
- value: number | string;
7004
- };
7005
- export interface AlertBaseInput {
7006
- /**
7007
- * Unique code used to identify the alert.
7008
- * @example "storage_threshold_alert"
7009
- */
7010
- code?: string;
7011
- /**
7012
- * The code of the billable metric associated with the alert. Only for alerts based on a billable metric.
7013
- * @example "storage_usage"
7014
- */
7015
- billable_metric_code?: string | null;
7016
- /**
7017
- * The name of the alert.
7018
- * @example "Storage Usage Alert"
7019
- */
7020
- name?: string | null;
7021
- /** Array of thresholds associated with the alert. */
7022
- thresholds?: AlertThresholdInput[];
7023
- }
7024
- export interface AlertCreateInput {
7025
- alert: AlertBaseInput & {
7026
- /**
7027
- * The type of alert.
7028
- * @example "billable_metric_current_usage_amount"
7029
- */
7030
- alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
7031
- /**
7032
- * Unique code used to identify the alert.
7033
- * @example "storage_threshold_alert"
7034
- */
7035
- code: string;
7036
- };
7037
- }
7038
- export interface AlertBatchCreateInput {
7039
- /** Array of alerts to create. All alerts are created atomically - if any fail validation, none are created. */
7040
- alerts: (AlertBaseInput & {
7041
- /**
7042
- * The type of alert.
7043
- * @example "billable_metric_current_usage_amount"
7044
- */
7045
- alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
7046
- /**
7047
- * Unique code used to identify the alert.
7048
- * @example "storage_threshold_alert"
7049
- */
7050
- code: string;
7051
- })[];
7052
- }
7053
- export interface Alert {
7054
- alert: AlertObject;
7709
+ * The start date and time of the subscription. This field can only be modified for pending subscriptions that have not yet started. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
7710
+ * @format date-time
7711
+ * @example "2022-08-08T00:00:00Z"
7712
+ */
7713
+ subscription_at?: string;
7714
+ /** Based plan overrides. */
7715
+ plan_overrides?: PlanOverridesObject;
7716
+ /** Configuration for invoice custom sections to apply to invoices generated by this resource. */
7717
+ invoice_custom_section?: InvoiceCustomSectionInput;
7718
+ /** Optional payment method to use for processing subscription payments. */
7719
+ payment_method?: PaymentMethodReference;
7720
+ };
7055
7721
  }
7056
- export interface AlertUpdateInput {
7057
- alert: AlertBaseInput;
7722
+ export interface Subscription {
7723
+ subscription: SubscriptionObject;
7058
7724
  }
7059
- export type SubscriptionEntitlementPrivilegeObject = FeaturePrivilegeObject & {
7060
- /**
7061
- * Applicable value this this subscription (override_value if set, plan_value otherwise). Type depends on the privilege's value_type.
7062
- * @example 10
7063
- */
7064
- value: number | boolean | string;
7725
+ export interface LifetimeUsageThresholdObject {
7065
7726
  /**
7066
- * Value assigned to this privilege in the plan. Type depends on the privilege's value_type.
7067
- * @example 10
7727
+ * The usage threshold amount in cents.
7728
+ * @example 100
7068
7729
  */
7069
- plan_value: number | boolean | string;
7730
+ amount_cents: number;
7070
7731
  /**
7071
- * Value assigned to this subscription specifically. Type depends on the privilege's value_type. Null if no override is set.
7072
- * @example 10
7732
+ * The completion ratio of the usage threshold.
7733
+ * @example 0.5
7073
7734
  */
7074
- override_value: number | boolean | string | null;
7075
- };
7076
- export interface SubscriptionEntitlementObject {
7735
+ completion_ratio: number;
7077
7736
  /**
7078
- * Unique code used to identify the feature. Max 255 characters.
7079
- * @example "seats"
7737
+ * The date and time when the usage threshold was reached. The date and time must be in ISO 8601 format.
7738
+ * @format date-time
7739
+ * @example "2024-01-01T00:00:00Z"
7080
7740
  */
7081
- code: string;
7741
+ reached_at: string | null;
7742
+ }
7743
+ export interface LifetimeUsageObject {
7082
7744
  /**
7083
- * Name of the feature. Max 255 characters.
7084
- * @example "Number of seats"
7745
+ * Unique identifier assigned to the lifetime usage record within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the lifetime usage record within the Lago system
7746
+ * @format uuid
7747
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
7085
7748
  */
7086
- name: string | null;
7749
+ lago_id: string;
7087
7750
  /**
7088
- * Description of the feature. Max 600 characters.
7089
- * @example "Number of users of the account"
7751
+ * Unique identifier assigned to the subscription record within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription record within the Lago system
7752
+ * @format uuid
7753
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
7090
7754
  */
7091
- description: string | null;
7755
+ lago_subscription_id: string;
7092
7756
  /**
7093
- * Privileges associated with this feature. Each privilege shows the plan value and any subscription override.
7094
- * @example [{"code":"max","name":"Maximum","value_type":"integer","config":{},"value":15,"plan_value":10,"override_value":15},{"code":"max_admins","name":"Max Admins","value_type":"integer","config":{},"value":5,"plan_value":5,"override_value":null},{"code":"root","name":"Allow root user","value_type":"boolean","config":{},"value":true,"plan_value":true,"override_value":null},{"code":"provider","name":"SSO Provider","value_type":"select","value":"okta","plan_value":"google","override_value":"okta","config":{"select_options":["google","okta"]}}]
7757
+ * The subscription external unique identifier (provided by your own application).
7758
+ * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
7095
7759
  */
7096
- privileges: SubscriptionEntitlementPrivilegeObject[];
7097
- /** @example {"max":15,"provider":"okta"} */
7098
- overrides: Record<string, any>;
7099
- }
7100
- export interface SubscriptionEntitlements {
7101
- entitlements: SubscriptionEntitlementObject[];
7102
- }
7103
- export interface SubscriptionEntitlement {
7104
- entitlement: SubscriptionEntitlementObject;
7105
- }
7106
- export interface FixedCharges {
7107
- fixed_charges: FixedChargeObject[];
7108
- }
7109
- export interface TaxesPaginated {
7110
- taxes: TaxObject[];
7111
- meta: PaginationMeta;
7112
- }
7113
- export interface TaxBaseInput {
7760
+ external_subscription_id: string;
7114
7761
  /**
7115
- * Name of the tax.
7116
- * @example "TVA"
7762
+ * The historical usage amount in cents for the subscription (provided by your own application).
7763
+ * @example 100
7117
7764
  */
7118
- name?: string;
7765
+ external_historical_usage_amount_cents: number;
7119
7766
  /**
7120
- * Unique code used to identify the tax associated with the API request.
7121
- * @example "french_standard_vat"
7767
+ * The total invoiced usage amount in cents for the subscription.
7768
+ * @example 100
7122
7769
  */
7123
- code?: string;
7770
+ invoiced_usage_amount_cents: number;
7124
7771
  /**
7125
- * The percentage rate of the tax
7126
- * @pattern ^[0-9]+.?[0-9]*$
7127
- * @example "20.0"
7772
+ * The current usage amount in cents for the subscription on the current billing period.
7773
+ * @example 100
7128
7774
  */
7129
- rate?: string;
7775
+ current_usage_amount_cents: number;
7130
7776
  /**
7131
- * Internal description of the taxe
7132
- * @example "French standard VAT"
7777
+ * The recording start date and time of the subscription lifetime usage. The date and time must be in ISO 8601 format.
7778
+ * @format date-time
7779
+ * @example "2024-01-01T00:00:00Z"
7133
7780
  */
7134
- description?: string | null;
7781
+ from_datetime: string | null;
7135
7782
  /**
7136
- * This field is deprecated and will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.
7137
- * @deprecated
7138
- * @example true
7783
+ * The recording end date and time of the subscription lifetime usage. The date and time must be in ISO 8601 format.
7784
+ * @format date-time
7785
+ * @example "2024-12-31T23:59:59Z"
7139
7786
  */
7140
- applied_to_organization?: boolean;
7141
- }
7142
- export interface TaxCreateInput {
7143
- tax: TaxBaseInput;
7144
- }
7145
- export interface Tax {
7146
- tax: TaxObject;
7787
+ to_datetime: string;
7788
+ /** Array of usage thresholds attached to the subscription's plan. */
7789
+ usage_thresholds?: LifetimeUsageThresholdObject[];
7147
7790
  }
7148
- export interface TaxUpdateInput {
7149
- tax: TaxBaseInput;
7791
+ export interface LifetimeUsage {
7792
+ lifetime_usage: LifetimeUsageObject;
7150
7793
  }
7151
- export interface WalletCreateInput {
7152
- wallet?: {
7153
- /**
7154
- * The name of the wallet.
7155
- * @example "Prepaid"
7156
- */
7157
- name?: string | null;
7158
- /**
7159
- * The code of the wallet.
7160
- * @example "prepaid"
7161
- */
7162
- code?: string | null;
7163
- /**
7164
- * Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.
7165
- * @min 1
7166
- * @max 50
7167
- * @example 50
7168
- */
7169
- priority?: number;
7170
- /**
7171
- * The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.
7172
- * @pattern ^[0-9]+.?[0-9]*$
7173
- * @example "1.5"
7174
- */
7175
- rate_amount: string;
7176
- /**
7177
- * The currency of the wallet.
7178
- * @example "USD"
7179
- */
7180
- currency: Currency;
7181
- /**
7182
- * The number of paid credits. Required only if there is no granted credits.
7183
- * @pattern ^[0-9]+.?[0-9]*$
7184
- * @example "20.0"
7185
- */
7186
- paid_credits?: string | null;
7187
- /**
7188
- * The number of free granted credits. Required only if there is no paid credits.
7189
- * @pattern ^[0-9]+.?[0-9]*$
7190
- * @example "10.0"
7191
- */
7192
- granted_credits?: string | null;
7193
- /**
7194
- * The customer external unique identifier (provided by your own application)
7195
- * @example "hooli_1234"
7196
- */
7197
- external_customer_id: string;
7198
- /**
7199
- * The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
7200
- * @format date-time
7201
- * @example "2022-07-07T23:59:59Z"
7202
- */
7203
- expiration_at?: string | null;
7204
- /**
7205
- * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
7206
- * @example false
7207
- */
7208
- invoice_requires_successful_payment?: boolean;
7209
- /**
7210
- * This optional field allows you to store a list of key-value pairs that provide additional information or custom attributes. These key-value pairs will be included in the metadata of wallet transactions generated during the wallet creation process.
7211
- * @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
7212
- */
7213
- transaction_metadata?: any[] | null;
7214
- /**
7215
- * The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.
7216
- * @example "Tokens for models 'high-fidelity-boost'"
7217
- */
7218
- transaction_name?: string | null;
7219
- /** Set wallet limitations to fee types. */
7220
- applies_to?: {
7221
- /**
7222
- * An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.
7223
- * @example ["charge"]
7224
- */
7225
- fee_types?: any[] | null;
7226
- /**
7227
- * An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.
7228
- * @example []
7229
- */
7230
- billable_metric_codes?: any[] | null;
7231
- };
7794
+ export interface LifetimeUsageInput {
7795
+ lifetime_usage: {
7232
7796
  /**
7233
- * Minimum amount of cents that can be top-up with a single paid transaction.
7797
+ * The historical usage amount in cents for the subscription (provided by your own application).
7234
7798
  * @example 100
7235
7799
  */
7236
- paid_top_up_min_amount_cents?: number | null;
7237
- /**
7238
- * Maximum amount of cents that can be top-up with a single paid transaction.
7239
- * @example 1000
7240
- */
7241
- paid_top_up_max_amount_cents?: number | null;
7242
- /**
7243
- * If set to true, the wallet will ignore paid top-up limits on creation.
7244
- * @example false
7245
- */
7246
- ignore_paid_top_up_limits_on_creation?: boolean | null;
7247
- /** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
7248
- recurring_transaction_rules?: any[] | null;
7249
- /** Optional payment method to use for processing wallet top-up payments. */
7250
- payment_method?: PaymentMethodReference;
7251
- /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
7252
- metadata?: MetadataInput;
7800
+ external_historical_usage_amount_cents: number;
7253
7801
  };
7254
7802
  }
7255
- export interface Wallet {
7256
- wallet: WalletObject;
7257
- }
7258
- export interface WalletUpdateInput {
7259
- wallet: {
7803
+ export interface AlertCreateInput {
7804
+ alert: AlertBaseInput & {
7260
7805
  /**
7261
- * The name of the wallet.
7262
- * @example "new_name"
7806
+ * The type of alert.
7807
+ * @example "billable_metric_current_usage_amount"
7263
7808
  */
7264
- name?: string | null;
7809
+ alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
7265
7810
  /**
7266
- * The code of the wallet.
7267
- * @example "prepaid"
7811
+ * Unique code used to identify the alert.
7812
+ * @example "storage_threshold_alert"
7268
7813
  */
7269
- code?: string | null;
7814
+ code: string;
7270
7815
  /**
7271
- * Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.
7272
- * @min 1
7273
- * @max 50
7274
- * @example 50
7816
+ * The code of the billable metric associated with the alert. Only for alerts based on a billable metric.
7817
+ * @example "storage_usage"
7818
+ */
7819
+ billable_metric_code?: string | null;
7820
+ };
7821
+ }
7822
+ export interface AlertBatchCreateInput {
7823
+ /** Array of alerts to create. All alerts are created atomically - if any fail validation, none are created. */
7824
+ alerts: (AlertBaseInput & {
7825
+ /**
7826
+ * The type of alert.
7827
+ * @example "billable_metric_current_usage_amount"
7275
7828
  */
7276
- priority?: number;
7829
+ alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
7277
7830
  /**
7278
- * The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
7279
- * @format date-time
7280
- * @example "2022-07-07T23:59:59Z"
7831
+ * Unique code used to identify the alert.
7832
+ * @example "storage_threshold_alert"
7281
7833
  */
7282
- expiration_at?: string | null;
7834
+ code: string;
7835
+ })[];
7836
+ }
7837
+ export interface AlertUpdateInput {
7838
+ alert: AlertBaseInput & {
7283
7839
  /**
7284
- * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
7285
- * @example false
7840
+ * The code of the billable metric associated with the alert. Only for alerts based on a billable metric.
7841
+ * @example "storage_usage"
7286
7842
  */
7287
- invoice_requires_successful_payment?: boolean;
7288
- /** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
7289
- recurring_transaction_rules?: {
7290
- /**
7291
- * A unique identifier for the recurring transaction rule in the Lago application. Can be used to update a recurring transaction rule.
7292
- * @format uuid
7293
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
7294
- */
7295
- lago_id?: string;
7296
- /**
7297
- * The trigger. Possible values are `interval` or `threshold`.
7298
- * @example "interval"
7299
- */
7300
- trigger?: "interval" | "threshold";
7301
- /**
7302
- * The method used for recurring top-up. Possible values are `fixed` or `target`.
7303
- * @example "target"
7304
- */
7305
- method?: "fixed" | "target";
7306
- /**
7307
- * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly`, `semiannual` or `yearly`. Required only when trigger is set to `interval`.
7308
- * @example "monthly"
7309
- */
7310
- interval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
7311
- /**
7312
- * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
7313
- * @pattern ^[0-9]+.?[0-9]*$
7314
- * @example "20.0"
7315
- */
7316
- threshold_credits?: string;
7317
- /**
7318
- * The number of paid credits. Required only if there is no granted credits.
7319
- * @pattern ^[0-9]+.?[0-9]*$
7320
- * @example "20.0"
7321
- */
7322
- paid_credits?: string | null;
7323
- /**
7324
- * The number of free granted credits. Required only if there is no paid credits.
7325
- * @pattern ^[0-9]+.?[0-9]*$
7326
- * @example "10.0"
7327
- */
7328
- granted_credits?: string | null;
7329
- /**
7330
- * The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
7331
- * @format date-time
7332
- * @example "2022-08-08T00:00:00Z"
7333
- */
7334
- started_at?: string | null;
7335
- /**
7336
- * The expiration date and time for this specific recurring transaction rule. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
7337
- * @format date-time
7338
- * @example "2023-09-30T23:59:59Z"
7339
- */
7340
- expiration_at?: string | null;
7341
- /**
7342
- * The target ongoing balance is the value set for the ongoing balance to be reached by the automatic top-up. Required only when trigger is set to `target`.
7343
- * @pattern ^[0-9]+.?[0-9]*$
7344
- * @example "200.0"
7345
- */
7346
- target_ongoing_balance?: string;
7347
- /**
7348
- * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
7349
- * @example false
7350
- */
7351
- invoice_requires_successful_payment?: boolean;
7352
- /**
7353
- * This optional field allows you to store a list of key-value pairs containing additional information or custom attributes. These key-value pairs will populate the metadata of the wallet transactions triggered by this rule.
7354
- * @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
7355
- */
7356
- transaction_metadata?: {
7357
- /** The unique identifier for the attribute. */
7358
- key?: string;
7359
- /** The value associated with the key. */
7360
- value?: string;
7361
- }[];
7362
- /**
7363
- * The name of the wallet transactions triggered by this rule. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.
7364
- * @example "Tokens for models 'high-fidelity-boost'"
7365
- */
7366
- transaction_name?: string | null;
7367
- /** Optional payment method to use for processing recurring top-up payments. */
7368
- payment_method?: PaymentMethodReference;
7369
- }[];
7370
- /** Optional payment method to use for processing wallet top-up payments. */
7371
- payment_method?: PaymentMethodReference;
7372
- /** Set wallet limitations to fee types. */
7373
- applies_to?: {
7374
- /**
7375
- * An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.
7376
- * @example ["charge"]
7377
- */
7378
- fee_types?: any[] | null;
7379
- /**
7380
- * An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.
7381
- * @example []
7382
- */
7383
- billable_metric_codes?: any[] | null;
7384
- };
7385
- /** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
7386
- metadata?: MetadataInput;
7843
+ billable_metric_code?: string | null;
7387
7844
  };
7388
7845
  }
7389
- export interface WalletMetadataResponse {
7846
+ export type SubscriptionEntitlementPrivilegeObject = FeaturePrivilegeObject & {
7390
7847
  /**
7391
- * Custom metadata stored as key-value pairs.
7392
- * Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
7848
+ * Applicable value this this subscription (override_value if set, plan_value otherwise). Type depends on the privilege's value_type.
7849
+ * @example 10
7393
7850
  */
7394
- metadata: MetadataObject;
7851
+ value: number | boolean | string;
7852
+ /**
7853
+ * Value assigned to this privilege in the plan. Type depends on the privilege's value_type.
7854
+ * @example 10
7855
+ */
7856
+ plan_value: number | boolean | string;
7857
+ /**
7858
+ * Value assigned to this subscription specifically. Type depends on the privilege's value_type. Null if no override is set.
7859
+ * @example 10
7860
+ */
7861
+ override_value: number | boolean | string | null;
7862
+ };
7863
+ export interface SubscriptionEntitlementObject {
7864
+ /**
7865
+ * Unique code used to identify the feature. Max 255 characters.
7866
+ * @example "seats"
7867
+ */
7868
+ code: string;
7869
+ /**
7870
+ * Name of the feature. Max 255 characters.
7871
+ * @example "Number of seats"
7872
+ */
7873
+ name: string | null;
7874
+ /**
7875
+ * Description of the feature. Max 600 characters.
7876
+ * @example "Number of users of the account"
7877
+ */
7878
+ description: string | null;
7879
+ /**
7880
+ * Privileges associated with this feature. Each privilege shows the plan value and any subscription override.
7881
+ * @example [{"code":"max","name":"Maximum","value_type":"integer","config":{},"value":15,"plan_value":10,"override_value":15},{"code":"max_admins","name":"Max Admins","value_type":"integer","config":{},"value":5,"plan_value":5,"override_value":null},{"code":"root","name":"Allow root user","value_type":"boolean","config":{},"value":true,"plan_value":true,"override_value":null},{"code":"provider","name":"SSO Provider","value_type":"select","value":"okta","plan_value":"google","override_value":"okta","config":{"select_options":["google","okta"]}}]
7882
+ */
7883
+ privileges: SubscriptionEntitlementPrivilegeObject[];
7884
+ /** @example {"max":15,"provider":"okta"} */
7885
+ overrides: Record<string, any>;
7886
+ }
7887
+ export interface SubscriptionEntitlements {
7888
+ entitlements: SubscriptionEntitlementObject[];
7889
+ }
7890
+ export interface SubscriptionEntitlement {
7891
+ entitlement: SubscriptionEntitlementObject;
7892
+ }
7893
+ export interface SubscriptionChargeOverride {
7894
+ /** Properties of a charge that can be overridden at the subscription level. */
7895
+ charge: ChargeOverridableInput;
7896
+ }
7897
+ export interface SubscriptionFixedChargeOverride {
7898
+ /** Properties of a fixed charge that can be overridden at the subscription level. */
7899
+ fixed_charge: FixedChargeOverridableInput;
7900
+ }
7901
+ export interface TaxesPaginated {
7902
+ taxes: TaxObject[];
7903
+ meta: PaginationMeta;
7904
+ }
7905
+ export interface TaxBaseInput {
7906
+ /**
7907
+ * Name of the tax.
7908
+ * @example "TVA"
7909
+ */
7910
+ name?: string;
7911
+ /**
7912
+ * Unique code used to identify the tax associated with the API request.
7913
+ * @example "french_standard_vat"
7914
+ */
7915
+ code?: string;
7916
+ /**
7917
+ * The percentage rate of the tax
7918
+ * @pattern ^[0-9]+.?[0-9]*$
7919
+ * @example "20.0"
7920
+ */
7921
+ rate?: string;
7922
+ /**
7923
+ * Internal description of the taxe
7924
+ * @example "French standard VAT"
7925
+ */
7926
+ description?: string | null;
7927
+ /**
7928
+ * This field is deprecated and will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.
7929
+ * @deprecated
7930
+ * @example true
7931
+ */
7932
+ applied_to_organization?: boolean;
7933
+ }
7934
+ export interface TaxCreateInput {
7935
+ tax: TaxBaseInput;
7936
+ }
7937
+ export interface Tax {
7938
+ tax: TaxObject;
7939
+ }
7940
+ export interface TaxUpdateInput {
7941
+ tax: TaxBaseInput;
7395
7942
  }
7396
7943
  export interface WalletTransactionCreateInput {
7397
7944
  wallet_transaction: {
@@ -7436,6 +7983,8 @@ export interface WalletTransactionCreateInput {
7436
7983
  * @example false
7437
7984
  */
7438
7985
  ignore_paid_top_up_limits?: boolean;
7986
+ /** Configuration for invoice custom sections to apply to invoices generated by this resource. */
7987
+ invoice_custom_section?: InvoiceCustomSectionInput;
7439
7988
  /** Optional payment method to use for processing the wallet transaction payment. */
7440
7989
  payment_method?: PaymentMethodReference;
7441
7990
  /**
@@ -7458,6 +8007,24 @@ export interface WalletTransactionObject {
7458
8007
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
7459
8008
  */
7460
8009
  lago_wallet_id: string;
8010
+ /**
8011
+ * Unique identifier assigned to the invoice associated with this wallet transaction. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
8012
+ * @format uuid
8013
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
8014
+ */
8015
+ lago_invoice_id: string | null;
8016
+ /**
8017
+ * Unique identifier of the credit note associated with this wallet transaction. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
8018
+ * @format uuid
8019
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
8020
+ */
8021
+ lago_credit_note_id: string | null;
8022
+ /**
8023
+ * Unique identifier of the invoice that was voided and triggered the creation of this inbound wallet transaction. Only present for inbound transactions on traceable wallets that were created as a result of an invoice void.
8024
+ * @format uuid
8025
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
8026
+ */
8027
+ lago_voided_invoice_id: string | null;
7461
8028
  /**
7462
8029
  * The status of the wallet transaction. Possible values are `pending`, `settled` or `failed`.
7463
8030
  * @example "settled"
@@ -7494,29 +8061,45 @@ export interface WalletTransactionObject {
7494
8061
  * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
7495
8062
  * @example false
7496
8063
  */
7497
- invoice_requires_successful_payment?: boolean;
8064
+ invoice_requires_successful_payment: boolean;
7498
8065
  /**
7499
8066
  * This field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.
7500
8067
  * @example [{"key":"example key","value":"example value"},{"key":"another key","value":"another value"}]
7501
8068
  */
7502
- metadata?: {
8069
+ metadata: {
7503
8070
  /** The unique identifier for the attribute. */
7504
8071
  key?: string;
7505
8072
  /** The value associated with the key. */
7506
8073
  value?: string;
7507
8074
  }[];
8075
+ /**
8076
+ * The remaining unconsumed amount of an inbound wallet transaction, expressed in cents. Only present for inbound transactions on traceable wallets. Tracks how much of the original credited amount has not yet been consumed by outbound transactions.
8077
+ * @example 5000
8078
+ */
8079
+ remaining_amount_cents: number | null;
8080
+ /**
8081
+ * The remaining unconsumed amount of an inbound wallet transaction, expressed in credits. Only present for inbound transactions on traceable wallets.
8082
+ * @pattern ^[0-9]+.?[0-9]*$
8083
+ * @example "5.0"
8084
+ */
8085
+ remaining_credit_amount: string | null;
8086
+ /**
8087
+ * The priority of the wallet transaction, used to determine the order in which inbound transactions are consumed. Lower values are consumed first.
8088
+ * @example 50
8089
+ */
8090
+ priority: number;
7508
8091
  /**
7509
8092
  * The date when wallet transaction is settled, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
7510
8093
  * @format date-time
7511
8094
  * @example "2022-04-29T08:59:51Z"
7512
8095
  */
7513
- settled_at?: string | null;
8096
+ settled_at: string | null;
7514
8097
  /**
7515
8098
  * The date when the wallet transaction failed, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
7516
8099
  * @format date-time
7517
8100
  * @example "2022-04-29T08:59:51Z"
7518
8101
  */
7519
- failed_at?: string | null;
8102
+ failed_at: string | null;
7520
8103
  /**
7521
8104
  * The date of the wallet transaction creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
7522
8105
  * @format date-time
@@ -7528,8 +8111,10 @@ export interface WalletTransactionObject {
7528
8111
  * @example "Tokens for models 'high-fidelity-boost'"
7529
8112
  */
7530
8113
  name: string | null;
8114
+ /** The invoice custom sections applied to invoices generated by this wallet transaction. */
8115
+ applied_invoice_custom_sections?: AppliedInvoiceCustomSectionObject[];
7531
8116
  /** The payment method assigned to this wallet transaction for processing the payment. */
7532
- payment_method?: PaymentMethodReference;
8117
+ payment_method: PaymentMethodReference;
7533
8118
  }
7534
8119
  export interface WalletTransactions {
7535
8120
  wallet_transactions: WalletTransactionObject[];
@@ -7564,6 +8149,70 @@ export interface WalletTransactionPaymentUrl {
7564
8149
  payment_url?: string;
7565
8150
  };
7566
8151
  }
8152
+ export interface WalletTransactionConsumptionObject {
8153
+ /**
8154
+ * Unique identifier assigned to the wallet transaction consumption within the Lago application.
8155
+ * @format uuid
8156
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
8157
+ */
8158
+ lago_id: string;
8159
+ /**
8160
+ * The amount consumed from the inbound wallet transaction, expressed in cents.
8161
+ * @example 5000
8162
+ */
8163
+ amount_cents: number;
8164
+ /**
8165
+ * The amount consumed from the inbound wallet transaction, expressed in credits.
8166
+ * @pattern ^[0-9]+.?[0-9]*$
8167
+ * @example "5.0"
8168
+ */
8169
+ credit_amount: string;
8170
+ /**
8171
+ * The date of the consumption record creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
8172
+ * @format date-time
8173
+ * @example "2022-04-29T08:59:51Z"
8174
+ */
8175
+ created_at: string;
8176
+ wallet_transaction: WalletTransactionObject;
8177
+ }
8178
+ export interface WalletTransactionConsumptions {
8179
+ wallet_transaction_consumptions: WalletTransactionConsumptionObject[];
8180
+ }
8181
+ export type WalletTransactionConsumptionsPaginated = WalletTransactionConsumptions & {
8182
+ meta: PaginationMeta;
8183
+ };
8184
+ export interface WalletTransactionFundingObject {
8185
+ /**
8186
+ * Unique identifier assigned to the wallet transaction funding within the Lago application.
8187
+ * @format uuid
8188
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
8189
+ */
8190
+ lago_id: string;
8191
+ /**
8192
+ * The amount funded from the inbound wallet transaction, expressed in cents.
8193
+ * @example 5000
8194
+ */
8195
+ amount_cents: number;
8196
+ /**
8197
+ * The amount funded from the inbound wallet transaction, expressed in credits.
8198
+ * @pattern ^[0-9]+.?[0-9]*$
8199
+ * @example "5.0"
8200
+ */
8201
+ credit_amount: string;
8202
+ /**
8203
+ * The date of the funding record creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
8204
+ * @format date-time
8205
+ * @example "2022-04-29T08:59:51Z"
8206
+ */
8207
+ created_at: string;
8208
+ wallet_transaction: WalletTransactionObject;
8209
+ }
8210
+ export interface WalletTransactionFundings {
8211
+ wallet_transaction_fundings: WalletTransactionFundingObject[];
8212
+ }
8213
+ export type WalletTransactionFundingsPaginated = WalletTransactionFundings & {
8214
+ meta: PaginationMeta;
8215
+ };
7567
8216
  export type WalletTransactionsPaginated = WalletTransactions & {
7568
8217
  meta: PaginationMeta;
7569
8218
  };
@@ -7662,6 +8311,11 @@ export interface TriggeredAlertObject {
7662
8311
  * @example "sub_1234567890"
7663
8312
  */
7664
8313
  external_subscription_id: string;
8314
+ /**
8315
+ * The customer external unique identifier (provided by your own application).
8316
+ * @example "cust_1234567890"
8317
+ */
8318
+ external_customer_id: string;
7665
8319
  /**
7666
8320
  * The code of the billable metric associated with the alert. Only for alerts based on a billable metric.
7667
8321
  * @example "storage_usage"
@@ -8025,6 +8679,8 @@ export type SubscriptionWithThresholdObject = SubscriptionObject & {
8025
8679
  plan: PlanObject;
8026
8680
  customer: CustomerObject;
8027
8681
  usage_threshold: UsageThresholdObject;
8682
+ /** List of usage thresholds applicable to this subscription. */
8683
+ applicable_usage_thresholds?: ApplicableUsageThreshold[];
8028
8684
  };
8029
8685
  export type WalletTransactionObjectExtended = WalletTransactionObject & {
8030
8686
  wallet?: WalletObject;
@@ -8125,8 +8781,8 @@ export declare class HttpClient<SecurityDataType = unknown> {
8125
8781
  }
8126
8782
  /**
8127
8783
  * @title Lago API documentation
8128
- * @version 1.42.0
8129
- * @license AGPLv3
8784
+ * @version 1.45.0
8785
+ * @license AGPLv3 (https://github.com/getlago/lago-openapi/blob/main/LICENSE)
8130
8786
  * @baseUrl https://api.getlago.com/api/v1
8131
8787
  * @externalDocs https://github.com/getlago
8132
8788
  * @contact <tech@getlago.com>
@@ -9388,10 +10044,20 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9388
10044
  */
9389
10045
  "status[]"?: ("pending" | "canceled" | "terminated" | "active")[];
9390
10046
  }, params?: RequestParams) => Promise<HttpResponse<SubscriptionsPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
10047
+ /**
10048
+ * @description This endpoint is used to create a wallet with prepaid credits.
10049
+ *
10050
+ * @tags wallets
10051
+ * @name CreateCustomerWallet
10052
+ * @summary Create a wallet
10053
+ * @request POST:/customers/{external_customer_id}/wallets
10054
+ * @secure
10055
+ */
10056
+ createCustomerWallet: (externalCustomerId: string, data: WalletCreateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
9391
10057
  /**
9392
10058
  * @description This endpoint is used to list all wallets with prepaid credits of a customer
9393
10059
  *
9394
- * @tags customers, wallets
10060
+ * @tags wallets
9395
10061
  * @name FindAllCustomerWallets
9396
10062
  * @summary List all customer's wallets
9397
10063
  * @request GET:/customers/{external_customer_id}/wallets
@@ -9409,6 +10075,136 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9409
10075
  */
9410
10076
  per_page?: number;
9411
10077
  }, params?: RequestParams) => Promise<HttpResponse<WalletsPaginated, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
10078
+ /**
10079
+ * @description This endpoint is used to update an existing wallet with prepaid credits.
10080
+ *
10081
+ * @tags wallets
10082
+ * @name UpdateCustomerWallet
10083
+ * @summary Update a wallet
10084
+ * @request PUT:/customers/{external_customer_id}/wallets/{code}
10085
+ * @secure
10086
+ */
10087
+ updateCustomerWallet: (externalCustomerId: string, code: string, data: WalletUpdateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
10088
+ /**
10089
+ * @description This endpoint is used to retrieve an existing wallet with prepaid credits.
10090
+ *
10091
+ * @tags wallets
10092
+ * @name FindCustomerWallet
10093
+ * @summary Retrieve a wallet
10094
+ * @request GET:/customers/{external_customer_id}/wallets/{code}
10095
+ * @secure
10096
+ */
10097
+ findCustomerWallet: (externalCustomerId: string, code: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
10098
+ /**
10099
+ * @description This endpoint is used to terminate an existing wallet with prepaid credits.
10100
+ *
10101
+ * @tags wallets
10102
+ * @name DestroyCustomerWallet
10103
+ * @summary Terminate a wallet
10104
+ * @request DELETE:/customers/{external_customer_id}/wallets/{code}
10105
+ * @secure
10106
+ */
10107
+ destroyCustomerWallet: (externalCustomerId: string, code: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
10108
+ /**
10109
+ * @description This endpoint replaces all existing metadata on a wallet with the provided key-value pairs. Any existing metadata keys not included in the request will be removed.
10110
+ *
10111
+ * @tags wallets
10112
+ * @name ReplaceCustomerWalletMetadata
10113
+ * @summary Replace wallet metadata
10114
+ * @request POST:/customers/{external_customer_id}/wallets/{wallet_code}/metadata
10115
+ * @secure
10116
+ */
10117
+ replaceCustomerWalletMetadata: (externalCustomerId: string, walletCode: string, data: WalletMetadataResponse, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
10118
+ /**
10119
+ * @description This endpoint merges the provided metadata with existing metadata on the wallet. Existing keys not in the request are preserved. New keys are added, existing keys are updated.
10120
+ *
10121
+ * @tags wallets
10122
+ * @name MergeCustomerWalletMetadata
10123
+ * @summary Merge wallet metadata
10124
+ * @request PATCH:/customers/{external_customer_id}/wallets/{wallet_code}/metadata
10125
+ * @secure
10126
+ */
10127
+ mergeCustomerWalletMetadata: (externalCustomerId: string, walletCode: string, data: WalletMetadataResponse, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
10128
+ /**
10129
+ * @description This endpoint removes all metadata from a wallet.
10130
+ *
10131
+ * @tags wallets
10132
+ * @name DeleteAllCustomerWalletMetadata
10133
+ * @summary Delete all wallet metadata
10134
+ * @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/metadata
10135
+ * @secure
10136
+ */
10137
+ deleteAllCustomerWalletMetadata: (externalCustomerId: string, walletCode: string, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
10138
+ /**
10139
+ * @description This endpoint removes a single metadata key from a wallet.
10140
+ *
10141
+ * @tags wallets
10142
+ * @name DeleteCustomerWalletMetadataKey
10143
+ * @summary Delete a metadata key
10144
+ * @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/metadata/{key}
10145
+ * @secure
10146
+ */
10147
+ deleteCustomerWalletMetadataKey: (externalCustomerId: string, walletCode: string, key: string, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
10148
+ /**
10149
+ * @description This endpoint enables the retrieval of all alerts for a wallet.
10150
+ *
10151
+ * @tags wallets
10152
+ * @name GetCustomerWalletAlerts
10153
+ * @summary List wallet alerts
10154
+ * @request GET:/customers/{external_customer_id}/wallets/{wallet_code}/alerts
10155
+ * @secure
10156
+ */
10157
+ getCustomerWalletAlerts: (externalCustomerId: string, walletCode: string, params?: RequestParams) => Promise<HttpResponse<Alerts, ApiErrorUnauthorized | ApiErrorNotFound>>;
10158
+ /**
10159
+ * @description This endpoint allows you to create new alerts for a wallet. Send a single alert object wrapped in `alert` key to create one alert, or an array of alert objects wrapped in `alerts` key to create multiple alerts atomically.
10160
+ *
10161
+ * @tags wallets
10162
+ * @name CreateCustomerWalletAlert
10163
+ * @summary Create wallet alert(s)
10164
+ * @request POST:/customers/{external_customer_id}/wallets/{wallet_code}/alerts
10165
+ * @secure
10166
+ */
10167
+ createCustomerWalletAlert: (externalCustomerId: string, walletCode: string, data: WalletAlertCreateInput | WalletAlertBatchCreateInput, params?: RequestParams) => Promise<HttpResponse<Alerts | Alert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
10168
+ /**
10169
+ * @description This endpoint allows you to delete all alerts for a wallet.
10170
+ *
10171
+ * @tags wallets
10172
+ * @name DeleteAllCustomerWalletAlerts
10173
+ * @summary Delete all wallet alerts
10174
+ * @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/alerts
10175
+ * @secure
10176
+ */
10177
+ deleteAllCustomerWalletAlerts: (externalCustomerId: string, walletCode: string, params?: RequestParams) => Promise<HttpResponse<void, ApiErrorUnauthorized | ApiErrorNotFound>>;
10178
+ /**
10179
+ * @description This endpoint enables the retrieval of a specific alert for a wallet.
10180
+ *
10181
+ * @tags wallets
10182
+ * @name GetCustomerWalletAlert
10183
+ * @summary Retrieve a wallet alert
10184
+ * @request GET:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
10185
+ * @secure
10186
+ */
10187
+ getCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorNotFound>>;
10188
+ /**
10189
+ * @description This endpoint allows you to update an existing alert for a wallet.
10190
+ *
10191
+ * @tags wallets
10192
+ * @name UpdateCustomerWalletAlert
10193
+ * @summary Update a wallet alert
10194
+ * @request PUT:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
10195
+ * @secure
10196
+ */
10197
+ updateCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, data: WalletAlertUpdateInput, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
10198
+ /**
10199
+ * @description This endpoint allows you to delete an existing alert for a wallet.
10200
+ *
10201
+ * @tags wallets
10202
+ * @name DeleteCustomerWalletAlert
10203
+ * @summary Delete a wallet alert
10204
+ * @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
10205
+ * @secure
10206
+ */
10207
+ deleteCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorNotFound>>;
9412
10208
  /**
9413
10209
  * @description This endpoint enables the retrieval of the usage-based billing data for a customer within the current period.
9414
10210
  *
@@ -9430,6 +10226,28 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9430
10226
  * @example true
9431
10227
  */
9432
10228
  apply_taxes?: boolean;
10229
+ /**
10230
+ * Filter usage to a specific charge by its Lago ID (UUID).
10231
+ * @format uuid
10232
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
10233
+ */
10234
+ filter_by_charge_id?: string;
10235
+ /**
10236
+ * Filter usage to a specific charge by its code.
10237
+ * @example "storage"
10238
+ */
10239
+ filter_by_charge_code?: string;
10240
+ /**
10241
+ * Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. `filter_by_group[cloud]=aws`.
10242
+ * @example {"cloud":"aws"}
10243
+ */
10244
+ filter_by_group?: Record<string, string>;
10245
+ /**
10246
+ * When `true`, returns usage since subscription start instead of the current billing period. Requires either `filter_by_charge_id`, `filter_by_charge_code`, or `filter_by_group` to be set.
10247
+ * @default false
10248
+ * @example true
10249
+ */
10250
+ full_usage?: boolean;
9433
10251
  }, params?: RequestParams) => Promise<HttpResponse<CustomerUsage, ApiErrorUnauthorized | ApiErrorNotFound>>;
9434
10252
  /**
9435
10253
  * @description This endpoint enables the retrieval of the usage-based billing data for a customer within the current period. It also returns the projected usage for the current period based on the current usage.
@@ -10238,85 +11056,268 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10238
11056
  */
10239
11057
  findAllEntitlements: (code: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlements, ApiErrorUnauthorized | ApiErrorNotFound>>;
10240
11058
  /**
10241
- * @description This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.
11059
+ * @description This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.
11060
+ *
11061
+ * @tags entitlements
11062
+ * @name UpdateEntitlement
11063
+ * @summary Partial update of an entitlement
11064
+ * @request PATCH:/plans/{code}/entitlements
11065
+ * @secure
11066
+ */
11067
+ updateEntitlement: (code: string, data: EntitlementUpdateInput, params?: RequestParams) => Promise<HttpResponse<PlanEntitlements, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
11068
+ /**
11069
+ * @description This endpoint retrieves a specific entitlement for a plan.
11070
+ *
11071
+ * @tags entitlements
11072
+ * @name FindEntitlement
11073
+ * @summary Retrieve an entitlement
11074
+ * @request GET:/plans/{code}/entitlements/{feature_code}
11075
+ * @secure
11076
+ */
11077
+ findEntitlement: (code: string, featureCode: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
11078
+ /**
11079
+ * @description This endpoint deletes an existing entitlement by removing the feature from the plan.
11080
+ *
11081
+ * @tags entitlements
11082
+ * @name DestroyEntitlement
11083
+ * @summary Delete an entitlement
11084
+ * @request DELETE:/plans/{code}/entitlements/{feature_code}
11085
+ * @secure
11086
+ */
11087
+ destroyEntitlement: (code: string, featureCode: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
11088
+ /**
11089
+ * @description This endpoint removes a specific privilege and its value from an entitlement. The privilege remains untouched on the original feature.
11090
+ *
11091
+ * @tags entitlements
11092
+ * @name RemoveEntitlementPrivilege
11093
+ * @summary Remove a privilege from an entitlement
11094
+ * @request DELETE:/plans/{code}/entitlements/{feature_code}/privileges/{privilege_code}
11095
+ * @secure
11096
+ */
11097
+ removeEntitlementPrivilege: (code: string, featureCode: string, privilegeCode: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
11098
+ /**
11099
+ * @description This endpoint replaces all existing metadata on a plan with the provided key-value pairs. Any existing metadata keys not included in the request will be removed.
11100
+ *
11101
+ * @tags plans
11102
+ * @name ReplacePlanMetadata
11103
+ * @summary Replace plan metadata
11104
+ * @request POST:/plans/{code}/metadata
11105
+ * @secure
11106
+ */
11107
+ replacePlanMetadata: (code: string, data: PlanMetadataResponse, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
11108
+ /**
11109
+ * @description This endpoint merges the provided metadata with existing metadata on the plan. Existing keys not in the request are preserved. New keys are added, existing keys are updated.
11110
+ *
11111
+ * @tags plans
11112
+ * @name MergePlanMetadata
11113
+ * @summary Merge plan metadata
11114
+ * @request PATCH:/plans/{code}/metadata
11115
+ * @secure
11116
+ */
11117
+ mergePlanMetadata: (code: string, data: PlanMetadataResponse, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
11118
+ /**
11119
+ * @description This endpoint removes all metadata from a plan.
11120
+ *
11121
+ * @tags plans
11122
+ * @name DeleteAllPlanMetadata
11123
+ * @summary Delete all plan metadata
11124
+ * @request DELETE:/plans/{code}/metadata
11125
+ * @secure
11126
+ */
11127
+ deleteAllPlanMetadata: (code: string, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
11128
+ /**
11129
+ * @description This endpoint removes a single metadata key from a plan.
11130
+ *
11131
+ * @tags plans
11132
+ * @name DeletePlanMetadataKey
11133
+ * @summary Delete a metadata key
11134
+ * @request DELETE:/plans/{code}/metadata/{key}
11135
+ * @secure
11136
+ */
11137
+ deletePlanMetadataKey: (code: string, key: string, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
11138
+ /**
11139
+ * @description This endpoint creates a new charge for a specific plan.
11140
+ *
11141
+ * @tags plans
11142
+ * @name CreatePlanCharge
11143
+ * @summary Create a charge
11144
+ * @request POST:/plans/{code}/charges
11145
+ * @secure
11146
+ */
11147
+ createPlanCharge: (code: string, data: ChargeCreateInput, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
11148
+ /**
11149
+ * @description This endpoint retrieves all charges for a specific plan.
11150
+ *
11151
+ * @tags plans
11152
+ * @name FindAllPlanCharges
11153
+ * @summary List all charges for a plan
11154
+ * @request GET:/plans/{code}/charges
11155
+ * @secure
11156
+ */
11157
+ findAllPlanCharges: (code: string, query?: {
11158
+ /**
11159
+ * Page number.
11160
+ * @example 1
11161
+ */
11162
+ page?: number;
11163
+ /**
11164
+ * Number of records per page.
11165
+ * @example 20
11166
+ */
11167
+ per_page?: number;
11168
+ }, params?: RequestParams) => Promise<HttpResponse<ChargesPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
11169
+ /**
11170
+ * @description This endpoint retrieves a specific charge for a plan.
11171
+ *
11172
+ * @tags plans
11173
+ * @name FindPlanCharge
11174
+ * @summary Retrieve a charge
11175
+ * @request GET:/plans/{code}/charges/{charge_code}
11176
+ * @secure
11177
+ */
11178
+ findPlanCharge: (code: string, chargeCode: string, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorNotFound>>;
11179
+ /**
11180
+ * @description This endpoint updates a specific charge for a plan.
11181
+ *
11182
+ * @tags plans
11183
+ * @name UpdatePlanCharge
11184
+ * @summary Update a charge
11185
+ * @request PUT:/plans/{code}/charges/{charge_code}
11186
+ * @secure
11187
+ */
11188
+ updatePlanCharge: (code: string, chargeCode: string, data: ChargeUpdateInput, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
11189
+ /**
11190
+ * @description This endpoint deletes a specific charge from a plan.
11191
+ *
11192
+ * @tags plans
11193
+ * @name DestroyPlanCharge
11194
+ * @summary Delete a charge
11195
+ * @request DELETE:/plans/{code}/charges/{charge_code}
11196
+ * @secure
11197
+ */
11198
+ destroyPlanCharge: (code: string, chargeCode: string, data: ChargeDeleteInput, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorNotFound>>;
11199
+ /**
11200
+ * @description This endpoint creates a new filter for a specific charge.
11201
+ *
11202
+ * @tags plans
11203
+ * @name CreatePlanChargeFilter
11204
+ * @summary Create a charge filter
11205
+ * @request POST:/plans/{code}/charges/{charge_code}/filters
11206
+ * @secure
11207
+ */
11208
+ createPlanChargeFilter: (code: string, chargeCode: string, data: ChargeFilterCreateInput, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
11209
+ /**
11210
+ * @description This endpoint retrieves all filters for a specific charge.
11211
+ *
11212
+ * @tags plans
11213
+ * @name FindAllPlanChargeFilters
11214
+ * @summary List all filters for a charge
11215
+ * @request GET:/plans/{code}/charges/{charge_code}/filters
11216
+ * @secure
11217
+ */
11218
+ findAllPlanChargeFilters: (code: string, chargeCode: string, query?: {
11219
+ /**
11220
+ * Page number.
11221
+ * @example 1
11222
+ */
11223
+ page?: number;
11224
+ /**
11225
+ * Number of records per page.
11226
+ * @example 20
11227
+ */
11228
+ per_page?: number;
11229
+ }, params?: RequestParams) => Promise<HttpResponse<ChargeFiltersPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
11230
+ /**
11231
+ * @description This endpoint retrieves a specific filter for a charge.
10242
11232
  *
10243
- * @tags entitlements
10244
- * @name UpdateEntitlement
10245
- * @summary Partial update of an entitlement
10246
- * @request PATCH:/plans/{code}/entitlements
11233
+ * @tags plans
11234
+ * @name FindPlanChargeFilter
11235
+ * @summary Retrieve a charge filter
11236
+ * @request GET:/plans/{code}/charges/{charge_code}/filters/{filter_id}
10247
11237
  * @secure
10248
11238
  */
10249
- updateEntitlement: (code: string, data: EntitlementUpdateInput, params?: RequestParams) => Promise<HttpResponse<PlanEntitlements, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
11239
+ findPlanChargeFilter: (code: string, chargeCode: string, filterId: string, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
10250
11240
  /**
10251
- * @description This endpoint retrieves a specific entitlement for a plan.
11241
+ * @description This endpoint updates a specific filter for a charge.
10252
11242
  *
10253
- * @tags entitlements
10254
- * @name FindEntitlement
10255
- * @summary Retrieve an entitlement
10256
- * @request GET:/plans/{code}/entitlements/{feature_code}
11243
+ * @tags plans
11244
+ * @name UpdatePlanChargeFilter
11245
+ * @summary Update a charge filter
11246
+ * @request PUT:/plans/{code}/charges/{charge_code}/filters/{filter_id}
10257
11247
  * @secure
10258
11248
  */
10259
- findEntitlement: (code: string, featureCode: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
11249
+ updatePlanChargeFilter: (code: string, chargeCode: string, filterId: string, data: ChargeFilterUpdateInput, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
10260
11250
  /**
10261
- * @description This endpoint deletes an existing entitlement by removing the feature from the plan.
11251
+ * @description This endpoint deletes a specific filter from a charge.
10262
11252
  *
10263
- * @tags entitlements
10264
- * @name DestroyEntitlement
10265
- * @summary Delete an entitlement
10266
- * @request DELETE:/plans/{code}/entitlements/{feature_code}
11253
+ * @tags plans
11254
+ * @name DestroyPlanChargeFilter
11255
+ * @summary Delete a charge filter
11256
+ * @request DELETE:/plans/{code}/charges/{charge_code}/filters/{filter_id}
10267
11257
  * @secure
10268
11258
  */
10269
- destroyEntitlement: (code: string, featureCode: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
11259
+ destroyPlanChargeFilter: (code: string, chargeCode: string, filterId: string, data: ChargeFilterDeleteInput, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
10270
11260
  /**
10271
- * @description This endpoint removes a specific privilege and its value from an entitlement. The privilege remains untouched on the original feature.
11261
+ * @description This endpoint creates a new fixed charge for a specific plan.
10272
11262
  *
10273
- * @tags entitlements
10274
- * @name RemoveEntitlementPrivilege
10275
- * @summary Remove a privilege from an entitlement
10276
- * @request DELETE:/plans/{code}/entitlements/{feature_code}/privileges/{privilege_code}
11263
+ * @tags plans
11264
+ * @name CreatePlanFixedCharge
11265
+ * @summary Create a fixed charge
11266
+ * @request POST:/plans/{code}/fixed_charges
10277
11267
  * @secure
10278
11268
  */
10279
- removeEntitlementPrivilege: (code: string, featureCode: string, privilegeCode: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
11269
+ createPlanFixedCharge: (code: string, data: FixedChargeCreateInput, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
10280
11270
  /**
10281
- * @description This endpoint replaces all existing metadata on a plan with the provided key-value pairs. Any existing metadata keys not included in the request will be removed.
11271
+ * @description This endpoint retrieves all fixed charges for a specific plan.
10282
11272
  *
10283
11273
  * @tags plans
10284
- * @name ReplacePlanMetadata
10285
- * @summary Replace plan metadata
10286
- * @request POST:/plans/{code}/metadata
11274
+ * @name FindAllPlanFixedCharges
11275
+ * @summary List all fixed charges for a plan
11276
+ * @request GET:/plans/{code}/fixed_charges
10287
11277
  * @secure
10288
11278
  */
10289
- replacePlanMetadata: (code: string, data: PlanMetadataResponse, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
11279
+ findAllPlanFixedCharges: (code: string, query?: {
11280
+ /**
11281
+ * Page number.
11282
+ * @example 1
11283
+ */
11284
+ page?: number;
11285
+ /**
11286
+ * Number of records per page.
11287
+ * @example 20
11288
+ */
11289
+ per_page?: number;
11290
+ }, params?: RequestParams) => Promise<HttpResponse<FixedChargesPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
10290
11291
  /**
10291
- * @description This endpoint merges the provided metadata with existing metadata on the plan. Existing keys not in the request are preserved. New keys are added, existing keys are updated.
11292
+ * @description This endpoint retrieves a specific fixed charge for a plan.
10292
11293
  *
10293
11294
  * @tags plans
10294
- * @name MergePlanMetadata
10295
- * @summary Merge plan metadata
10296
- * @request PATCH:/plans/{code}/metadata
11295
+ * @name FindPlanFixedCharge
11296
+ * @summary Retrieve a fixed charge
11297
+ * @request GET:/plans/{code}/fixed_charges/{fixed_charge_code}
10297
11298
  * @secure
10298
11299
  */
10299
- mergePlanMetadata: (code: string, data: PlanMetadataResponse, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
11300
+ findPlanFixedCharge: (code: string, fixedChargeCode: string, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorNotFound>>;
10300
11301
  /**
10301
- * @description This endpoint removes all metadata from a plan.
11302
+ * @description This endpoint updates a specific fixed charge for a plan.
10302
11303
  *
10303
11304
  * @tags plans
10304
- * @name DeleteAllPlanMetadata
10305
- * @summary Delete all plan metadata
10306
- * @request DELETE:/plans/{code}/metadata
11305
+ * @name UpdatePlanFixedCharge
11306
+ * @summary Update a fixed charge
11307
+ * @request PUT:/plans/{code}/fixed_charges/{fixed_charge_code}
10307
11308
  * @secure
10308
11309
  */
10309
- deleteAllPlanMetadata: (code: string, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
11310
+ updatePlanFixedCharge: (code: string, fixedChargeCode: string, data: FixedChargeUpdateInput, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
10310
11311
  /**
10311
- * @description This endpoint removes a single metadata key from a plan.
11312
+ * @description This endpoint deletes a specific fixed charge from a plan.
10312
11313
  *
10313
11314
  * @tags plans
10314
- * @name DeletePlanMetadataKey
10315
- * @summary Delete a metadata key
10316
- * @request DELETE:/plans/{code}/metadata/{key}
11315
+ * @name DestroyPlanFixedCharge
11316
+ * @summary Delete a fixed charge
11317
+ * @request DELETE:/plans/{code}/fixed_charges/{fixed_charge_code}
10317
11318
  * @secure
10318
11319
  */
10319
- deletePlanMetadataKey: (code: string, key: string, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
11320
+ destroyPlanFixedCharge: (code: string, fixedChargeCode: string, data: FixedChargeDeleteInput, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorNotFound>>;
10320
11321
  };
10321
11322
  subscriptions: {
10322
11323
  /**
@@ -10328,7 +11329,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10328
11329
  * @request POST:/subscriptions
10329
11330
  * @secure
10330
11331
  */
10331
- createSubscription: (data: SubscriptionCreateInput, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
11332
+ createSubscription: (data: SubscriptionCreateInput, params?: RequestParams) => Promise<HttpResponse<SubscriptionExtended, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
10332
11333
  /**
10333
11334
  * @description This endpoint retrieves all active subscriptions.
10334
11335
  *
@@ -10383,7 +11384,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10383
11384
  * @example "active"
10384
11385
  */
10385
11386
  status?: "active" | "terminated" | "pending" | "canceled";
10386
- }, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorUnauthorized | ApiErrorNotFound>>;
11387
+ }, params?: RequestParams) => Promise<HttpResponse<SubscriptionExtended, ApiErrorUnauthorized | ApiErrorNotFound>>;
10387
11388
  /**
10388
11389
  * @description This endpoint allows you to update a subscription.
10389
11390
  *
@@ -10467,7 +11468,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10467
11468
  * @request GET:/subscriptions/{external_id}/alerts
10468
11469
  * @secure
10469
11470
  */
10470
- getSubscriptionAlerts: (externalId: string, params?: RequestParams) => Promise<HttpResponse<Alerts, ApiErrorUnauthorized | ApiErrorNotFound>>;
11471
+ getSubscriptionAlerts: (externalId: string, query?: {
11472
+ /**
11473
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11474
+ * @default "active"
11475
+ * @example "active"
11476
+ */
11477
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11478
+ }, params?: RequestParams) => Promise<HttpResponse<Alerts, ApiErrorUnauthorized | ApiErrorNotFound>>;
10471
11479
  /**
10472
11480
  * @description This endpoint allows you to create alerts for a subscription. Send a single alert object wrapped in `alert` key to create one alert, or an array of alert objects wrapped in `alerts` key to create multiple alerts atomically.
10473
11481
  *
@@ -10477,7 +11485,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10477
11485
  * @request POST:/subscriptions/{external_id}/alerts
10478
11486
  * @secure
10479
11487
  */
10480
- createSubscriptionAlert: (externalId: string, data: AlertCreateInput | AlertBatchCreateInput, params?: RequestParams) => Promise<HttpResponse<Alerts | Alert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
11488
+ createSubscriptionAlert: (externalId: string, data: AlertCreateInput | AlertBatchCreateInput, query?: {
11489
+ /**
11490
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11491
+ * @default "active"
11492
+ * @example "active"
11493
+ */
11494
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11495
+ }, params?: RequestParams) => Promise<HttpResponse<Alerts | Alert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
10481
11496
  /**
10482
11497
  * @description This endpoint allows you to delete all alerts for a subscription.
10483
11498
  *
@@ -10487,7 +11502,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10487
11502
  * @request DELETE:/subscriptions/{external_id}/alerts
10488
11503
  * @secure
10489
11504
  */
10490
- deleteAllSubscriptionAlerts: (externalId: string, params?: RequestParams) => Promise<HttpResponse<void, ApiErrorUnauthorized | ApiErrorNotFound>>;
11505
+ deleteAllSubscriptionAlerts: (externalId: string, query?: {
11506
+ /**
11507
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11508
+ * @default "active"
11509
+ * @example "active"
11510
+ */
11511
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11512
+ }, params?: RequestParams) => Promise<HttpResponse<void, ApiErrorUnauthorized | ApiErrorNotFound>>;
10491
11513
  /**
10492
11514
  * @description This endpoint enables the retrieval of a specific alert for a subscription.
10493
11515
  *
@@ -10497,7 +11519,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10497
11519
  * @request GET:/subscriptions/{external_id}/alerts/{code}
10498
11520
  * @secure
10499
11521
  */
10500
- getSubscriptionAlert: (externalId: string, code: string, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorNotFound>>;
11522
+ getSubscriptionAlert: (externalId: string, code: string, query?: {
11523
+ /**
11524
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11525
+ * @default "active"
11526
+ * @example "active"
11527
+ */
11528
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11529
+ }, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorNotFound>>;
10501
11530
  /**
10502
11531
  * @description This endpoint allows you to update an existing alert for a subscription.
10503
11532
  *
@@ -10507,7 +11536,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10507
11536
  * @request PUT:/subscriptions/{external_id}/alerts/{code}
10508
11537
  * @secure
10509
11538
  */
10510
- updateSubscriptionAlert: (externalId: string, code: string, data: AlertUpdateInput, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
11539
+ updateSubscriptionAlert: (externalId: string, code: string, data: AlertUpdateInput, query?: {
11540
+ /**
11541
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11542
+ * @default "active"
11543
+ * @example "active"
11544
+ */
11545
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11546
+ }, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
10511
11547
  /**
10512
11548
  * @description This endpoint allows you to delete an existing alert for a subscription.
10513
11549
  *
@@ -10517,7 +11553,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10517
11553
  * @request DELETE:/subscriptions/{external_id}/alerts/{code}
10518
11554
  * @secure
10519
11555
  */
10520
- deleteSubscriptionAlert: (externalId: string, code: string, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorNotFound>>;
11556
+ deleteSubscriptionAlert: (externalId: string, code: string, query?: {
11557
+ /**
11558
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11559
+ * @default "active"
11560
+ * @example "active"
11561
+ */
11562
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11563
+ }, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorNotFound>>;
10521
11564
  /**
10522
11565
  * @description This endpoint retrieves all entitlements for a specific subscription, including both plan entitlements and any subscription-specific overrides.
10523
11566
  *
@@ -10527,7 +11570,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10527
11570
  * @request GET:/subscriptions/{external_id}/entitlements
10528
11571
  * @secure
10529
11572
  */
10530
- findAllSubscriptionEntitlements: (externalId: string, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlements, ApiErrorUnauthorized | ApiErrorNotFound>>;
11573
+ findAllSubscriptionEntitlements: (externalId: string, query?: {
11574
+ /**
11575
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11576
+ * @default "active"
11577
+ * @example "active"
11578
+ */
11579
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11580
+ }, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlements, ApiErrorUnauthorized | ApiErrorNotFound>>;
10531
11581
  /**
10532
11582
  * @description This accepts a list of entitlements to update. If the feature isn't part of the subscription yet, it's added with all the privileges from the payload. If the feature is already part of the subscription (via plan or via override), the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.
10533
11583
  *
@@ -10537,7 +11587,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10537
11587
  * @request PATCH:/subscriptions/{external_id}/entitlements
10538
11588
  * @secure
10539
11589
  */
10540
- updateSubscriptionEntitlements: (externalId: string, data: EntitlementUpdateInput, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlements, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
11590
+ updateSubscriptionEntitlements: (externalId: string, data: EntitlementUpdateInput, query?: {
11591
+ /**
11592
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11593
+ * @default "active"
11594
+ * @example "active"
11595
+ */
11596
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11597
+ }, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlements, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
10541
11598
  /**
10542
11599
  * @description This endpoint removes a specific feature entitlement from a subscription. The entitlement remains available from the plan.
10543
11600
  *
@@ -10547,7 +11604,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10547
11604
  * @request DELETE:/subscriptions/{external_id}/entitlements/{feature_code}
10548
11605
  * @secure
10549
11606
  */
10550
- destroySubscriptionEntitlement: (externalId: string, featureCode: string, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
11607
+ destroySubscriptionEntitlement: (externalId: string, featureCode: string, query?: {
11608
+ /**
11609
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11610
+ * @default "active"
11611
+ * @example "active"
11612
+ */
11613
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11614
+ }, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
10551
11615
  /**
10552
11616
  * @description This endpoint removes a specific privilege from a subscription entitlement. The privilege entitlement remains available from the plan.
10553
11617
  *
@@ -10557,17 +11621,231 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10557
11621
  * @request DELETE:/subscriptions/{external_id}/entitlements/{feature_code}/privileges/{privilege_code}
10558
11622
  * @secure
10559
11623
  */
10560
- destroySubscriptionEntitlementPrivilege: (externalId: string, featureCode: string, privilegeCode: string, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlement, ApiErrorUnauthorized | ApiErrorBadRequest | ApiErrorNotFound>>;
11624
+ destroySubscriptionEntitlementPrivilege: (externalId: string, featureCode: string, privilegeCode: string, query?: {
11625
+ /**
11626
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11627
+ * @default "active"
11628
+ * @example "active"
11629
+ */
11630
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11631
+ }, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlement, ApiErrorUnauthorized | ApiErrorBadRequest | ApiErrorNotFound>>;
10561
11632
  /**
10562
- * @description This endpoint retrieves all fixed charges for a specific subscription.
11633
+ * @description This endpoint retrieves all effective fixed charges for a specific subscription. If the subscription has plan overrides with fixed charge overrides, the overridden fixed charges are returned.
10563
11634
  *
10564
11635
  * @tags subscriptions
10565
11636
  * @name FindAllSubscriptionFixedCharges
10566
- * @summary List subscription fixed charges
11637
+ * @summary List all fixed charges for a subscription
10567
11638
  * @request GET:/subscriptions/{external_id}/fixed_charges
10568
11639
  * @secure
10569
11640
  */
10570
- findAllSubscriptionFixedCharges: (externalId: string, params?: RequestParams) => Promise<HttpResponse<FixedCharges, ApiErrorUnauthorized | ApiErrorNotFound>>;
11641
+ findAllSubscriptionFixedCharges: (externalId: string, query?: {
11642
+ /**
11643
+ * Page number.
11644
+ * @example 1
11645
+ */
11646
+ page?: number;
11647
+ /**
11648
+ * Number of records per page.
11649
+ * @example 20
11650
+ */
11651
+ per_page?: number;
11652
+ /**
11653
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11654
+ * @default "active"
11655
+ * @example "active"
11656
+ */
11657
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11658
+ }, params?: RequestParams) => Promise<HttpResponse<FixedChargesPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
11659
+ /**
11660
+ * @description This endpoint retrieves all effective charges for a specific subscription. If the subscription has plan overrides with charge overrides, the overridden charges are returned.
11661
+ *
11662
+ * @tags subscriptions
11663
+ * @name FindAllSubscriptionCharges
11664
+ * @summary List all charges for a subscription
11665
+ * @request GET:/subscriptions/{external_id}/charges
11666
+ * @secure
11667
+ */
11668
+ findAllSubscriptionCharges: (externalId: string, query?: {
11669
+ /**
11670
+ * Page number.
11671
+ * @example 1
11672
+ */
11673
+ page?: number;
11674
+ /**
11675
+ * Number of records per page.
11676
+ * @example 20
11677
+ */
11678
+ per_page?: number;
11679
+ /**
11680
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11681
+ * @default "active"
11682
+ * @example "active"
11683
+ */
11684
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11685
+ }, params?: RequestParams) => Promise<HttpResponse<ChargesPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
11686
+ /**
11687
+ * @description This endpoint retrieves a specific effective charge for a subscription. If the subscription has a plan override with a charge override, the overridden charge is returned.
11688
+ *
11689
+ * @tags subscriptions
11690
+ * @name FindSubscriptionCharge
11691
+ * @summary Retrieve a charge for a subscription
11692
+ * @request GET:/subscriptions/{external_id}/charges/{charge_code}
11693
+ * @secure
11694
+ */
11695
+ findSubscriptionCharge: (externalId: string, chargeCode: string, query?: {
11696
+ /**
11697
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11698
+ * @default "active"
11699
+ * @example "active"
11700
+ */
11701
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11702
+ }, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorNotFound>>;
11703
+ /**
11704
+ * @description This endpoint creates or updates a charge override for a specific subscription. If the subscription does not have a plan override yet, one will be created automatically. The charge override allows customizing specific charge properties (invoice_display_name, min_amount_cents, properties, filters, taxes, applied_pricing_unit) without affecting the original plan charge. This is a premium feature.
11705
+ *
11706
+ * @tags subscriptions
11707
+ * @name OverrideSubscriptionCharge
11708
+ * @summary Override a charge for a subscription
11709
+ * @request PUT:/subscriptions/{external_id}/charges/{charge_code}
11710
+ * @secure
11711
+ */
11712
+ overrideSubscriptionCharge: (externalId: string, chargeCode: string, data: SubscriptionChargeOverride, query?: {
11713
+ /**
11714
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11715
+ * @default "active"
11716
+ * @example "active"
11717
+ */
11718
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11719
+ }, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
11720
+ /**
11721
+ * @description This endpoint creates a new filter for a specific charge on a subscription.
11722
+ *
11723
+ * @tags subscriptions
11724
+ * @name CreateSubscriptionChargeFilter
11725
+ * @summary Create a charge filter
11726
+ * @request POST:/subscriptions/{external_id}/charges/{charge_code}/filters
11727
+ * @secure
11728
+ */
11729
+ createSubscriptionChargeFilter: (externalId: string, chargeCode: string, data: ChargeFilterCreateInput, query?: {
11730
+ /**
11731
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11732
+ * @default "active"
11733
+ * @example "active"
11734
+ */
11735
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11736
+ }, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
11737
+ /**
11738
+ * @description This endpoint retrieves all filters for a specific charge on a subscription.
11739
+ *
11740
+ * @tags subscriptions
11741
+ * @name FindAllSubscriptionChargeFilters
11742
+ * @summary List all filters for a charge
11743
+ * @request GET:/subscriptions/{external_id}/charges/{charge_code}/filters
11744
+ * @secure
11745
+ */
11746
+ findAllSubscriptionChargeFilters: (externalId: string, chargeCode: string, query?: {
11747
+ /**
11748
+ * Page number.
11749
+ * @example 1
11750
+ */
11751
+ page?: number;
11752
+ /**
11753
+ * Number of records per page.
11754
+ * @example 20
11755
+ */
11756
+ per_page?: number;
11757
+ /**
11758
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11759
+ * @default "active"
11760
+ * @example "active"
11761
+ */
11762
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11763
+ }, params?: RequestParams) => Promise<HttpResponse<ChargeFiltersPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
11764
+ /**
11765
+ * @description This endpoint retrieves a specific filter for a charge on a subscription.
11766
+ *
11767
+ * @tags subscriptions
11768
+ * @name FindSubscriptionChargeFilter
11769
+ * @summary Retrieve a charge filter
11770
+ * @request GET:/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}
11771
+ * @secure
11772
+ */
11773
+ findSubscriptionChargeFilter: (externalId: string, chargeCode: string, filterId: string, query?: {
11774
+ /**
11775
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11776
+ * @default "active"
11777
+ * @example "active"
11778
+ */
11779
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11780
+ }, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
11781
+ /**
11782
+ * @description This endpoint updates a specific filter for a charge on a subscription.
11783
+ *
11784
+ * @tags subscriptions
11785
+ * @name UpdateSubscriptionChargeFilter
11786
+ * @summary Update a charge filter
11787
+ * @request PUT:/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}
11788
+ * @secure
11789
+ */
11790
+ updateSubscriptionChargeFilter: (externalId: string, chargeCode: string, filterId: string, data: ChargeFilterUpdateInput, query?: {
11791
+ /**
11792
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11793
+ * @default "active"
11794
+ * @example "active"
11795
+ */
11796
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11797
+ }, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
11798
+ /**
11799
+ * @description This endpoint deletes a specific filter from a charge on a subscription.
11800
+ *
11801
+ * @tags subscriptions
11802
+ * @name DestroySubscriptionChargeFilter
11803
+ * @summary Delete a charge filter
11804
+ * @request DELETE:/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}
11805
+ * @secure
11806
+ */
11807
+ destroySubscriptionChargeFilter: (externalId: string, chargeCode: string, filterId: string, query?: {
11808
+ /**
11809
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11810
+ * @default "active"
11811
+ * @example "active"
11812
+ */
11813
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11814
+ }, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
11815
+ /**
11816
+ * @description This endpoint retrieves a specific effective fixed charge for a subscription. If the subscription has a plan override with a fixed charge override, the overridden fixed charge is returned.
11817
+ *
11818
+ * @tags subscriptions
11819
+ * @name FindSubscriptionFixedCharge
11820
+ * @summary Retrieve a fixed charge for a subscription
11821
+ * @request GET:/subscriptions/{external_id}/fixed_charges/{fixed_charge_code}
11822
+ * @secure
11823
+ */
11824
+ findSubscriptionFixedCharge: (externalId: string, fixedChargeCode: string, query?: {
11825
+ /**
11826
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11827
+ * @default "active"
11828
+ * @example "active"
11829
+ */
11830
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11831
+ }, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorNotFound>>;
11832
+ /**
11833
+ * @description This endpoint creates or updates a fixed charge override for a specific subscription. If the subscription does not have a plan override yet, one will be created automatically. The fixed charge override allows customizing specific fixed charge properties (invoice_display_name, units, properties, taxes) without affecting the original plan fixed charge. This is a premium feature.
11834
+ *
11835
+ * @tags subscriptions
11836
+ * @name OverrideSubscriptionFixedCharge
11837
+ * @summary Override a fixed charge for a subscription
11838
+ * @request PUT:/subscriptions/{external_id}/fixed_charges/{fixed_charge_code}
11839
+ * @secure
11840
+ */
11841
+ overrideSubscriptionFixedCharge: (externalId: string, fixedChargeCode: string, data: SubscriptionFixedChargeOverride, query?: {
11842
+ /**
11843
+ * Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
11844
+ * @default "active"
11845
+ * @example "active"
11846
+ */
11847
+ subscription_status?: "pending" | "active" | "terminated" | "canceled";
11848
+ }, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
10571
11849
  };
10572
11850
  taxes: {
10573
11851
  /**
@@ -10807,6 +12085,48 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10807
12085
  * @secure
10808
12086
  */
10809
12087
  walletTransactionPaymentUrl: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletTransactionPaymentUrl, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
12088
+ /**
12089
+ * @description This endpoint is used to list all consumption records for an inbound wallet transaction. It shows how the credits from this inbound transaction were consumed by outbound transactions. Only available for traceable wallets.
12090
+ *
12091
+ * @tags wallets
12092
+ * @name FindAllWalletTransactionConsumptions
12093
+ * @summary List all consumptions for a wallet transaction
12094
+ * @request GET:/wallet_transactions/{lago_id}/consumptions
12095
+ * @secure
12096
+ */
12097
+ findAllWalletTransactionConsumptions: (lagoId: string, query?: {
12098
+ /**
12099
+ * Page number.
12100
+ * @example 1
12101
+ */
12102
+ page?: number;
12103
+ /**
12104
+ * Number of records per page.
12105
+ * @example 20
12106
+ */
12107
+ per_page?: number;
12108
+ }, params?: RequestParams) => Promise<HttpResponse<WalletTransactionConsumptionsPaginated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
12109
+ /**
12110
+ * @description This endpoint is used to list all funding records for an outbound wallet transaction. It shows which inbound transactions funded this outbound transaction. Only available for traceable wallets.
12111
+ *
12112
+ * @tags wallets
12113
+ * @name FindAllWalletTransactionFundings
12114
+ * @summary List all fundings for a wallet transaction
12115
+ * @request GET:/wallet_transactions/{lago_id}/fundings
12116
+ * @secure
12117
+ */
12118
+ findAllWalletTransactionFundings: (lagoId: string, query?: {
12119
+ /**
12120
+ * Page number.
12121
+ * @example 1
12122
+ */
12123
+ page?: number;
12124
+ /**
12125
+ * Number of records per page.
12126
+ * @example 20
12127
+ */
12128
+ per_page?: number;
12129
+ }, params?: RequestParams) => Promise<HttpResponse<WalletTransactionFundingsPaginated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
10810
12130
  };
10811
12131
  webhooks: {
10812
12132
  /**