lago-javascript-client 0.51.0-beta → 0.53.0-beta
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 +521 -7
- package/esm/openapi/client.js +103 -1
- package/package.json +1 -1
- package/script/openapi/client.d.ts +521 -7
- package/script/openapi/client.js +103 -1
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 0.
|
|
155
|
+
* @version 0.53.0-beta
|
|
156
156
|
* @license AGPLv3
|
|
157
157
|
* @baseUrl https://api.getlago.com/api/v1
|
|
158
158
|
* @externalDocs https://github.com/getlago
|
|
@@ -248,6 +248,76 @@ class Api extends HttpClient {
|
|
|
248
248
|
...params,
|
|
249
249
|
}),
|
|
250
250
|
};
|
|
251
|
+
analytics = {
|
|
252
|
+
/**
|
|
253
|
+
* @description Gross revenue is the sum of monthly `finalized` invoice payments and fees paid in advance that are not invoiceable. This total is calculated after deducting taxes and discounts.
|
|
254
|
+
*
|
|
255
|
+
* @tags analytics
|
|
256
|
+
* @name FindAllGrossRevenues
|
|
257
|
+
* @summary List gross revenue
|
|
258
|
+
* @request GET:/analytics/gross_revenue
|
|
259
|
+
* @secure
|
|
260
|
+
*/
|
|
261
|
+
findAllGrossRevenues: (query, params = {}) => this.request({
|
|
262
|
+
path: `/analytics/gross_revenue`,
|
|
263
|
+
method: "GET",
|
|
264
|
+
query: query,
|
|
265
|
+
secure: true,
|
|
266
|
+
format: "json",
|
|
267
|
+
...params,
|
|
268
|
+
}),
|
|
269
|
+
/**
|
|
270
|
+
* @description Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`.
|
|
271
|
+
*
|
|
272
|
+
* @tags analytics
|
|
273
|
+
* @name FindAllInvoiceCollections
|
|
274
|
+
* @summary List of finalized invoices
|
|
275
|
+
* @request GET:/analytics/invoice_collection
|
|
276
|
+
* @secure
|
|
277
|
+
*/
|
|
278
|
+
findAllInvoiceCollections: (query, params = {}) => this.request({
|
|
279
|
+
path: `/analytics/invoice_collection`,
|
|
280
|
+
method: "GET",
|
|
281
|
+
query: query,
|
|
282
|
+
secure: true,
|
|
283
|
+
format: "json",
|
|
284
|
+
...params,
|
|
285
|
+
}),
|
|
286
|
+
/**
|
|
287
|
+
* @description Reports a monthly analysis focused on the revenue generated from all usage-based fees. It exclusively accounts for revenue that has been formally invoiced. Importantly, this report does not include revenue related to the usage in the current billing period, limiting its scope to previously invoiced amounts.
|
|
288
|
+
*
|
|
289
|
+
* @tags analytics
|
|
290
|
+
* @name FindAllInvoicedUsages
|
|
291
|
+
* @summary List usage revenue
|
|
292
|
+
* @request GET:/analytics/invoiced_usage
|
|
293
|
+
* @secure
|
|
294
|
+
*/
|
|
295
|
+
findAllInvoicedUsages: (query, params = {}) => this.request({
|
|
296
|
+
path: `/analytics/invoiced_usage`,
|
|
297
|
+
method: "GET",
|
|
298
|
+
query: query,
|
|
299
|
+
secure: true,
|
|
300
|
+
format: "json",
|
|
301
|
+
...params,
|
|
302
|
+
}),
|
|
303
|
+
/**
|
|
304
|
+
* @description This endpoint is used to list MRR.
|
|
305
|
+
*
|
|
306
|
+
* @tags analytics
|
|
307
|
+
* @name FindAllMrrs
|
|
308
|
+
* @summary List MRR
|
|
309
|
+
* @request GET:/analytics/mrr
|
|
310
|
+
* @secure
|
|
311
|
+
*/
|
|
312
|
+
findAllMrrs: (query, params = {}) => this.request({
|
|
313
|
+
path: `/analytics/mrr`,
|
|
314
|
+
method: "GET",
|
|
315
|
+
query: query,
|
|
316
|
+
secure: true,
|
|
317
|
+
format: "json",
|
|
318
|
+
...params,
|
|
319
|
+
}),
|
|
320
|
+
};
|
|
251
321
|
appliedCoupons = {
|
|
252
322
|
/**
|
|
253
323
|
* @description This endpoint is used to apply a specific coupon to a customer, before or during a subscription.
|
|
@@ -731,6 +801,22 @@ class Api extends HttpClient {
|
|
|
731
801
|
format: "json",
|
|
732
802
|
...params,
|
|
733
803
|
}),
|
|
804
|
+
/**
|
|
805
|
+
* @description This endpoint regenerates the Payment Provider Checkout URL of a Customer.
|
|
806
|
+
*
|
|
807
|
+
* @tags customers
|
|
808
|
+
* @name GenerateCustomerCheckoutUrl
|
|
809
|
+
* @summary Generate a Customer Payment Provider Checkout URL
|
|
810
|
+
* @request POST:/customers/{external_customer_id}/checkout_url
|
|
811
|
+
* @secure
|
|
812
|
+
*/
|
|
813
|
+
generateCustomerCheckoutUrl: (externalCustomerId, params = {}) => this.request({
|
|
814
|
+
path: `/customers/${externalCustomerId}/checkout_url`,
|
|
815
|
+
method: "POST",
|
|
816
|
+
secure: true,
|
|
817
|
+
format: "json",
|
|
818
|
+
...params,
|
|
819
|
+
}),
|
|
734
820
|
};
|
|
735
821
|
events = {
|
|
736
822
|
/**
|
|
@@ -990,6 +1076,22 @@ class Api extends HttpClient {
|
|
|
990
1076
|
secure: true,
|
|
991
1077
|
...params,
|
|
992
1078
|
}),
|
|
1079
|
+
/**
|
|
1080
|
+
* @description This endpoint is used for voiding an invoice. You can void an invoice only when it's in a `finalized` status, and the payment status is not `succeeded`.
|
|
1081
|
+
*
|
|
1082
|
+
* @tags invoices
|
|
1083
|
+
* @name VoidInvoice
|
|
1084
|
+
* @summary Void an invoice
|
|
1085
|
+
* @request POST:/invoices/{lago_id}/void
|
|
1086
|
+
* @secure
|
|
1087
|
+
*/
|
|
1088
|
+
voidInvoice: (lagoId, params = {}) => this.request({
|
|
1089
|
+
path: `/invoices/${lagoId}/void`,
|
|
1090
|
+
method: "POST",
|
|
1091
|
+
secure: true,
|
|
1092
|
+
format: "json",
|
|
1093
|
+
...params,
|
|
1094
|
+
}),
|
|
993
1095
|
};
|
|
994
1096
|
organizations = {
|
|
995
1097
|
/**
|