lago-javascript-client 1.2.0 → 1.5.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.
@@ -973,7 +973,7 @@ export interface CreditNoteEstimateInput {
973
973
  */
974
974
  invoice_id: string;
975
975
  /**
976
- * The list of credit note’s items.
976
+ * The list of credit note's items.
977
977
  * @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":10},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":5}]
978
978
  */
979
979
  items: {
@@ -1036,15 +1036,15 @@ export interface CreditNoteEstimated {
1036
1036
  * @example 20
1037
1037
  */
1038
1038
  coupons_adjustment_amount_cents: number;
1039
- /** Array of credit note’s items. */
1039
+ /** Array of credit note's items. */
1040
1040
  items: {
1041
1041
  /**
1042
- * The credit note’s item amount, expressed in cents.
1042
+ * The credit note's item amount, expressed in cents.
1043
1043
  * @example 100
1044
1044
  */
1045
1045
  amount_cents: number;
1046
1046
  /**
1047
- * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee’s record within the Lago system.
1047
+ * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.
1048
1048
  * @format uuid
1049
1049
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1050
1050
  */
@@ -1091,7 +1091,7 @@ export interface CreditNoteEstimated {
1091
1091
  }
1092
1092
  export interface CreditObject {
1093
1093
  /**
1094
- * Unique identifier assigned to the credit within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the credit’s item record within the Lago system.
1094
+ * Unique identifier assigned to the credit within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the credit's item record within the Lago system.
1095
1095
  * @format uuid
1096
1096
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1097
1097
  */
@@ -1157,17 +1157,17 @@ export type CreditNoteAppliedTaxObject = BaseAppliedTax & {
1157
1157
  };
1158
1158
  export interface CreditNoteItemObject {
1159
1159
  /**
1160
- * The credit note’s item unique identifier, created by Lago.
1160
+ * The credit note's item unique identifier, created by Lago.
1161
1161
  * @format uuid
1162
1162
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1163
1163
  */
1164
1164
  lago_id: string;
1165
1165
  /**
1166
- * The credit note’s item amount, expressed in cents.
1166
+ * The credit note's item amount, expressed in cents.
1167
1167
  * @example 100
1168
1168
  */
1169
1169
  amount_cents: number;
1170
- /** The credit note’s item currency. */
1170
+ /** The credit note's item currency. */
1171
1171
  amount_currency: Currency;
1172
1172
  /** The fee object related to the credit note item. */
1173
1173
  fee: FeeObject;
@@ -1294,7 +1294,7 @@ export interface CreditNoteObject {
1294
1294
  * @example "https://getlago.com/credit_note/file"
1295
1295
  */
1296
1296
  file_url?: string | null;
1297
- /** Array of credit note’s items. */
1297
+ /** Array of credit note's items. */
1298
1298
  items?: CreditNoteItemObject[];
1299
1299
  applied_taxes?: CreditNoteAppliedTaxObject[];
1300
1300
  }
@@ -1331,7 +1331,7 @@ export interface CreditNoteCreateInput {
1331
1331
  */
1332
1332
  refund_amount_cents?: number | null;
1333
1333
  /**
1334
- * The list of credit note’s items.
1334
+ * The list of credit note's items.
1335
1335
  * @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":10},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":5}]
1336
1336
  */
1337
1337
  items: {
@@ -1411,6 +1411,35 @@ export interface CustomerBillingConfiguration {
1411
1411
  */
1412
1412
  provider_payment_methods?: string[] | null;
1413
1413
  }
1414
+ /** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
1415
+ export interface IntegrationCustomer {
1416
+ /**
1417
+ * The integration type used for accounting and tax syncs.
1418
+ * Accepted values: `netsuite`.
1419
+ * @example "netsuite"
1420
+ */
1421
+ integration_type?: "netsuite";
1422
+ /**
1423
+ * Unique code used to identify an integration connection.
1424
+ * @example "netsuite-eu-1"
1425
+ */
1426
+ integration_code?: string;
1427
+ /**
1428
+ * The customer ID within the integration's system. If this field is not provided, Lago has the option to create a new customer record within the integration's system on behalf of the customer.
1429
+ * @example "cus_12345"
1430
+ */
1431
+ external_customer_id?: string;
1432
+ /**
1433
+ * Set this field to `true` if you want to create a customer record in the integration's system. This option is applicable only when the `external_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`
1434
+ * @example true
1435
+ */
1436
+ sync_with_provider?: boolean;
1437
+ /**
1438
+ * This optional field is needed only when working with `netsuite` connection.
1439
+ * @example "2"
1440
+ */
1441
+ subsidiary_id?: string;
1442
+ }
1414
1443
  /** Array of filter object, representing multiple dimensions for a charge item. */
1415
1444
  export type CustomerChargeFiltersUsageObject = {
1416
1445
  /**
@@ -1525,7 +1554,7 @@ export interface CustomerChargeUsageObject {
1525
1554
  /** Object listing all the properties for a specific charge item. */
1526
1555
  charge: {
1527
1556
  /**
1528
- * 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.
1557
+ * 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.
1529
1558
  * @format uuid
1530
1559
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1531
1560
  */
@@ -1544,7 +1573,7 @@ export interface CustomerChargeUsageObject {
1544
1573
  /** The related billable metric object. */
1545
1574
  billable_metric: {
1546
1575
  /**
1547
- * 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.
1576
+ * 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.
1548
1577
  * @format uuid
1549
1578
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1550
1579
  */
@@ -1663,6 +1692,8 @@ export interface CustomerCreateInput {
1663
1692
  net_payment_term?: number | null;
1664
1693
  /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
1665
1694
  billing_configuration?: CustomerBillingConfiguration;
1695
+ /** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
1696
+ integration_customer?: IntegrationCustomer;
1666
1697
  /** Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format */
1667
1698
  metadata?: {
1668
1699
  /**
@@ -1834,6 +1865,8 @@ export interface CustomerObject {
1834
1865
  updated_at?: string;
1835
1866
  /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
1836
1867
  billing_configuration?: CustomerBillingConfiguration;
1868
+ /** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
1869
+ integration_customer?: IntegrationCustomer;
1837
1870
  metadata?: CustomerMetadata[];
1838
1871
  }
1839
1872
  export type CustomerObjectExtended = CustomerObject & {
@@ -1867,8 +1900,8 @@ export interface CustomerUsageObject {
1867
1900
  to_datetime: string;
1868
1901
  /**
1869
1902
  * The date of creation of the invoice.
1870
- * @format date-time
1871
- * @example "2022-08-01T23:59:59Z"
1903
+ * @format date
1904
+ * @example "2022-08-01"
1872
1905
  */
1873
1906
  issuing_date: string;
1874
1907
  /**
@@ -1877,7 +1910,7 @@ export interface CustomerUsageObject {
1877
1910
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1878
1911
  */
1879
1912
  lago_invoice_id?: string | null;
1880
- /** The currency of the customer’s current usage. */
1913
+ /** The currency of the customer's current usage. */
1881
1914
  currency?: Currency;
1882
1915
  /**
1883
1916
  * The amount in cents, tax excluded.
@@ -1961,7 +1994,7 @@ export interface EventInput {
1961
1994
  * This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required.
1962
1995
  * @example {"gb":10}
1963
1996
  */
1964
- properties?: Record<string, string>;
1997
+ properties?: Record<string, string | number>;
1965
1998
  };
1966
1999
  }
1967
2000
  export interface EventObject {
@@ -2010,7 +2043,7 @@ export interface EventObject {
2010
2043
  [key: string]: any;
2011
2044
  };
2012
2045
  /**
2013
- * Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription’s record within the Lago system
2046
+ * Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system
2014
2047
  * @format uuid
2015
2048
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2016
2049
  */
@@ -2040,7 +2073,7 @@ export type FeeAppliedTaxObject = BaseAppliedTax & {
2040
2073
  };
2041
2074
  export interface FeeObject {
2042
2075
  /**
2043
- * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee’s record within the Lago system.
2076
+ * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.
2044
2077
  * @format uuid
2045
2078
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2046
2079
  */
@@ -2108,7 +2141,7 @@ export interface FeeObject {
2108
2141
  * @example 100
2109
2142
  */
2110
2143
  amount_cents: number;
2111
- /** The currency of this specific fee. It indicates the monetary unit in which the fee’s cost is expressed. */
2144
+ /** The currency of this specific fee. It indicates the monetary unit in which the fee's cost is expressed. */
2112
2145
  amount_currency: Currency;
2113
2146
  /**
2114
2147
  * The cost of the tax associated with this specific fee.
@@ -2641,12 +2674,12 @@ export interface InvoiceMetadataObject {
2641
2674
  */
2642
2675
  lago_id?: string;
2643
2676
  /**
2644
- * Represents the key of the metadata’s key-value pair.
2677
+ * Represents the key of the metadata's key-value pair.
2645
2678
  * @example "digital_ref_id"
2646
2679
  */
2647
2680
  key?: string;
2648
2681
  /**
2649
- * Represents the value of the metadata’s key-value pair.
2682
+ * Represents the value of the metadata's key-value pair.
2650
2683
  * @example "INV-0123456-98765"
2651
2684
  */
2652
2685
  value?: string;
@@ -2659,7 +2692,7 @@ export interface InvoiceMetadataObject {
2659
2692
  }
2660
2693
  export interface InvoiceObject {
2661
2694
  /**
2662
- * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee’s record within the Lago system.
2695
+ * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.
2663
2696
  * @format uuid
2664
2697
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2665
2698
  */
@@ -2872,7 +2905,7 @@ export interface OrganizationBillingConfiguration {
2872
2905
  */
2873
2906
  invoice_footer?: string | null;
2874
2907
  /**
2875
- * The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer’s grace period.
2908
+ * The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer's grace period.
2876
2909
  * @example 3
2877
2910
  */
2878
2911
  invoice_grace_period?: number;
@@ -2915,22 +2948,22 @@ export interface OrganizationObject {
2915
2948
  /** The default currency of an organization. */
2916
2949
  default_currency?: Currency;
2917
2950
  /**
2918
- * The first line of your organization’s billing address.
2951
+ * The first line of your organization's billing address.
2919
2952
  * @example "100 Brex Street"
2920
2953
  */
2921
2954
  address_line1?: string | null;
2922
2955
  /**
2923
- * The second line of your organization’s billing address.
2956
+ * The second line of your organization's billing address.
2924
2957
  * @example null
2925
2958
  */
2926
2959
  address_line2?: string | null;
2927
2960
  /**
2928
- * The state of your organization’s billing address.
2961
+ * The state of your organization's billing address.
2929
2962
  * @example "NYC"
2930
2963
  */
2931
2964
  state?: string | null;
2932
2965
  /**
2933
- * The zipcode of your organization’s billing address.
2966
+ * The zipcode of your organization's billing address.
2934
2967
  * @example "10000"
2935
2968
  */
2936
2969
  zipcode?: string | null;
@@ -2941,7 +2974,7 @@ export interface OrganizationObject {
2941
2974
  */
2942
2975
  email?: string | null;
2943
2976
  /**
2944
- * The city of your organization’s billing address.
2977
+ * The city of your organization's billing address.
2945
2978
  * @example "New York"
2946
2979
  */
2947
2980
  city?: string | null;
@@ -2980,7 +3013,7 @@ export interface OrganizationObject {
2980
3013
  * @example "US123456789"
2981
3014
  */
2982
3015
  tax_identification_number?: string | null;
2983
- /** Your organization’s timezone, used for billing purposes in your own local time. Can be overwritten by the customer’s timezone. */
3016
+ /** Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone. */
2984
3017
  timezone?: Timezone;
2985
3018
  /** The custom billing settings for your organization. */
2986
3019
  billing_configuration: OrganizationBillingConfiguration;
@@ -2999,22 +3032,22 @@ export interface OrganizationUpdateInput {
2999
3032
  /** The default currency of an organization. */
3000
3033
  default_currency?: Currency;
3001
3034
  /**
3002
- * The first line of your organization’s billing address.
3035
+ * The first line of your organization's billing address.
3003
3036
  * @example "100 Brex Street"
3004
3037
  */
3005
3038
  address_line1?: string | null;
3006
3039
  /**
3007
- * The second line of your organization’s billing address.
3040
+ * The second line of your organization's billing address.
3008
3041
  * @example null
3009
3042
  */
3010
3043
  address_line2?: string | null;
3011
3044
  /**
3012
- * The state of your organization’s billing address.
3045
+ * The state of your organization's billing address.
3013
3046
  * @example "NYC"
3014
3047
  */
3015
3048
  state?: string | null;
3016
3049
  /**
3017
- * The zipcode of your organization’s billing address.
3050
+ * The zipcode of your organization's billing address.
3018
3051
  * @example "10000"
3019
3052
  */
3020
3053
  zipcode?: string | null;
@@ -3025,7 +3058,7 @@ export interface OrganizationUpdateInput {
3025
3058
  */
3026
3059
  email?: string | null;
3027
3060
  /**
3028
- * The city of your organization’s billing address.
3061
+ * The city of your organization's billing address.
3029
3062
  * @example "New York"
3030
3063
  */
3031
3064
  city?: string | null;
@@ -3064,7 +3097,7 @@ export interface OrganizationUpdateInput {
3064
3097
  * @example "US123456789"
3065
3098
  */
3066
3099
  tax_identification_number?: string | null;
3067
- /** Your organization’s timezone, used for billing purposes in your own local time. Can be overwritten by the customer’s timezone. */
3100
+ /** Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone. */
3068
3101
  timezone?: Timezone;
3069
3102
  /**
3070
3103
  * Represents the email settings of the organization. It allows you to define which documents are sent by email. The field value determines the types of documents that trigger email notifications. Possible values for are `invoice.finalized` and `credit_note.created`. By configuring this field, you can specify whether invoices, credit notes, or both should be sent to recipients via email.
@@ -3150,7 +3183,7 @@ export interface PlanCreateInput {
3150
3183
  */
3151
3184
  pay_in_advance?: boolean;
3152
3185
  /**
3153
- * This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan’s interval is `yearly`.
3186
+ * This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is `yearly`.
3154
3187
  * @example null
3155
3188
  */
3156
3189
  bill_charges_monthly?: boolean | null;
@@ -3359,7 +3392,7 @@ export interface PlanUpdateInput {
3359
3392
  */
3360
3393
  pay_in_advance?: boolean;
3361
3394
  /**
3362
- * This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan’s interval is `yearly`.
3395
+ * This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is `yearly`.
3363
3396
  * @example null
3364
3397
  */
3365
3398
  bill_charges_monthly?: boolean | null;
@@ -3502,7 +3535,7 @@ export interface PlanObject {
3502
3535
  */
3503
3536
  pay_in_advance?: boolean;
3504
3537
  /**
3505
- * This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan’s interval is `yearly`.
3538
+ * This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is `yearly`.
3506
3539
  * @example null
3507
3540
  */
3508
3541
  bill_charges_monthly?: boolean | null;
@@ -3605,7 +3638,7 @@ export interface SubscriptionUpdateInput {
3605
3638
  }
3606
3639
  export interface SubscriptionObject {
3607
3640
  /**
3608
- * Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription’s record within the Lago system
3641
+ * Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system
3609
3642
  * @format uuid
3610
3643
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
3611
3644
  */
@@ -3862,33 +3895,62 @@ export interface WalletCreateInput {
3862
3895
  /** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
3863
3896
  recurring_transaction_rules?: {
3864
3897
  /**
3865
- * The rule type. Possible values are `interval` or `threshold`.
3898
+ * The number of paid credits used for recurring top-up.
3899
+ * @pattern ^[0-9]+.?[0-9]*$
3900
+ * @example "20.0"
3901
+ */
3902
+ paid_credits?: string | null;
3903
+ /**
3904
+ * The number of free granted credits used for recurring top-up.
3905
+ * @pattern ^[0-9]+.?[0-9]*$
3906
+ * @example "10.0"
3907
+ */
3908
+ granted_credits?: string | null;
3909
+ /**
3910
+ * The method used for recurring top-up. Possible values are `fixed` or `target`.
3911
+ * @example "target"
3912
+ */
3913
+ method?: "fixed" | "target";
3914
+ /**
3915
+ * The trigger. Possible values are `interval` or `threshold`.
3866
3916
  * @example "interval"
3867
3917
  */
3868
- rule_type: "interval" | "threshold";
3918
+ trigger: "interval" | "threshold";
3869
3919
  /**
3870
- * 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` or `yearly`. Required only when rule type is `interval`.
3920
+ * 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` or `yearly`. Required only when trigger is `interval`.
3871
3921
  * @example "monthly"
3872
3922
  */
3873
3923
  interval?: "weekly" | "monthly" | "quarterly" | "yearly";
3874
3924
  /**
3875
- * 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 rule type is set to `threshold`.
3925
+ * 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).
3926
+ * @format date-time
3927
+ * @example "2022-08-08T00:00:00Z"
3928
+ */
3929
+ started_at?: string;
3930
+ /**
3931
+ * 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`.
3876
3932
  * @pattern ^[0-9]+.?[0-9]*$
3877
3933
  * @example "20.0"
3878
3934
  */
3879
3935
  threshold_credits?: string;
3936
+ /**
3937
+ * 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`.
3938
+ * @pattern ^[0-9]+.?[0-9]*$
3939
+ * @example "200.0"
3940
+ */
3941
+ target_ongoing_balance?: string;
3880
3942
  }[];
3881
3943
  };
3882
3944
  }
3883
3945
  export interface WalletObject {
3884
3946
  /**
3885
- * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet’s record within the Lago system.
3947
+ * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.
3886
3948
  * @format uuid
3887
3949
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
3888
3950
  */
3889
3951
  lago_id: string;
3890
3952
  /**
3891
- * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer’s record within the Lago system.
3953
+ * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
3892
3954
  * @format uuid
3893
3955
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
3894
3956
  */
@@ -3972,21 +4034,26 @@ export interface WalletObject {
3972
4034
  */
3973
4035
  lago_id: string;
3974
4036
  /**
3975
- * The rule type. Possible values are `interval` or `threshold`.
4037
+ * The trigger. Possible values are `interval` or `threshold`.
3976
4038
  * @example "interval"
3977
4039
  */
3978
- rule_type: "interval" | "threshold";
4040
+ trigger: "interval" | "threshold";
3979
4041
  /**
3980
- * 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` or `yearly`. Required only if rule type is set to `interval`.
4042
+ * The method used for recurring top-up. Possible values are `fixed` or `target`.
4043
+ * @example "target"
4044
+ */
4045
+ method: "fixed" | "target";
4046
+ /**
4047
+ * 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` or `yearly`. Required only if trigger is set to `interval`.
3981
4048
  * @example "monthly"
3982
4049
  */
3983
- interval?: "weekly" | "monthly" | "quarterly" | "yearly";
4050
+ interval: "weekly" | "monthly" | "quarterly" | "yearly";
3984
4051
  /**
3985
- * 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 rule type is set to `threshold`.
4052
+ * 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`.
3986
4053
  * @pattern ^[0-9]+.?[0-9]*$
3987
4054
  * @example "20.0"
3988
4055
  */
3989
- threshold_credits?: string;
4056
+ threshold_credits: string;
3990
4057
  /**
3991
4058
  * The number of paid credits. Required only if there is no granted credits.
3992
4059
  * @pattern ^[0-9]+.?[0-9]*$
@@ -3999,6 +4066,18 @@ export interface WalletObject {
3999
4066
  * @example "10.0"
4000
4067
  */
4001
4068
  granted_credits: string;
4069
+ /**
4070
+ * 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).
4071
+ * @format date-time
4072
+ * @example "2022-08-08T00:00:00Z"
4073
+ */
4074
+ started_at?: string;
4075
+ /**
4076
+ * 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`.
4077
+ * @pattern ^[0-9]+.?[0-9]*$
4078
+ * @example "200.0"
4079
+ */
4080
+ target_ongoing_balance: string;
4002
4081
  /**
4003
4082
  * The date of the metadata object creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the metadata object was created
4004
4083
  * @format date-time
@@ -4036,34 +4115,40 @@ export interface WalletsPaginated {
4036
4115
  export interface WalletTransactionCreateInput {
4037
4116
  wallet_transaction: {
4038
4117
  /**
4039
- * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet’s record within the Lago system.
4118
+ * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.
4040
4119
  * @format uuid
4041
4120
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4042
4121
  */
4043
4122
  wallet_id: string;
4044
4123
  /**
4045
- * The number of paid credits. Required only if there is no granted credits.
4124
+ * The number of paid credits.
4046
4125
  * @pattern ^[0-9]+.?[0-9]*$
4047
4126
  * @example "20.0"
4048
4127
  */
4049
4128
  paid_credits?: string;
4050
4129
  /**
4051
- * The number of free granted credits. Required only if there is no paid credits.
4130
+ * The number of free granted credits.
4052
4131
  * @pattern ^[0-9]+.?[0-9]*$
4053
4132
  * @example "10.0"
4054
4133
  */
4055
4134
  granted_credits?: string;
4135
+ /**
4136
+ * The number of voided credits.
4137
+ * @pattern ^[0-9]+.?[0-9]*$
4138
+ * @example "5.0"
4139
+ */
4140
+ voided_credits?: string;
4056
4141
  };
4057
4142
  }
4058
4143
  export interface WalletTransactionObject {
4059
4144
  /**
4060
- * Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet transaction’s record within the Lago system.
4145
+ * Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet transaction's record within the Lago system.
4061
4146
  * @format uuid
4062
4147
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4063
4148
  */
4064
4149
  lago_id: string;
4065
4150
  /**
4066
- * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet’s record within the Lago system.
4151
+ * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.
4067
4152
  * @format uuid
4068
4153
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4069
4154
  */
@@ -4073,6 +4158,11 @@ export interface WalletTransactionObject {
4073
4158
  * @example "settled"
4074
4159
  */
4075
4160
  status: "pending" | "settled";
4161
+ /**
4162
+ * The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.
4163
+ * @example "purchased"
4164
+ */
4165
+ transaction_status: "purchased" | "granted" | "voided" | "invoiced";
4076
4166
  /**
4077
4167
  * The type of transaction. Possible values are `inbound` (increasing the balance) or `outbound` (decreasing the balance).
4078
4168
  * @example "inbound"
@@ -4131,17 +4221,22 @@ export interface WalletUpdateInput {
4131
4221
  */
4132
4222
  lago_id?: string;
4133
4223
  /**
4134
- * The rule type. Possible values are `interval` or `threshold`.
4224
+ * The trigger. Possible values are `interval` or `threshold`.
4135
4225
  * @example "interval"
4136
4226
  */
4137
- rule_type?: "interval" | "threshold";
4227
+ trigger?: "interval" | "threshold";
4138
4228
  /**
4139
- * 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` or `yearly`. Required only when rule type is set to `interval`.
4229
+ * The method used for recurring top-up. Possible values are `fixed` or `target`.
4230
+ * @example "target"
4231
+ */
4232
+ method?: "fixed" | "target";
4233
+ /**
4234
+ * 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` or `yearly`. Required only when trigger is set to `interval`.
4140
4235
  * @example "monthly"
4141
4236
  */
4142
4237
  interval?: "weekly" | "monthly" | "quarterly" | "yearly";
4143
4238
  /**
4144
- * 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 rule type is set to `threshold`.
4239
+ * 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`.
4145
4240
  * @pattern ^[0-9]+.?[0-9]*$
4146
4241
  * @example "20.0"
4147
4242
  */
@@ -4158,6 +4253,18 @@ export interface WalletUpdateInput {
4158
4253
  * @example "10.0"
4159
4254
  */
4160
4255
  granted_credits?: string;
4256
+ /**
4257
+ * 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).
4258
+ * @format date-time
4259
+ * @example "2022-08-08T00:00:00Z"
4260
+ */
4261
+ started_at?: string;
4262
+ /**
4263
+ * 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`.
4264
+ * @pattern ^[0-9]+.?[0-9]*$
4265
+ * @example "200.0"
4266
+ */
4267
+ target_ongoing_balance?: string;
4161
4268
  }[];
4162
4269
  };
4163
4270
  }
@@ -4186,7 +4293,7 @@ export interface WebhookEndpointObject {
4186
4293
  */
4187
4294
  lago_id: string;
4188
4295
  /**
4189
- * Unique identifier assigned to the organization attached to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the organization’s record within the Lago system.
4296
+ * Unique identifier assigned to the organization attached to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the organization's record within the Lago system.
4190
4297
  * @format uuid
4191
4298
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4192
4299
  */
@@ -4286,7 +4393,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
4286
4393
  }
4287
4394
  /**
4288
4395
  * @title Lago API documentation
4289
- * @version 1.1.0
4396
+ * @version 1.5.0
4290
4397
  * @license AGPLv3
4291
4398
  * @baseUrl https://api.getlago.com/api/v1
4292
4399
  * @externalDocs https://github.com/getlago
@@ -4376,6 +4483,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4376
4483
  * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
4377
4484
  */
4378
4485
  external_customer_id?: string;
4486
+ /**
4487
+ * Show data only for given number of months.
4488
+ * @example 12
4489
+ */
4490
+ months?: number;
4379
4491
  }, params?: RequestParams) => Promise<HttpResponse<GrossRevenues, ApiErrorUnauthorized>>;
4380
4492
  /**
4381
4493
  * @description Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`.
@@ -4389,6 +4501,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4389
4501
  findAllInvoiceCollections: (query?: {
4390
4502
  /** The currency of revenue analytics. Format must be ISO 4217. */
4391
4503
  currency?: Currency;
4504
+ /**
4505
+ * Show data only for given number of months.
4506
+ * @example 12
4507
+ */
4508
+ months?: number;
4392
4509
  }, params?: RequestParams) => Promise<HttpResponse<InvoiceCollections, ApiErrorUnauthorized>>;
4393
4510
  /**
4394
4511
  * @description Reports a monthly analysis focused on the revenue generated from all usage-based fees. It exclusively accounts for revenue that has been formally invoiced. Importantly, this report does not include revenue related to the usage in the current billing period, limiting its scope to previously invoiced amounts.
@@ -4402,6 +4519,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4402
4519
  findAllInvoicedUsages: (query?: {
4403
4520
  /** The currency of invoiced usage analytics. Format must be ISO 4217. */
4404
4521
  currency?: Currency;
4522
+ /**
4523
+ * Show data only for given number of months.
4524
+ * @example 12
4525
+ */
4526
+ months?: number;
4405
4527
  }, params?: RequestParams) => Promise<HttpResponse<InvoicedUsages, ApiErrorUnauthorized>>;
4406
4528
  /**
4407
4529
  * @description This endpoint is used to list MRR.
@@ -4947,7 +5069,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4947
5069
  * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
4948
5070
  */
4949
5071
  external_subscription_id?: string;
4950
- /** Filter results by fee’s currency. */
5072
+ /** Filter results by fee's currency. */
4951
5073
  currency?: Currency;
4952
5074
  /**
4953
5075
  * The fee type. Possible values are `add-on`, `charge`, `credit` or `subscription`.
@@ -5520,6 +5642,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5520
5642
  * @example "pending"
5521
5643
  */
5522
5644
  status?: string;
5645
+ /**
5646
+ * The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.
5647
+ * @example "purchased"
5648
+ */
5649
+ transaction_status?: string;
5523
5650
  /**
5524
5651
  * The transaction type of the wallet transaction. Possible values are `inbound` (increasing the wallet balance) or `outbound` (decreasing the wallet balance).
5525
5652
  * @example "inbound"