lago-javascript-client 1.7.0 → 1.9.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.
- package/esm/openapi/client.d.ts +156 -24
- package/esm/openapi/client.js +1 -1
- package/package.json +1 -1
- package/script/openapi/client.d.ts +156 -24
- package/script/openapi/client.js +1 -1
package/esm/openapi/client.d.ts
CHANGED
|
@@ -559,6 +559,15 @@ export interface ChargeObject {
|
|
|
559
559
|
* @example true
|
|
560
560
|
*/
|
|
561
561
|
invoiceable?: boolean;
|
|
562
|
+
/**
|
|
563
|
+
* This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
|
|
564
|
+
* This field determines whether and when the charge fee should be included in
|
|
565
|
+
* the invoice. If `null`, no invoice will be issued for this charge fee.
|
|
566
|
+
* If `invoice`, an invoice will be generated at the end of the period,
|
|
567
|
+
* consolidating all charge fees with a succeeded payment status.
|
|
568
|
+
* @example "invoice"
|
|
569
|
+
*/
|
|
570
|
+
regroup_paid_fees?: "invoice" | null;
|
|
562
571
|
/**
|
|
563
572
|
* Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
|
|
564
573
|
*
|
|
@@ -1927,7 +1936,26 @@ export interface Event {
|
|
|
1927
1936
|
event: EventObject;
|
|
1928
1937
|
}
|
|
1929
1938
|
export interface EventBatchInput {
|
|
1930
|
-
events:
|
|
1939
|
+
events: any[];
|
|
1940
|
+
}
|
|
1941
|
+
export interface EventEstimateFeesInput {
|
|
1942
|
+
event: {
|
|
1943
|
+
/**
|
|
1944
|
+
* The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.
|
|
1945
|
+
* @example "storage"
|
|
1946
|
+
*/
|
|
1947
|
+
code: string;
|
|
1948
|
+
/**
|
|
1949
|
+
* The unique identifier of the subscription within your application.
|
|
1950
|
+
* @example "sub_1234567890"
|
|
1951
|
+
*/
|
|
1952
|
+
external_subscription_id: string;
|
|
1953
|
+
/** 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. */
|
|
1954
|
+
properties?: object;
|
|
1955
|
+
};
|
|
1956
|
+
}
|
|
1957
|
+
export interface EventInput {
|
|
1958
|
+
event: {
|
|
1931
1959
|
/**
|
|
1932
1960
|
* This field represents a unique identifier for the event. It is crucial for ensuring idempotency, meaning that each event can be uniquely identified and processed without causing any unintended side effects.
|
|
1933
1961
|
* @example "transaction_1234567890"
|
|
@@ -1955,27 +1983,8 @@ export interface EventBatchInput {
|
|
|
1955
1983
|
* @example {"gb":10}
|
|
1956
1984
|
*/
|
|
1957
1985
|
properties?: Record<string, string | number>;
|
|
1958
|
-
}[];
|
|
1959
|
-
}
|
|
1960
|
-
export interface EventEstimateFeesInput {
|
|
1961
|
-
event: {
|
|
1962
|
-
/**
|
|
1963
|
-
* The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.
|
|
1964
|
-
* @example "storage"
|
|
1965
|
-
*/
|
|
1966
|
-
code: string;
|
|
1967
|
-
/**
|
|
1968
|
-
* The unique identifier of the subscription within your application.
|
|
1969
|
-
* @example "sub_1234567890"
|
|
1970
|
-
*/
|
|
1971
|
-
external_subscription_id: string;
|
|
1972
|
-
/** 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. */
|
|
1973
|
-
properties?: object;
|
|
1974
1986
|
};
|
|
1975
1987
|
}
|
|
1976
|
-
export interface EventInput {
|
|
1977
|
-
event: any;
|
|
1978
|
-
}
|
|
1979
1988
|
export interface EventObject {
|
|
1980
1989
|
/**
|
|
1981
1990
|
* Unique identifier assigned to the event within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the event's record within the Lago system
|
|
@@ -3150,7 +3159,7 @@ export interface PlanCreateInput {
|
|
|
3150
3159
|
minimum_commitment?: MinimumCommitmentInput;
|
|
3151
3160
|
/**
|
|
3152
3161
|
* Additional usage-based charges for this plan.
|
|
3153
|
-
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"}}]
|
|
3162
|
+
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"}}]
|
|
3154
3163
|
*/
|
|
3155
3164
|
charges?: {
|
|
3156
3165
|
/**
|
|
@@ -3174,6 +3183,15 @@ export interface PlanCreateInput {
|
|
|
3174
3183
|
* @example true
|
|
3175
3184
|
*/
|
|
3176
3185
|
invoiceable?: boolean;
|
|
3186
|
+
/**
|
|
3187
|
+
* This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
|
|
3188
|
+
* This field determines whether and when the charge fee should be included in
|
|
3189
|
+
* the invoice. If `null`, no invoice will be issued for this charge fee.
|
|
3190
|
+
* If `invoice`, an invoice will be generated at the end of the period,
|
|
3191
|
+
* consolidating all charge fees with a succeeded payment status.
|
|
3192
|
+
* @example "invoice"
|
|
3193
|
+
*/
|
|
3194
|
+
regroup_paid_fees?: "invoice" | null;
|
|
3177
3195
|
/**
|
|
3178
3196
|
* 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.
|
|
3179
3197
|
* @example "Setup"
|
|
@@ -3333,7 +3351,7 @@ export interface PlanUpdateInput {
|
|
|
3333
3351
|
minimum_commitment?: MinimumCommitmentInput;
|
|
3334
3352
|
/**
|
|
3335
3353
|
* Additional usage-based charges for this plan.
|
|
3336
|
-
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"}}]
|
|
3354
|
+
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"}}]
|
|
3337
3355
|
*/
|
|
3338
3356
|
charges?: {
|
|
3339
3357
|
/**
|
|
@@ -3363,6 +3381,15 @@ export interface PlanUpdateInput {
|
|
|
3363
3381
|
* @example true
|
|
3364
3382
|
*/
|
|
3365
3383
|
invoiceable?: boolean;
|
|
3384
|
+
/**
|
|
3385
|
+
* This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
|
|
3386
|
+
* This field determines whether and when the charge fee should be included in
|
|
3387
|
+
* the invoice. If `null`, no invoice will be issued for this charge fee.
|
|
3388
|
+
* If `invoice`, an invoice will be generated at the end of the period,
|
|
3389
|
+
* consolidating all charge fees with a succeeded payment status.
|
|
3390
|
+
* @example "invoice"
|
|
3391
|
+
*/
|
|
3392
|
+
regroup_paid_fees?: "invoice" | null;
|
|
3366
3393
|
/**
|
|
3367
3394
|
* 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.
|
|
3368
3395
|
* @example "Setup"
|
|
@@ -3467,7 +3494,7 @@ export interface PlanObject {
|
|
|
3467
3494
|
minimum_commitment?: MinimumCommitmentObject;
|
|
3468
3495
|
/**
|
|
3469
3496
|
* Additional usage-based charges for this plan.
|
|
3470
|
-
* @example [{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","billable_metric_code":"requests","created_at":"2023-06-27T19:43:42Z","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","billable_metric_code":"cpu","created_at":"2023-06-27T19:43:42Z","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"},{"from_value":11,"to_value":null,"flat_amount":"0","per_unit_amount":"0.4"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","billable_metric_code":"seats","created_at":"2023-06-27T19:43:42Z","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"filters":[{"invoice_display_name":"Europe","properties":{"amount":"10"},"values":{"region":["Europe"]}},{"invoice_display_name":"USA","properties":{"amount":"5"},"values":{"region":["USA"]}},{"invoice_display_name":"Africa","properties":{"amount":"8"},"values":{"region":["Africa"]}}]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","billable_metric_code":"storage","created_at":"2023-06-27T19:43:42Z","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","billable_metric_code":"payments","created_at":"2023-06-27T19:43:42Z","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"filters":[]}]
|
|
3497
|
+
* @example [{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","billable_metric_code":"requests","created_at":"2023-06-27T19:43:42Z","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","billable_metric_code":"cpu","created_at":"2023-06-27T19:43:42Z","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"},{"from_value":11,"to_value":null,"flat_amount":"0","per_unit_amount":"0.4"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","billable_metric_code":"seats","created_at":"2023-06-27T19:43:42Z","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"filters":[{"invoice_display_name":"Europe","properties":{"amount":"10"},"values":{"region":["Europe"]}},{"invoice_display_name":"USA","properties":{"amount":"5"},"values":{"region":["USA"]}},{"invoice_display_name":"Africa","properties":{"amount":"8"},"values":{"region":["Africa"]}}]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","billable_metric_code":"storage","created_at":"2023-06-27T19:43:42Z","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","billable_metric_code":"payments","created_at":"2023-06-27T19:43:42Z","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"filters":[]}]
|
|
3471
3498
|
*/
|
|
3472
3499
|
charges?: ChargeObject[];
|
|
3473
3500
|
/** All taxes applied to the plan. */
|
|
@@ -3807,6 +3834,21 @@ export interface WalletCreateInput {
|
|
|
3807
3834
|
* @example "2022-07-07T23:59:59Z"
|
|
3808
3835
|
*/
|
|
3809
3836
|
expiration_at?: string | null;
|
|
3837
|
+
/**
|
|
3838
|
+
* 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.
|
|
3839
|
+
* @example false
|
|
3840
|
+
*/
|
|
3841
|
+
invoice_requires_successful_payment?: boolean;
|
|
3842
|
+
/**
|
|
3843
|
+
* 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.
|
|
3844
|
+
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
3845
|
+
*/
|
|
3846
|
+
transaction_metadata?: {
|
|
3847
|
+
/** The unique identifier for the attribute. */
|
|
3848
|
+
key?: string;
|
|
3849
|
+
/** The corresponding value for the key. */
|
|
3850
|
+
value?: string;
|
|
3851
|
+
}[];
|
|
3810
3852
|
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
3811
3853
|
recurring_transaction_rules?: {
|
|
3812
3854
|
/**
|
|
@@ -3854,6 +3896,21 @@ export interface WalletCreateInput {
|
|
|
3854
3896
|
* @example "200.0"
|
|
3855
3897
|
*/
|
|
3856
3898
|
target_ongoing_balance?: string;
|
|
3899
|
+
/**
|
|
3900
|
+
* 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.
|
|
3901
|
+
* @example false
|
|
3902
|
+
*/
|
|
3903
|
+
invoice_requires_successful_payment?: boolean;
|
|
3904
|
+
/**
|
|
3905
|
+
* 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.
|
|
3906
|
+
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
3907
|
+
*/
|
|
3908
|
+
transaction_metadata?: {
|
|
3909
|
+
/** The unique identifier for the attribute. */
|
|
3910
|
+
key?: string;
|
|
3911
|
+
/** The value associated with the key. */
|
|
3912
|
+
value?: string;
|
|
3913
|
+
}[];
|
|
3857
3914
|
}[];
|
|
3858
3915
|
};
|
|
3859
3916
|
}
|
|
@@ -3940,6 +3997,11 @@ export interface WalletObject {
|
|
|
3940
3997
|
* @example "2022-09-14T16:35:31Z"
|
|
3941
3998
|
*/
|
|
3942
3999
|
terminated_at?: string | null;
|
|
4000
|
+
/**
|
|
4001
|
+
* 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.
|
|
4002
|
+
* @example false
|
|
4003
|
+
*/
|
|
4004
|
+
invoice_requires_successful_payment?: boolean;
|
|
3943
4005
|
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
3944
4006
|
recurring_transaction_rules?: {
|
|
3945
4007
|
/**
|
|
@@ -3999,6 +4061,21 @@ export interface WalletObject {
|
|
|
3999
4061
|
* @example "2022-04-29T08:59:51Z"
|
|
4000
4062
|
*/
|
|
4001
4063
|
created_at: string;
|
|
4064
|
+
/**
|
|
4065
|
+
* 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.
|
|
4066
|
+
* @example false
|
|
4067
|
+
*/
|
|
4068
|
+
invoice_requires_successful_payment?: boolean;
|
|
4069
|
+
/**
|
|
4070
|
+
* This 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.
|
|
4071
|
+
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
4072
|
+
*/
|
|
4073
|
+
transaction_metadata?: {
|
|
4074
|
+
/** The unique identifier for the attribute. */
|
|
4075
|
+
key?: string;
|
|
4076
|
+
/** The value associated with the key. */
|
|
4077
|
+
value?: string;
|
|
4078
|
+
}[];
|
|
4002
4079
|
}[];
|
|
4003
4080
|
/**
|
|
4004
4081
|
* The wallet ongoing balance expressed in cents.
|
|
@@ -4053,6 +4130,21 @@ export interface WalletTransactionCreateInput {
|
|
|
4053
4130
|
* @example "5.0"
|
|
4054
4131
|
*/
|
|
4055
4132
|
voided_credits?: string;
|
|
4133
|
+
/**
|
|
4134
|
+
* 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.
|
|
4135
|
+
* @example false
|
|
4136
|
+
*/
|
|
4137
|
+
invoice_requires_successful_payment?: boolean;
|
|
4138
|
+
/**
|
|
4139
|
+
* This optional field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.
|
|
4140
|
+
* @example [{"key":"example key","value":"example value"},{"key":"another key","value":"another value"}]
|
|
4141
|
+
*/
|
|
4142
|
+
metadata?: {
|
|
4143
|
+
/** The unique identifier for the attribute. */
|
|
4144
|
+
key?: string;
|
|
4145
|
+
/** The value associated with the key. */
|
|
4146
|
+
value?: string;
|
|
4147
|
+
}[];
|
|
4056
4148
|
};
|
|
4057
4149
|
}
|
|
4058
4150
|
export interface WalletTransactionObject {
|
|
@@ -4073,6 +4165,11 @@ export interface WalletTransactionObject {
|
|
|
4073
4165
|
* @example "settled"
|
|
4074
4166
|
*/
|
|
4075
4167
|
status: "pending" | "settled";
|
|
4168
|
+
/**
|
|
4169
|
+
* The source field represents the origin or trigger of the wallet transaction. Possible values are `manual`, `interval`. `threshold`
|
|
4170
|
+
* @example "manual"
|
|
4171
|
+
*/
|
|
4172
|
+
source?: "manual" | "interval" | "threshold";
|
|
4076
4173
|
/**
|
|
4077
4174
|
* The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.
|
|
4078
4175
|
* @example "purchased"
|
|
@@ -4095,6 +4192,21 @@ export interface WalletTransactionObject {
|
|
|
4095
4192
|
* @example "100.0"
|
|
4096
4193
|
*/
|
|
4097
4194
|
credit_amount: string;
|
|
4195
|
+
/**
|
|
4196
|
+
* 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.
|
|
4197
|
+
* @example false
|
|
4198
|
+
*/
|
|
4199
|
+
invoice_requires_successful_payment?: boolean;
|
|
4200
|
+
/**
|
|
4201
|
+
* This field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.
|
|
4202
|
+
* @example [{"key":"example key","value":"example value"},{"key":"another key","value":"another value"}]
|
|
4203
|
+
*/
|
|
4204
|
+
metadata?: {
|
|
4205
|
+
/** The unique identifier for the attribute. */
|
|
4206
|
+
key?: string;
|
|
4207
|
+
/** The value associated with the key. */
|
|
4208
|
+
value?: string;
|
|
4209
|
+
}[];
|
|
4098
4210
|
/**
|
|
4099
4211
|
* The date when wallet transaction is settled, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
4100
4212
|
* @format date-time
|
|
@@ -4127,6 +4239,11 @@ export interface WalletUpdateInput {
|
|
|
4127
4239
|
* @example "2022-07-07T23:59:59Z"
|
|
4128
4240
|
*/
|
|
4129
4241
|
expiration_at?: string | null;
|
|
4242
|
+
/**
|
|
4243
|
+
* 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.
|
|
4244
|
+
* @example false
|
|
4245
|
+
*/
|
|
4246
|
+
invoice_requires_successful_payment?: boolean;
|
|
4130
4247
|
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
4131
4248
|
recurring_transaction_rules?: {
|
|
4132
4249
|
/**
|
|
@@ -4180,6 +4297,21 @@ export interface WalletUpdateInput {
|
|
|
4180
4297
|
* @example "200.0"
|
|
4181
4298
|
*/
|
|
4182
4299
|
target_ongoing_balance?: string;
|
|
4300
|
+
/**
|
|
4301
|
+
* 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.
|
|
4302
|
+
* @example false
|
|
4303
|
+
*/
|
|
4304
|
+
invoice_requires_successful_payment?: boolean;
|
|
4305
|
+
/**
|
|
4306
|
+
* 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.
|
|
4307
|
+
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
4308
|
+
*/
|
|
4309
|
+
transaction_metadata?: {
|
|
4310
|
+
/** The unique identifier for the attribute. */
|
|
4311
|
+
key?: string;
|
|
4312
|
+
/** The value associated with the key. */
|
|
4313
|
+
value?: string;
|
|
4314
|
+
}[];
|
|
4183
4315
|
}[];
|
|
4184
4316
|
};
|
|
4185
4317
|
}
|
|
@@ -4308,7 +4440,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
4308
4440
|
}
|
|
4309
4441
|
/**
|
|
4310
4442
|
* @title Lago API documentation
|
|
4311
|
-
* @version 1.
|
|
4443
|
+
* @version 1.9.0
|
|
4312
4444
|
* @license AGPLv3
|
|
4313
4445
|
* @baseUrl https://{region}.getlago.com/api/v1
|
|
4314
4446
|
* @externalDocs https://github.com/getlago
|
package/esm/openapi/client.js
CHANGED
package/package.json
CHANGED
|
@@ -559,6 +559,15 @@ export interface ChargeObject {
|
|
|
559
559
|
* @example true
|
|
560
560
|
*/
|
|
561
561
|
invoiceable?: boolean;
|
|
562
|
+
/**
|
|
563
|
+
* This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
|
|
564
|
+
* This field determines whether and when the charge fee should be included in
|
|
565
|
+
* the invoice. If `null`, no invoice will be issued for this charge fee.
|
|
566
|
+
* If `invoice`, an invoice will be generated at the end of the period,
|
|
567
|
+
* consolidating all charge fees with a succeeded payment status.
|
|
568
|
+
* @example "invoice"
|
|
569
|
+
*/
|
|
570
|
+
regroup_paid_fees?: "invoice" | null;
|
|
562
571
|
/**
|
|
563
572
|
* Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
|
|
564
573
|
*
|
|
@@ -1927,7 +1936,26 @@ export interface Event {
|
|
|
1927
1936
|
event: EventObject;
|
|
1928
1937
|
}
|
|
1929
1938
|
export interface EventBatchInput {
|
|
1930
|
-
events:
|
|
1939
|
+
events: any[];
|
|
1940
|
+
}
|
|
1941
|
+
export interface EventEstimateFeesInput {
|
|
1942
|
+
event: {
|
|
1943
|
+
/**
|
|
1944
|
+
* The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.
|
|
1945
|
+
* @example "storage"
|
|
1946
|
+
*/
|
|
1947
|
+
code: string;
|
|
1948
|
+
/**
|
|
1949
|
+
* The unique identifier of the subscription within your application.
|
|
1950
|
+
* @example "sub_1234567890"
|
|
1951
|
+
*/
|
|
1952
|
+
external_subscription_id: string;
|
|
1953
|
+
/** 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. */
|
|
1954
|
+
properties?: object;
|
|
1955
|
+
};
|
|
1956
|
+
}
|
|
1957
|
+
export interface EventInput {
|
|
1958
|
+
event: {
|
|
1931
1959
|
/**
|
|
1932
1960
|
* This field represents a unique identifier for the event. It is crucial for ensuring idempotency, meaning that each event can be uniquely identified and processed without causing any unintended side effects.
|
|
1933
1961
|
* @example "transaction_1234567890"
|
|
@@ -1955,27 +1983,8 @@ export interface EventBatchInput {
|
|
|
1955
1983
|
* @example {"gb":10}
|
|
1956
1984
|
*/
|
|
1957
1985
|
properties?: Record<string, string | number>;
|
|
1958
|
-
}[];
|
|
1959
|
-
}
|
|
1960
|
-
export interface EventEstimateFeesInput {
|
|
1961
|
-
event: {
|
|
1962
|
-
/**
|
|
1963
|
-
* The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.
|
|
1964
|
-
* @example "storage"
|
|
1965
|
-
*/
|
|
1966
|
-
code: string;
|
|
1967
|
-
/**
|
|
1968
|
-
* The unique identifier of the subscription within your application.
|
|
1969
|
-
* @example "sub_1234567890"
|
|
1970
|
-
*/
|
|
1971
|
-
external_subscription_id: string;
|
|
1972
|
-
/** 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. */
|
|
1973
|
-
properties?: object;
|
|
1974
1986
|
};
|
|
1975
1987
|
}
|
|
1976
|
-
export interface EventInput {
|
|
1977
|
-
event: any;
|
|
1978
|
-
}
|
|
1979
1988
|
export interface EventObject {
|
|
1980
1989
|
/**
|
|
1981
1990
|
* Unique identifier assigned to the event within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the event's record within the Lago system
|
|
@@ -3150,7 +3159,7 @@ export interface PlanCreateInput {
|
|
|
3150
3159
|
minimum_commitment?: MinimumCommitmentInput;
|
|
3151
3160
|
/**
|
|
3152
3161
|
* Additional usage-based charges for this plan.
|
|
3153
|
-
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"}}]
|
|
3162
|
+
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"}}]
|
|
3154
3163
|
*/
|
|
3155
3164
|
charges?: {
|
|
3156
3165
|
/**
|
|
@@ -3174,6 +3183,15 @@ export interface PlanCreateInput {
|
|
|
3174
3183
|
* @example true
|
|
3175
3184
|
*/
|
|
3176
3185
|
invoiceable?: boolean;
|
|
3186
|
+
/**
|
|
3187
|
+
* This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
|
|
3188
|
+
* This field determines whether and when the charge fee should be included in
|
|
3189
|
+
* the invoice. If `null`, no invoice will be issued for this charge fee.
|
|
3190
|
+
* If `invoice`, an invoice will be generated at the end of the period,
|
|
3191
|
+
* consolidating all charge fees with a succeeded payment status.
|
|
3192
|
+
* @example "invoice"
|
|
3193
|
+
*/
|
|
3194
|
+
regroup_paid_fees?: "invoice" | null;
|
|
3177
3195
|
/**
|
|
3178
3196
|
* 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.
|
|
3179
3197
|
* @example "Setup"
|
|
@@ -3333,7 +3351,7 @@ export interface PlanUpdateInput {
|
|
|
3333
3351
|
minimum_commitment?: MinimumCommitmentInput;
|
|
3334
3352
|
/**
|
|
3335
3353
|
* Additional usage-based charges for this plan.
|
|
3336
|
-
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"}}]
|
|
3354
|
+
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"}}]
|
|
3337
3355
|
*/
|
|
3338
3356
|
charges?: {
|
|
3339
3357
|
/**
|
|
@@ -3363,6 +3381,15 @@ export interface PlanUpdateInput {
|
|
|
3363
3381
|
* @example true
|
|
3364
3382
|
*/
|
|
3365
3383
|
invoiceable?: boolean;
|
|
3384
|
+
/**
|
|
3385
|
+
* This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
|
|
3386
|
+
* This field determines whether and when the charge fee should be included in
|
|
3387
|
+
* the invoice. If `null`, no invoice will be issued for this charge fee.
|
|
3388
|
+
* If `invoice`, an invoice will be generated at the end of the period,
|
|
3389
|
+
* consolidating all charge fees with a succeeded payment status.
|
|
3390
|
+
* @example "invoice"
|
|
3391
|
+
*/
|
|
3392
|
+
regroup_paid_fees?: "invoice" | null;
|
|
3366
3393
|
/**
|
|
3367
3394
|
* 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.
|
|
3368
3395
|
* @example "Setup"
|
|
@@ -3467,7 +3494,7 @@ export interface PlanObject {
|
|
|
3467
3494
|
minimum_commitment?: MinimumCommitmentObject;
|
|
3468
3495
|
/**
|
|
3469
3496
|
* Additional usage-based charges for this plan.
|
|
3470
|
-
* @example [{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","billable_metric_code":"requests","created_at":"2023-06-27T19:43:42Z","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","billable_metric_code":"cpu","created_at":"2023-06-27T19:43:42Z","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"},{"from_value":11,"to_value":null,"flat_amount":"0","per_unit_amount":"0.4"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","billable_metric_code":"seats","created_at":"2023-06-27T19:43:42Z","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"filters":[{"invoice_display_name":"Europe","properties":{"amount":"10"},"values":{"region":["Europe"]}},{"invoice_display_name":"USA","properties":{"amount":"5"},"values":{"region":["USA"]}},{"invoice_display_name":"Africa","properties":{"amount":"8"},"values":{"region":["Africa"]}}]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","billable_metric_code":"storage","created_at":"2023-06-27T19:43:42Z","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","billable_metric_code":"payments","created_at":"2023-06-27T19:43:42Z","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"filters":[]}]
|
|
3497
|
+
* @example [{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","billable_metric_code":"requests","created_at":"2023-06-27T19:43:42Z","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","billable_metric_code":"cpu","created_at":"2023-06-27T19:43:42Z","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"},{"from_value":11,"to_value":null,"flat_amount":"0","per_unit_amount":"0.4"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","billable_metric_code":"seats","created_at":"2023-06-27T19:43:42Z","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"filters":[{"invoice_display_name":"Europe","properties":{"amount":"10"},"values":{"region":["Europe"]}},{"invoice_display_name":"USA","properties":{"amount":"5"},"values":{"region":["USA"]}},{"invoice_display_name":"Africa","properties":{"amount":"8"},"values":{"region":["Africa"]}}]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","billable_metric_code":"storage","created_at":"2023-06-27T19:43:42Z","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","billable_metric_code":"payments","created_at":"2023-06-27T19:43:42Z","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"filters":[]}]
|
|
3471
3498
|
*/
|
|
3472
3499
|
charges?: ChargeObject[];
|
|
3473
3500
|
/** All taxes applied to the plan. */
|
|
@@ -3807,6 +3834,21 @@ export interface WalletCreateInput {
|
|
|
3807
3834
|
* @example "2022-07-07T23:59:59Z"
|
|
3808
3835
|
*/
|
|
3809
3836
|
expiration_at?: string | null;
|
|
3837
|
+
/**
|
|
3838
|
+
* 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.
|
|
3839
|
+
* @example false
|
|
3840
|
+
*/
|
|
3841
|
+
invoice_requires_successful_payment?: boolean;
|
|
3842
|
+
/**
|
|
3843
|
+
* 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.
|
|
3844
|
+
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
3845
|
+
*/
|
|
3846
|
+
transaction_metadata?: {
|
|
3847
|
+
/** The unique identifier for the attribute. */
|
|
3848
|
+
key?: string;
|
|
3849
|
+
/** The corresponding value for the key. */
|
|
3850
|
+
value?: string;
|
|
3851
|
+
}[];
|
|
3810
3852
|
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
3811
3853
|
recurring_transaction_rules?: {
|
|
3812
3854
|
/**
|
|
@@ -3854,6 +3896,21 @@ export interface WalletCreateInput {
|
|
|
3854
3896
|
* @example "200.0"
|
|
3855
3897
|
*/
|
|
3856
3898
|
target_ongoing_balance?: string;
|
|
3899
|
+
/**
|
|
3900
|
+
* 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.
|
|
3901
|
+
* @example false
|
|
3902
|
+
*/
|
|
3903
|
+
invoice_requires_successful_payment?: boolean;
|
|
3904
|
+
/**
|
|
3905
|
+
* 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.
|
|
3906
|
+
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
3907
|
+
*/
|
|
3908
|
+
transaction_metadata?: {
|
|
3909
|
+
/** The unique identifier for the attribute. */
|
|
3910
|
+
key?: string;
|
|
3911
|
+
/** The value associated with the key. */
|
|
3912
|
+
value?: string;
|
|
3913
|
+
}[];
|
|
3857
3914
|
}[];
|
|
3858
3915
|
};
|
|
3859
3916
|
}
|
|
@@ -3940,6 +3997,11 @@ export interface WalletObject {
|
|
|
3940
3997
|
* @example "2022-09-14T16:35:31Z"
|
|
3941
3998
|
*/
|
|
3942
3999
|
terminated_at?: string | null;
|
|
4000
|
+
/**
|
|
4001
|
+
* 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.
|
|
4002
|
+
* @example false
|
|
4003
|
+
*/
|
|
4004
|
+
invoice_requires_successful_payment?: boolean;
|
|
3943
4005
|
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
3944
4006
|
recurring_transaction_rules?: {
|
|
3945
4007
|
/**
|
|
@@ -3999,6 +4061,21 @@ export interface WalletObject {
|
|
|
3999
4061
|
* @example "2022-04-29T08:59:51Z"
|
|
4000
4062
|
*/
|
|
4001
4063
|
created_at: string;
|
|
4064
|
+
/**
|
|
4065
|
+
* 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.
|
|
4066
|
+
* @example false
|
|
4067
|
+
*/
|
|
4068
|
+
invoice_requires_successful_payment?: boolean;
|
|
4069
|
+
/**
|
|
4070
|
+
* This 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.
|
|
4071
|
+
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
4072
|
+
*/
|
|
4073
|
+
transaction_metadata?: {
|
|
4074
|
+
/** The unique identifier for the attribute. */
|
|
4075
|
+
key?: string;
|
|
4076
|
+
/** The value associated with the key. */
|
|
4077
|
+
value?: string;
|
|
4078
|
+
}[];
|
|
4002
4079
|
}[];
|
|
4003
4080
|
/**
|
|
4004
4081
|
* The wallet ongoing balance expressed in cents.
|
|
@@ -4053,6 +4130,21 @@ export interface WalletTransactionCreateInput {
|
|
|
4053
4130
|
* @example "5.0"
|
|
4054
4131
|
*/
|
|
4055
4132
|
voided_credits?: string;
|
|
4133
|
+
/**
|
|
4134
|
+
* 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.
|
|
4135
|
+
* @example false
|
|
4136
|
+
*/
|
|
4137
|
+
invoice_requires_successful_payment?: boolean;
|
|
4138
|
+
/**
|
|
4139
|
+
* This optional field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.
|
|
4140
|
+
* @example [{"key":"example key","value":"example value"},{"key":"another key","value":"another value"}]
|
|
4141
|
+
*/
|
|
4142
|
+
metadata?: {
|
|
4143
|
+
/** The unique identifier for the attribute. */
|
|
4144
|
+
key?: string;
|
|
4145
|
+
/** The value associated with the key. */
|
|
4146
|
+
value?: string;
|
|
4147
|
+
}[];
|
|
4056
4148
|
};
|
|
4057
4149
|
}
|
|
4058
4150
|
export interface WalletTransactionObject {
|
|
@@ -4073,6 +4165,11 @@ export interface WalletTransactionObject {
|
|
|
4073
4165
|
* @example "settled"
|
|
4074
4166
|
*/
|
|
4075
4167
|
status: "pending" | "settled";
|
|
4168
|
+
/**
|
|
4169
|
+
* The source field represents the origin or trigger of the wallet transaction. Possible values are `manual`, `interval`. `threshold`
|
|
4170
|
+
* @example "manual"
|
|
4171
|
+
*/
|
|
4172
|
+
source?: "manual" | "interval" | "threshold";
|
|
4076
4173
|
/**
|
|
4077
4174
|
* The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.
|
|
4078
4175
|
* @example "purchased"
|
|
@@ -4095,6 +4192,21 @@ export interface WalletTransactionObject {
|
|
|
4095
4192
|
* @example "100.0"
|
|
4096
4193
|
*/
|
|
4097
4194
|
credit_amount: string;
|
|
4195
|
+
/**
|
|
4196
|
+
* 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.
|
|
4197
|
+
* @example false
|
|
4198
|
+
*/
|
|
4199
|
+
invoice_requires_successful_payment?: boolean;
|
|
4200
|
+
/**
|
|
4201
|
+
* This field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.
|
|
4202
|
+
* @example [{"key":"example key","value":"example value"},{"key":"another key","value":"another value"}]
|
|
4203
|
+
*/
|
|
4204
|
+
metadata?: {
|
|
4205
|
+
/** The unique identifier for the attribute. */
|
|
4206
|
+
key?: string;
|
|
4207
|
+
/** The value associated with the key. */
|
|
4208
|
+
value?: string;
|
|
4209
|
+
}[];
|
|
4098
4210
|
/**
|
|
4099
4211
|
* The date when wallet transaction is settled, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
4100
4212
|
* @format date-time
|
|
@@ -4127,6 +4239,11 @@ export interface WalletUpdateInput {
|
|
|
4127
4239
|
* @example "2022-07-07T23:59:59Z"
|
|
4128
4240
|
*/
|
|
4129
4241
|
expiration_at?: string | null;
|
|
4242
|
+
/**
|
|
4243
|
+
* 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.
|
|
4244
|
+
* @example false
|
|
4245
|
+
*/
|
|
4246
|
+
invoice_requires_successful_payment?: boolean;
|
|
4130
4247
|
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
4131
4248
|
recurring_transaction_rules?: {
|
|
4132
4249
|
/**
|
|
@@ -4180,6 +4297,21 @@ export interface WalletUpdateInput {
|
|
|
4180
4297
|
* @example "200.0"
|
|
4181
4298
|
*/
|
|
4182
4299
|
target_ongoing_balance?: string;
|
|
4300
|
+
/**
|
|
4301
|
+
* 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.
|
|
4302
|
+
* @example false
|
|
4303
|
+
*/
|
|
4304
|
+
invoice_requires_successful_payment?: boolean;
|
|
4305
|
+
/**
|
|
4306
|
+
* 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.
|
|
4307
|
+
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
4308
|
+
*/
|
|
4309
|
+
transaction_metadata?: {
|
|
4310
|
+
/** The unique identifier for the attribute. */
|
|
4311
|
+
key?: string;
|
|
4312
|
+
/** The value associated with the key. */
|
|
4313
|
+
value?: string;
|
|
4314
|
+
}[];
|
|
4183
4315
|
}[];
|
|
4184
4316
|
};
|
|
4185
4317
|
}
|
|
@@ -4308,7 +4440,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
4308
4440
|
}
|
|
4309
4441
|
/**
|
|
4310
4442
|
* @title Lago API documentation
|
|
4311
|
-
* @version 1.
|
|
4443
|
+
* @version 1.9.0
|
|
4312
4444
|
* @license AGPLv3
|
|
4313
4445
|
* @baseUrl https://{region}.getlago.com/api/v1
|
|
4314
4446
|
* @externalDocs https://github.com/getlago
|
package/script/openapi/client.js
CHANGED
|
@@ -152,7 +152,7 @@ class HttpClient {
|
|
|
152
152
|
exports.HttpClient = HttpClient;
|
|
153
153
|
/**
|
|
154
154
|
* @title Lago API documentation
|
|
155
|
-
* @version 1.
|
|
155
|
+
* @version 1.9.0
|
|
156
156
|
* @license AGPLv3
|
|
157
157
|
* @baseUrl https://{region}.getlago.com/api/v1
|
|
158
158
|
* @externalDocs https://github.com/getlago
|