lago-javascript-client 1.6.0 → 1.7.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 +141 -240
- package/esm/openapi/client.js +34 -19
- package/package.json +1 -1
- package/script/openapi/client.d.ts +141 -240
- package/script/openapi/client.js +34 -19
package/esm/openapi/client.d.ts
CHANGED
|
@@ -399,8 +399,6 @@ export interface BillableMetricObject {
|
|
|
399
399
|
* @example "seconds"
|
|
400
400
|
*/
|
|
401
401
|
weighted_interval?: "seconds" | null;
|
|
402
|
-
/** Group with one or two dimensions, used to apply differentiated pricing based on additional properties of the billable metric. */
|
|
403
|
-
group?: BillableMetricGroup;
|
|
404
402
|
filters?: BillableMetricFilterObject[];
|
|
405
403
|
/**
|
|
406
404
|
* Number of active subscriptions using this billable metric.
|
|
@@ -458,8 +456,6 @@ export interface BillableMetricBaseInput {
|
|
|
458
456
|
* @example "seconds"
|
|
459
457
|
*/
|
|
460
458
|
weighted_interval?: "seconds" | null;
|
|
461
|
-
/** Group with one or two dimensions, used to apply differentiated pricing based on additional properties of the billable metric. */
|
|
462
|
-
group?: BillableMetricGroup;
|
|
463
459
|
filters?: BillableMetricFilterInput[];
|
|
464
460
|
}
|
|
465
461
|
export interface BillableMetricCreateInput {
|
|
@@ -488,33 +484,6 @@ export interface BillableMetricFilterObject {
|
|
|
488
484
|
export interface BillableMetricUpdateInput {
|
|
489
485
|
billable_metric: BillableMetricBaseInput;
|
|
490
486
|
}
|
|
491
|
-
/**
|
|
492
|
-
* Group with one or two dimensions, used to apply differentiated pricing based on additional properties of the billable metric.
|
|
493
|
-
* @deprecated
|
|
494
|
-
*/
|
|
495
|
-
export interface BillableMetricGroup {
|
|
496
|
-
/**
|
|
497
|
-
* Name of the event property used to group values.
|
|
498
|
-
* @example "region"
|
|
499
|
-
*/
|
|
500
|
-
key: string;
|
|
501
|
-
/**
|
|
502
|
-
* Array of strings or objects representing all possible values.
|
|
503
|
-
* @example ["us-east-1","us-east-2","eu-west-1"]
|
|
504
|
-
*/
|
|
505
|
-
values: (string | {
|
|
506
|
-
/**
|
|
507
|
-
* Name of the event property used to group values.
|
|
508
|
-
* @example "region"
|
|
509
|
-
*/
|
|
510
|
-
key: string;
|
|
511
|
-
/**
|
|
512
|
-
* Array of strings representing all possible values.
|
|
513
|
-
* @example ["us-east-1","us-east-2","eu-west-1"]
|
|
514
|
-
*/
|
|
515
|
-
values: string[];
|
|
516
|
-
})[];
|
|
517
|
-
}
|
|
518
487
|
export interface BillableMetricsPaginated {
|
|
519
488
|
billable_metrics: BillableMetricObject[];
|
|
520
489
|
meta: PaginationMeta;
|
|
@@ -608,11 +577,6 @@ export interface ChargeObject {
|
|
|
608
577
|
properties?: ChargeProperties;
|
|
609
578
|
/** List of filters used to apply differentiated pricing based on additional event properties. */
|
|
610
579
|
filters?: ChargeFilterObject[];
|
|
611
|
-
/**
|
|
612
|
-
* All charge information, sorted by groups.
|
|
613
|
-
* @deprecated
|
|
614
|
-
*/
|
|
615
|
-
group_properties?: GroupPropertiesObject[];
|
|
616
580
|
/** All taxes applied to the charge. */
|
|
617
581
|
taxes?: TaxObject[];
|
|
618
582
|
}
|
|
@@ -1368,6 +1332,36 @@ export interface Customer {
|
|
|
1368
1332
|
customer: CustomerObjectExtended;
|
|
1369
1333
|
}
|
|
1370
1334
|
/** 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. */
|
|
1335
|
+
export interface Address {
|
|
1336
|
+
/**
|
|
1337
|
+
* The first line of the billing address
|
|
1338
|
+
* @example "5230 Penfield Ave"
|
|
1339
|
+
*/
|
|
1340
|
+
address_line1?: string | null;
|
|
1341
|
+
/**
|
|
1342
|
+
* The second line of the billing address
|
|
1343
|
+
* @example null
|
|
1344
|
+
*/
|
|
1345
|
+
address_line2?: string | null;
|
|
1346
|
+
/**
|
|
1347
|
+
* The city of the customer's billing address
|
|
1348
|
+
* @example "Woodland Hills"
|
|
1349
|
+
*/
|
|
1350
|
+
city?: string | null;
|
|
1351
|
+
/** Country code of the customer's billing address. Format must be ISO 3166 (alpha-2) */
|
|
1352
|
+
country?: Country;
|
|
1353
|
+
/**
|
|
1354
|
+
* The state of the customer's billing address
|
|
1355
|
+
* @example "CA"
|
|
1356
|
+
*/
|
|
1357
|
+
state?: string | null;
|
|
1358
|
+
/**
|
|
1359
|
+
* The zipcode of the customer's billing address
|
|
1360
|
+
* @example "91364"
|
|
1361
|
+
*/
|
|
1362
|
+
zipcode?: string | null;
|
|
1363
|
+
}
|
|
1364
|
+
/** 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. */
|
|
1371
1365
|
export interface CustomerBillingConfiguration {
|
|
1372
1366
|
/**
|
|
1373
1367
|
* The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items
|
|
@@ -1406,7 +1400,7 @@ export interface CustomerBillingConfiguration {
|
|
|
1406
1400
|
*/
|
|
1407
1401
|
document_locale?: string;
|
|
1408
1402
|
/**
|
|
1409
|
-
* Specifies the available payment methods that can be used for this customer when `payment_provider` is set to `stripe`. The `provider_payment_methods` field is an array that allows multiple payment options to be defined. If this field is not explicitly set,
|
|
1403
|
+
* Specifies the available payment methods that can be used for this customer when `payment_provider` is set to `stripe`. The `provider_payment_methods` field is an array that allows multiple payment options to be defined. If this field is not explicitly set, the payment methods will be set to `[card]`. For now, possible values are `card`, `sepa_debit`, `us_bank_account`, `bacs_debit` and `link`. Note that when `link` is selected, `card` should also be provided in the array.
|
|
1410
1404
|
* @example ["card","sepa_debit"]
|
|
1411
1405
|
*/
|
|
1412
1406
|
provider_payment_methods?: string[] | null;
|
|
@@ -1497,46 +1491,6 @@ export type CustomerChargeGroupedUsageObject = {
|
|
|
1497
1491
|
grouped_by?: Record<string, string>;
|
|
1498
1492
|
/** Array of filter object, representing multiple dimensions for a charge item. */
|
|
1499
1493
|
filters?: CustomerChargeFiltersUsageObject;
|
|
1500
|
-
/** Array of group object, representing multiple dimensions for a charge item. */
|
|
1501
|
-
groups?: CustomerChargeGroupsUsageObject;
|
|
1502
|
-
}[];
|
|
1503
|
-
/**
|
|
1504
|
-
* Array of group object, representing multiple dimensions for a charge item.
|
|
1505
|
-
* @deprecated
|
|
1506
|
-
*/
|
|
1507
|
-
export type CustomerChargeGroupsUsageObject = {
|
|
1508
|
-
/**
|
|
1509
|
-
* Unique identifier assigned to the group within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the group record within the Lago system.
|
|
1510
|
-
* @format uuid
|
|
1511
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1512
|
-
*/
|
|
1513
|
-
lago_id?: string;
|
|
1514
|
-
/**
|
|
1515
|
-
* The group key, only returned for groups with two dimensions.
|
|
1516
|
-
* @example null
|
|
1517
|
-
*/
|
|
1518
|
-
key?: string | null;
|
|
1519
|
-
/**
|
|
1520
|
-
* The group value.
|
|
1521
|
-
* @example "europe"
|
|
1522
|
-
*/
|
|
1523
|
-
value?: string;
|
|
1524
|
-
/**
|
|
1525
|
-
* The number of units consumed for a specific group related to a charge item.
|
|
1526
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
1527
|
-
* @example "0.9"
|
|
1528
|
-
*/
|
|
1529
|
-
units?: string;
|
|
1530
|
-
/**
|
|
1531
|
-
* The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts.
|
|
1532
|
-
* @example 10
|
|
1533
|
-
*/
|
|
1534
|
-
events_count?: number;
|
|
1535
|
-
/**
|
|
1536
|
-
* The amount in cents, tax excluded, consumed for a specific group related to a charge item.
|
|
1537
|
-
* @example 1000
|
|
1538
|
-
*/
|
|
1539
|
-
amount_cents?: number;
|
|
1540
1494
|
}[];
|
|
1541
1495
|
export interface CustomerChargeUsageObject {
|
|
1542
1496
|
/**
|
|
@@ -1598,12 +1552,10 @@ export interface CustomerChargeUsageObject {
|
|
|
1598
1552
|
* The aggregation type of the billable metric used for this charge. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`.
|
|
1599
1553
|
* @example "sum_agg"
|
|
1600
1554
|
*/
|
|
1601
|
-
aggregation_type: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg";
|
|
1555
|
+
aggregation_type: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg" | "weighted_sum_agg" | "latest_agg";
|
|
1602
1556
|
};
|
|
1603
1557
|
/** Array of filter object, representing multiple dimensions for a charge item. */
|
|
1604
1558
|
filters?: CustomerChargeFiltersUsageObject;
|
|
1605
|
-
/** Array of group object, representing multiple dimensions for a charge item. */
|
|
1606
|
-
groups: CustomerChargeGroupsUsageObject;
|
|
1607
1559
|
/** Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. */
|
|
1608
1560
|
grouped_usage?: CustomerChargeGroupedUsageObject;
|
|
1609
1561
|
}
|
|
@@ -1698,6 +1650,8 @@ export interface CustomerCreateInput {
|
|
|
1698
1650
|
net_payment_term?: number | null;
|
|
1699
1651
|
/** 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. */
|
|
1700
1652
|
billing_configuration?: CustomerBillingConfiguration;
|
|
1653
|
+
/** 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. */
|
|
1654
|
+
shipping_address?: Address;
|
|
1701
1655
|
integration_customers?: {
|
|
1702
1656
|
/**
|
|
1703
1657
|
* A unique identifier for the integration customer object in the Lago application.
|
|
@@ -1903,6 +1857,8 @@ export interface CustomerObject {
|
|
|
1903
1857
|
updated_at?: string;
|
|
1904
1858
|
/** 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. */
|
|
1905
1859
|
billing_configuration?: CustomerBillingConfiguration;
|
|
1860
|
+
/** 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. */
|
|
1861
|
+
shipping_address?: Address;
|
|
1906
1862
|
integration_customers?: IntegrationCustomer[];
|
|
1907
1863
|
metadata?: CustomerMetadata[];
|
|
1908
1864
|
}
|
|
@@ -1971,45 +1927,12 @@ export interface Event {
|
|
|
1971
1927
|
event: EventObject;
|
|
1972
1928
|
}
|
|
1973
1929
|
export interface EventBatchInput {
|
|
1974
|
-
events:
|
|
1975
|
-
}
|
|
1976
|
-
export interface EventEstimateFeesInput {
|
|
1977
|
-
event: {
|
|
1978
|
-
/**
|
|
1979
|
-
* 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.
|
|
1980
|
-
* @example "storage"
|
|
1981
|
-
*/
|
|
1982
|
-
code: string;
|
|
1983
|
-
/**
|
|
1984
|
-
* The customer external unique identifier (provided by your own application). This field is optional if you send the `external_subscription_id`, targeting a specific subscription.
|
|
1985
|
-
* This field is deprecated and is no longer supported or maintained. Please use the `external_subscription_id` instead.
|
|
1986
|
-
* @deprecated
|
|
1987
|
-
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
1988
|
-
*/
|
|
1989
|
-
external_customer_id?: string;
|
|
1990
|
-
/**
|
|
1991
|
-
* The unique identifier of the subscription within your application. It is a mandatory field when the customer possesses multiple subscriptions or when the `external_customer_id` is not provided.
|
|
1992
|
-
* @example "sub_1234567890"
|
|
1993
|
-
*/
|
|
1994
|
-
external_subscription_id?: string;
|
|
1995
|
-
/** 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. */
|
|
1996
|
-
properties?: object;
|
|
1997
|
-
};
|
|
1998
|
-
}
|
|
1999
|
-
export interface EventInput {
|
|
2000
|
-
event: {
|
|
1930
|
+
events: {
|
|
2001
1931
|
/**
|
|
2002
1932
|
* 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.
|
|
2003
1933
|
* @example "transaction_1234567890"
|
|
2004
1934
|
*/
|
|
2005
1935
|
transaction_id: string;
|
|
2006
|
-
/**
|
|
2007
|
-
* The customer external unique identifier (provided by your own application). This field is optional if you send the `external_subscription_id`, targeting a specific subscription.
|
|
2008
|
-
* This field is deprecated and is no longer supported or maintained. Please use the `external_subscription_id` instead.
|
|
2009
|
-
* @deprecated
|
|
2010
|
-
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
2011
|
-
*/
|
|
2012
|
-
external_customer_id?: string;
|
|
2013
1936
|
/**
|
|
2014
1937
|
* The unique identifier of the subscription within your application. It is a mandatory field when the customer possesses multiple subscriptions or when the `external_customer_id` is not provided.
|
|
2015
1938
|
* @example "sub_1234567890"
|
|
@@ -2032,8 +1955,27 @@ export interface EventInput {
|
|
|
2032
1955
|
* @example {"gb":10}
|
|
2033
1956
|
*/
|
|
2034
1957
|
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;
|
|
2035
1974
|
};
|
|
2036
1975
|
}
|
|
1976
|
+
export interface EventInput {
|
|
1977
|
+
event: any;
|
|
1978
|
+
}
|
|
2037
1979
|
export interface EventObject {
|
|
2038
1980
|
/**
|
|
2039
1981
|
* 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
|
|
@@ -2052,13 +1994,6 @@ export interface EventObject {
|
|
|
2052
1994
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2053
1995
|
*/
|
|
2054
1996
|
lago_customer_id: string | null;
|
|
2055
|
-
/**
|
|
2056
|
-
* The customer external unique identifier (provided by your own application). This field is optional if you send the `external_subscription_id`, targeting a specific subscription.
|
|
2057
|
-
* This field is deprecated and is no longer supported or maintained. Please use the `external_subscription_id` instead.
|
|
2058
|
-
* @deprecated
|
|
2059
|
-
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
2060
|
-
*/
|
|
2061
|
-
external_customer_id: string | null;
|
|
2062
1997
|
/**
|
|
2063
1998
|
* 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.
|
|
2064
1999
|
* @example "storage"
|
|
@@ -2089,7 +2024,7 @@ export interface EventObject {
|
|
|
2089
2024
|
* The unique identifier of the subscription within your application. It is a mandatory field when the customer possesses multiple subscriptions or when the `external_customer_id` is not provided.
|
|
2090
2025
|
* @example "sub_1234567890"
|
|
2091
2026
|
*/
|
|
2092
|
-
external_subscription_id: string
|
|
2027
|
+
external_subscription_id: string;
|
|
2093
2028
|
/**
|
|
2094
2029
|
* The creation date of the event's record in the Lago application, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). It provides the precise timestamp of when the event's record was created within the Lago application
|
|
2095
2030
|
* @format date-time
|
|
@@ -2115,13 +2050,6 @@ export interface FeeObject {
|
|
|
2115
2050
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2116
2051
|
*/
|
|
2117
2052
|
lago_id?: string | null;
|
|
2118
|
-
/**
|
|
2119
|
-
* Unique identifier assigned to the group that the fee belongs to
|
|
2120
|
-
* @deprecated
|
|
2121
|
-
* @format uuid
|
|
2122
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2123
|
-
*/
|
|
2124
|
-
lago_group_id?: string | null;
|
|
2125
2053
|
/**
|
|
2126
2054
|
* Unique identifier assigned to the charge filter that the fee belongs to
|
|
2127
2055
|
* @format uuid
|
|
@@ -2469,12 +2397,6 @@ export interface FeeObject {
|
|
|
2469
2397
|
filter_invoice_display_name?: string;
|
|
2470
2398
|
/** Key value list of event properties */
|
|
2471
2399
|
filters?: Record<string, string[]>;
|
|
2472
|
-
/**
|
|
2473
|
-
* 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.
|
|
2474
|
-
* @deprecated
|
|
2475
|
-
* @example "Transactions - ACH"
|
|
2476
|
-
*/
|
|
2477
|
-
group_invoice_display_name?: string;
|
|
2478
2400
|
/**
|
|
2479
2401
|
* Unique identifier of the fee item, created by Lago. It can be the identifier of the `add-on`, the identifier of the `charge`, the identifier of the `credit` or the identifier of the `subscription`.
|
|
2480
2402
|
* @format uuid
|
|
@@ -2517,49 +2439,17 @@ export interface GrossRevenueObject {
|
|
|
2517
2439
|
* The total amount of revenue for a period, expressed in cents.
|
|
2518
2440
|
* @example 50000
|
|
2519
2441
|
*/
|
|
2520
|
-
amount_cents
|
|
2442
|
+
amount_cents: number;
|
|
2521
2443
|
/** The currency of revenue analytics. Format must be ISO 4217. */
|
|
2522
|
-
currency
|
|
2523
|
-
}
|
|
2524
|
-
export interface GrossRevenues {
|
|
2525
|
-
gross_revenues: GrossRevenueObject[];
|
|
2526
|
-
}
|
|
2527
|
-
export interface GroupObject {
|
|
2528
|
-
/**
|
|
2529
|
-
* Unique identifier of a specific group associated with the billable metric.
|
|
2530
|
-
* @format uuid
|
|
2531
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2532
|
-
*/
|
|
2533
|
-
lago_id: string;
|
|
2534
|
-
/**
|
|
2535
|
-
* Key of a specific group associated with the billable metric.
|
|
2536
|
-
* @example "region"
|
|
2537
|
-
*/
|
|
2538
|
-
key: string;
|
|
2539
|
-
/**
|
|
2540
|
-
* One of the values for a specific group associated with the billable metric.
|
|
2541
|
-
* @example "us-east-1"
|
|
2542
|
-
*/
|
|
2543
|
-
value: string;
|
|
2544
|
-
}
|
|
2545
|
-
export interface GroupPropertiesObject {
|
|
2546
|
-
/**
|
|
2547
|
-
* Unique identifier of a billable metric group, created by Lago.
|
|
2548
|
-
* @format uuid
|
|
2549
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2550
|
-
*/
|
|
2551
|
-
group_id: string;
|
|
2444
|
+
currency: Currency;
|
|
2552
2445
|
/**
|
|
2553
|
-
*
|
|
2554
|
-
* @example
|
|
2446
|
+
* Contains invoices count.
|
|
2447
|
+
* @example 10
|
|
2555
2448
|
*/
|
|
2556
|
-
|
|
2557
|
-
/** List of all thresholds utilized for calculating a charge, scoped by groups used as dimensions for a single charge. */
|
|
2558
|
-
values: ChargeProperties;
|
|
2449
|
+
invoices_count: number;
|
|
2559
2450
|
}
|
|
2560
|
-
export interface
|
|
2561
|
-
|
|
2562
|
-
meta: PaginationMeta;
|
|
2451
|
+
export interface GrossRevenues {
|
|
2452
|
+
gross_revenues: GrossRevenueObject[];
|
|
2563
2453
|
}
|
|
2564
2454
|
/** Minimum commitment for this plan. */
|
|
2565
2455
|
export type MinimumCommitmentInput = {
|
|
@@ -2674,7 +2564,7 @@ export interface InvoiceCollectionObject {
|
|
|
2674
2564
|
* The total amount of revenue for a period, expressed in cents.
|
|
2675
2565
|
* @example 50000
|
|
2676
2566
|
*/
|
|
2677
|
-
amount_cents
|
|
2567
|
+
amount_cents?: number;
|
|
2678
2568
|
/** The currency of revenue analytics. Format must be ISO 4217. */
|
|
2679
2569
|
currency?: Currency;
|
|
2680
2570
|
}
|
|
@@ -3150,6 +3040,28 @@ export interface OrganizationUpdateInput {
|
|
|
3150
3040
|
billing_configuration?: OrganizationBillingConfiguration;
|
|
3151
3041
|
};
|
|
3152
3042
|
}
|
|
3043
|
+
export interface OverdueBalanceObject {
|
|
3044
|
+
/**
|
|
3045
|
+
* Identifies the month to analyze revenue.
|
|
3046
|
+
* @example "2023-11-01T00:00:00.000Z"
|
|
3047
|
+
*/
|
|
3048
|
+
month: string;
|
|
3049
|
+
/**
|
|
3050
|
+
* The total amount of revenue for a period, expressed in cents.
|
|
3051
|
+
* @example 50000
|
|
3052
|
+
*/
|
|
3053
|
+
amount_cents: number;
|
|
3054
|
+
/** The currency of revenue analytics. Format must be ISO 4217. */
|
|
3055
|
+
currency: Currency;
|
|
3056
|
+
/**
|
|
3057
|
+
* The Lago invoice IDs associated with the revenue.
|
|
3058
|
+
* @example ["5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"]
|
|
3059
|
+
*/
|
|
3060
|
+
lago_invoice_ids: string[];
|
|
3061
|
+
}
|
|
3062
|
+
export interface OverdueBalances {
|
|
3063
|
+
overdue_balances: OverdueBalanceObject[];
|
|
3064
|
+
}
|
|
3153
3065
|
export interface PaginationMeta {
|
|
3154
3066
|
/**
|
|
3155
3067
|
* Current page.
|
|
@@ -3238,7 +3150,7 @@ export interface PlanCreateInput {
|
|
|
3238
3150
|
minimum_commitment?: MinimumCommitmentInput;
|
|
3239
3151
|
/**
|
|
3240
3152
|
* Additional usage-based charges for this plan.
|
|
3241
|
-
* @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},"
|
|
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"}}]
|
|
3242
3154
|
*/
|
|
3243
3155
|
charges?: {
|
|
3244
3156
|
/**
|
|
@@ -3283,19 +3195,6 @@ export interface PlanCreateInput {
|
|
|
3283
3195
|
min_amount_cents?: number;
|
|
3284
3196
|
/** List of all thresholds utilized for calculating the charge. */
|
|
3285
3197
|
properties?: ChargeProperties;
|
|
3286
|
-
/**
|
|
3287
|
-
* All charge information, sorted by groups.
|
|
3288
|
-
* @deprecated
|
|
3289
|
-
*/
|
|
3290
|
-
group_properties?: {
|
|
3291
|
-
/**
|
|
3292
|
-
* Unique identifier of a billable metric group, created by Lago.
|
|
3293
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3294
|
-
*/
|
|
3295
|
-
group_id: string;
|
|
3296
|
-
/** List of all thresholds utilized for calculating a charge, scoped by groups used as dimensions for a single charge. */
|
|
3297
|
-
values: ChargeProperties;
|
|
3298
|
-
}[];
|
|
3299
3198
|
/** List of filters used to apply differentiated pricing based on additional event properties. */
|
|
3300
3199
|
filters?: ChargeFilterInput[];
|
|
3301
3200
|
/**
|
|
@@ -3367,19 +3266,6 @@ export interface PlanOverridesObject {
|
|
|
3367
3266
|
min_amount_cents?: number;
|
|
3368
3267
|
/** List of all thresholds utilized for calculating the charge. */
|
|
3369
3268
|
properties?: ChargeProperties;
|
|
3370
|
-
/**
|
|
3371
|
-
* All charge information, sorted by groups.
|
|
3372
|
-
* @deprecated
|
|
3373
|
-
*/
|
|
3374
|
-
group_properties?: {
|
|
3375
|
-
/**
|
|
3376
|
-
* Unique identifier of a billable metric group, created by Lago.
|
|
3377
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3378
|
-
*/
|
|
3379
|
-
group_id: string;
|
|
3380
|
-
/** List of all thresholds utilized for calculating a charge, scoped by groups used as dimensions for a single charge. */
|
|
3381
|
-
values: ChargeProperties;
|
|
3382
|
-
}[];
|
|
3383
3269
|
/** List of filters used to apply differentiated pricing based on additional event properties. */
|
|
3384
3270
|
filters?: ChargeFilterInput[];
|
|
3385
3271
|
/**
|
|
@@ -3447,7 +3333,7 @@ export interface PlanUpdateInput {
|
|
|
3447
3333
|
minimum_commitment?: MinimumCommitmentInput;
|
|
3448
3334
|
/**
|
|
3449
3335
|
* Additional usage-based charges for this plan.
|
|
3450
|
-
* @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},"
|
|
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"}}]
|
|
3451
3337
|
*/
|
|
3452
3338
|
charges?: {
|
|
3453
3339
|
/**
|
|
@@ -3498,19 +3384,6 @@ export interface PlanUpdateInput {
|
|
|
3498
3384
|
min_amount_cents?: number;
|
|
3499
3385
|
/** List of all thresholds utilized for calculating the charge. */
|
|
3500
3386
|
properties?: ChargeProperties;
|
|
3501
|
-
/**
|
|
3502
|
-
* All charge information, sorted by groups.
|
|
3503
|
-
* @deprecated
|
|
3504
|
-
*/
|
|
3505
|
-
group_properties?: {
|
|
3506
|
-
/**
|
|
3507
|
-
* Unique identifier of a billable metric group, created by Lago.
|
|
3508
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3509
|
-
*/
|
|
3510
|
-
group_id: string;
|
|
3511
|
-
/** List of all thresholds utilized for calculating a charge, scoped by groups used as dimensions for a single charge. */
|
|
3512
|
-
values: ChargeProperties;
|
|
3513
|
-
}[];
|
|
3514
3387
|
/** List of filters used to apply differentiated pricing based on additional event properties. */
|
|
3515
3388
|
filters?: ChargeFilterInput[];
|
|
3516
3389
|
/**
|
|
@@ -4435,7 +4308,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
4435
4308
|
}
|
|
4436
4309
|
/**
|
|
4437
4310
|
* @title Lago API documentation
|
|
4438
|
-
* @version 1.
|
|
4311
|
+
* @version 1.7.0
|
|
4439
4312
|
* @license AGPLv3
|
|
4440
4313
|
* @baseUrl https://{region}.getlago.com/api/v1
|
|
4441
4314
|
* @externalDocs https://github.com/getlago
|
|
@@ -4592,6 +4465,29 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4592
4465
|
*/
|
|
4593
4466
|
months?: number;
|
|
4594
4467
|
}, params?: RequestParams) => Promise<HttpResponse<Mrrs, ApiErrorUnauthorized>>;
|
|
4468
|
+
/**
|
|
4469
|
+
* @description Overdue balance is the total amount associated with overdue invoices (invoices with pending or failed payments which are past their due dates).
|
|
4470
|
+
*
|
|
4471
|
+
* @tags analytics
|
|
4472
|
+
* @name FindAllOverdueBalances
|
|
4473
|
+
* @summary List overdue balance
|
|
4474
|
+
* @request GET:/analytics/overdue_balance
|
|
4475
|
+
* @secure
|
|
4476
|
+
*/
|
|
4477
|
+
findAllOverdueBalances: (query?: {
|
|
4478
|
+
/** Currency of revenue analytics. Format must be ISO 4217. */
|
|
4479
|
+
currency?: Currency;
|
|
4480
|
+
/**
|
|
4481
|
+
* The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level.
|
|
4482
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
4483
|
+
*/
|
|
4484
|
+
external_customer_id?: string;
|
|
4485
|
+
/**
|
|
4486
|
+
* Show data only for given number of months.
|
|
4487
|
+
* @example 12
|
|
4488
|
+
*/
|
|
4489
|
+
months?: number;
|
|
4490
|
+
}, params?: RequestParams) => Promise<HttpResponse<OverdueBalances, ApiErrorUnauthorized>>;
|
|
4595
4491
|
};
|
|
4596
4492
|
appliedCoupons: {
|
|
4597
4493
|
/**
|
|
@@ -4698,28 +4594,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4698
4594
|
* @secure
|
|
4699
4595
|
*/
|
|
4700
4596
|
findBillableMetric: (code: string, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
4701
|
-
/**
|
|
4702
|
-
* @description This endpoint retrieves all groups for a billable metric.
|
|
4703
|
-
*
|
|
4704
|
-
* @tags billable_metrics
|
|
4705
|
-
* @name FindAllBillableMetricGroups
|
|
4706
|
-
* @summary Find a billable metric's groups
|
|
4707
|
-
* @request GET:/billable_metrics/{code}/groups
|
|
4708
|
-
* @deprecated
|
|
4709
|
-
* @secure
|
|
4710
|
-
*/
|
|
4711
|
-
findAllBillableMetricGroups: (code: string, query?: {
|
|
4712
|
-
/**
|
|
4713
|
-
* Page number.
|
|
4714
|
-
* @example 1
|
|
4715
|
-
*/
|
|
4716
|
-
page?: number;
|
|
4717
|
-
/**
|
|
4718
|
-
* Number of records per page.
|
|
4719
|
-
* @example 20
|
|
4720
|
-
*/
|
|
4721
|
-
per_page?: number;
|
|
4722
|
-
}, params?: RequestParams) => Promise<HttpResponse<GroupsPaginated, ApiErrorUnauthorized>>;
|
|
4723
4597
|
};
|
|
4724
4598
|
coupons: {
|
|
4725
4599
|
/**
|
|
@@ -5196,7 +5070,17 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5196
5070
|
* @request PUT:/fees/{lago_id}
|
|
5197
5071
|
* @secure
|
|
5198
5072
|
*/
|
|
5199
|
-
updateFee: (lagoId: string, data: FeeUpdateInput, params?: RequestParams) => Promise<HttpResponse<Fee, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
|
|
5073
|
+
updateFee: (lagoId: string, data: FeeUpdateInput, params?: RequestParams) => Promise<HttpResponse<Fee, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotAllowed | ApiErrorNotFound>>;
|
|
5074
|
+
/**
|
|
5075
|
+
* @description This endpoint is used for deleting a specific fee that has not yet been invoiced
|
|
5076
|
+
*
|
|
5077
|
+
* @tags fees
|
|
5078
|
+
* @name DeleteFee
|
|
5079
|
+
* @summary Delete a fee
|
|
5080
|
+
* @request DELETE:/fees/{lago_id}
|
|
5081
|
+
* @secure
|
|
5082
|
+
*/
|
|
5083
|
+
deleteFee: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Fee, ApiErrorUnauthorized | ApiErrorNotAllowed | ApiErrorNotFound>>;
|
|
5200
5084
|
};
|
|
5201
5085
|
invoices: {
|
|
5202
5086
|
/**
|
|
@@ -5255,6 +5139,23 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5255
5139
|
* @example true
|
|
5256
5140
|
*/
|
|
5257
5141
|
payment_overdue?: boolean;
|
|
5142
|
+
/**
|
|
5143
|
+
* Search invoices by id, number, customer name, customer external_id or customer email.
|
|
5144
|
+
* @example "Jane"
|
|
5145
|
+
*/
|
|
5146
|
+
search_term?: string;
|
|
5147
|
+
/**
|
|
5148
|
+
* Filter invoices by currency in. Possible values ISO 4217 currency codes.
|
|
5149
|
+
* @example "EUR"
|
|
5150
|
+
*/
|
|
5151
|
+
currency?: string;
|
|
5152
|
+
/**
|
|
5153
|
+
* Filter invoices with a payment dispute lost. Possible values are `true` or `false`.
|
|
5154
|
+
* @example true
|
|
5155
|
+
*/
|
|
5156
|
+
payment_dispute_lost?: boolean;
|
|
5157
|
+
/** Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off` or `advance_charges` */
|
|
5158
|
+
invoice_type?: "subscription" | "add_on" | "credit" | "one_off" | "advance_charges";
|
|
5258
5159
|
}, params?: RequestParams) => Promise<HttpResponse<InvoicesPaginated, ApiErrorUnauthorized>>;
|
|
5259
5160
|
/**
|
|
5260
5161
|
* @description This endpoint is used for updating an existing invoice.
|