lago-javascript-client 1.28.1 → 1.31.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 +714 -96
- package/esm/openapi/client.js +162 -5
- package/package.json +1 -1
- package/script/openapi/client.d.ts +714 -96
- package/script/openapi/client.js +162 -5
package/esm/openapi/client.js
CHANGED
|
@@ -148,7 +148,7 @@ export class HttpClient {
|
|
|
148
148
|
}
|
|
149
149
|
/**
|
|
150
150
|
* @title Lago API documentation
|
|
151
|
-
* @version 1.
|
|
151
|
+
* @version 1.31.0
|
|
152
152
|
* @license AGPLv3
|
|
153
153
|
* @baseUrl https://api.getlago.com/api/v1
|
|
154
154
|
* @externalDocs https://github.com/getlago
|
|
@@ -227,6 +227,41 @@ export class Api extends HttpClient {
|
|
|
227
227
|
...params,
|
|
228
228
|
}),
|
|
229
229
|
};
|
|
230
|
+
activityLogs = {
|
|
231
|
+
/**
|
|
232
|
+
* @description This endpoint retrieves all existing activity logs that represent actions performed on application resources.
|
|
233
|
+
*
|
|
234
|
+
* @tags activity_logs
|
|
235
|
+
* @name FindAllActivityLogs
|
|
236
|
+
* @summary List all activity logs
|
|
237
|
+
* @request GET:/activity_logs
|
|
238
|
+
* @secure
|
|
239
|
+
*/
|
|
240
|
+
findAllActivityLogs: (query, params = {}) => this.request({
|
|
241
|
+
path: `/activity_logs`,
|
|
242
|
+
method: "GET",
|
|
243
|
+
query: query,
|
|
244
|
+
secure: true,
|
|
245
|
+
format: "json",
|
|
246
|
+
...params,
|
|
247
|
+
}),
|
|
248
|
+
/**
|
|
249
|
+
* @description This endpoint retrieves an existing activity log that represents an action performed on some resource. The activity log is identified by its unique activity_id.
|
|
250
|
+
*
|
|
251
|
+
* @tags activity_logs
|
|
252
|
+
* @name FindActivityLog
|
|
253
|
+
* @summary Retrieve an activity log
|
|
254
|
+
* @request GET:/activity_logs/{activity_id}
|
|
255
|
+
* @secure
|
|
256
|
+
*/
|
|
257
|
+
findActivityLog: (activityId, params = {}) => this.request({
|
|
258
|
+
path: `/activity_logs/${activityId}`,
|
|
259
|
+
method: "GET",
|
|
260
|
+
secure: true,
|
|
261
|
+
format: "json",
|
|
262
|
+
...params,
|
|
263
|
+
}),
|
|
264
|
+
};
|
|
230
265
|
addOns = {
|
|
231
266
|
/**
|
|
232
267
|
* @description This endpoint is used to create an add-on that can be then attached to a one-off invoice.
|
|
@@ -314,6 +349,41 @@ export class Api extends HttpClient {
|
|
|
314
349
|
...params,
|
|
315
350
|
}),
|
|
316
351
|
};
|
|
352
|
+
apiLogs = {
|
|
353
|
+
/**
|
|
354
|
+
* @description This endpoint retrieves all existing api logs that represent requests performed to Lago's API.
|
|
355
|
+
*
|
|
356
|
+
* @tags api_logs
|
|
357
|
+
* @name FindAllApiLogs
|
|
358
|
+
* @summary List all api logs
|
|
359
|
+
* @request GET:/api_logs
|
|
360
|
+
* @secure
|
|
361
|
+
*/
|
|
362
|
+
findAllApiLogs: (query, params = {}) => this.request({
|
|
363
|
+
path: `/api_logs`,
|
|
364
|
+
method: "GET",
|
|
365
|
+
query: query,
|
|
366
|
+
secure: true,
|
|
367
|
+
format: "json",
|
|
368
|
+
...params,
|
|
369
|
+
}),
|
|
370
|
+
/**
|
|
371
|
+
* @description This endpoint retrieves an existing api log that represents a request made to the API. The api log is identified by its unique request_id.
|
|
372
|
+
*
|
|
373
|
+
* @tags api_logs
|
|
374
|
+
* @name FindApiLog
|
|
375
|
+
* @summary Retrieve an api log
|
|
376
|
+
* @request GET:/api_logs/{request_id}
|
|
377
|
+
* @secure
|
|
378
|
+
*/
|
|
379
|
+
findApiLog: (requestId, params = {}) => this.request({
|
|
380
|
+
path: `/api_logs/${requestId}`,
|
|
381
|
+
method: "GET",
|
|
382
|
+
secure: true,
|
|
383
|
+
format: "json",
|
|
384
|
+
...params,
|
|
385
|
+
}),
|
|
386
|
+
};
|
|
317
387
|
analytics = {
|
|
318
388
|
/**
|
|
319
389
|
* @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.
|
|
@@ -1259,7 +1329,7 @@ export class Api extends HttpClient {
|
|
|
1259
1329
|
...params,
|
|
1260
1330
|
}),
|
|
1261
1331
|
/**
|
|
1262
|
-
* @description This endpoint is used for voiding an invoice.
|
|
1332
|
+
* @description This endpoint is used for voiding an invoice. • When no body parameters are provided, the invoice can be voided only if it is in a `finalized` status and its payment status is NOT `succeeded`. • When `generate_credit_note` is provided (optionally with `refund_amount` and/or `credit_amount`), this validation is bypassed: the invoice is forcibly voided and a credit note is generated. If the specified refund/credit amounts do not cover the full invoice total, the remainder is issued on a second credit note that is created and immediately voided.
|
|
1263
1333
|
*
|
|
1264
1334
|
* @tags invoices
|
|
1265
1335
|
* @name VoidInvoice
|
|
@@ -1267,10 +1337,12 @@ export class Api extends HttpClient {
|
|
|
1267
1337
|
* @request POST:/invoices/{lago_id}/void
|
|
1268
1338
|
* @secure
|
|
1269
1339
|
*/
|
|
1270
|
-
voidInvoice: (lagoId, params = {}) => this.request({
|
|
1340
|
+
voidInvoice: (lagoId, data, params = {}) => this.request({
|
|
1271
1341
|
path: `/invoices/${lagoId}/void`,
|
|
1272
1342
|
method: "POST",
|
|
1343
|
+
body: data,
|
|
1273
1344
|
secure: true,
|
|
1345
|
+
type: ContentType.Json,
|
|
1274
1346
|
format: "json",
|
|
1275
1347
|
...params,
|
|
1276
1348
|
}),
|
|
@@ -1552,9 +1624,10 @@ export class Api extends HttpClient {
|
|
|
1552
1624
|
* @request GET:/subscriptions/{external_id}
|
|
1553
1625
|
* @secure
|
|
1554
1626
|
*/
|
|
1555
|
-
findSubscription: (externalId, params = {}) => this.request({
|
|
1627
|
+
findSubscription: (externalId, query, params = {}) => this.request({
|
|
1556
1628
|
path: `/subscriptions/${externalId}`,
|
|
1557
1629
|
method: "GET",
|
|
1630
|
+
query: query,
|
|
1558
1631
|
secure: true,
|
|
1559
1632
|
format: "json",
|
|
1560
1633
|
...params,
|
|
@@ -1599,7 +1672,7 @@ export class Api extends HttpClient {
|
|
|
1599
1672
|
*
|
|
1600
1673
|
* @tags subscriptions
|
|
1601
1674
|
* @name GetSubscriptionLifetimeUsage
|
|
1602
|
-
* @summary
|
|
1675
|
+
* @summary Retrieve subscription lifetime usage
|
|
1603
1676
|
* @request GET:/subscriptions/{external_id}/lifetime_usage
|
|
1604
1677
|
* @secure
|
|
1605
1678
|
*/
|
|
@@ -1628,6 +1701,90 @@ export class Api extends HttpClient {
|
|
|
1628
1701
|
format: "json",
|
|
1629
1702
|
...params,
|
|
1630
1703
|
}),
|
|
1704
|
+
/**
|
|
1705
|
+
* @description This endpoint enables the retrieval of all alerts for a subscription.
|
|
1706
|
+
*
|
|
1707
|
+
* @tags subscriptions
|
|
1708
|
+
* @name GetSubscriptionAlerts
|
|
1709
|
+
* @summary List subscription alerts
|
|
1710
|
+
* @request GET:/subscriptions/{external_id}/alerts
|
|
1711
|
+
* @secure
|
|
1712
|
+
*/
|
|
1713
|
+
getSubscriptionAlerts: (externalId, params = {}) => this.request({
|
|
1714
|
+
path: `/subscriptions/${externalId}/alerts`,
|
|
1715
|
+
method: "GET",
|
|
1716
|
+
secure: true,
|
|
1717
|
+
format: "json",
|
|
1718
|
+
...params,
|
|
1719
|
+
}),
|
|
1720
|
+
/**
|
|
1721
|
+
* @description This endpoint allows you to create a new alert for a subscription.
|
|
1722
|
+
*
|
|
1723
|
+
* @tags subscriptions
|
|
1724
|
+
* @name CreateSubscriptionAlert
|
|
1725
|
+
* @summary Create a subscription alert
|
|
1726
|
+
* @request POST:/subscriptions/{external_id}/alerts
|
|
1727
|
+
* @secure
|
|
1728
|
+
*/
|
|
1729
|
+
createSubscriptionAlert: (externalId, data, params = {}) => this.request({
|
|
1730
|
+
path: `/subscriptions/${externalId}/alerts`,
|
|
1731
|
+
method: "POST",
|
|
1732
|
+
body: data,
|
|
1733
|
+
secure: true,
|
|
1734
|
+
type: ContentType.Json,
|
|
1735
|
+
format: "json",
|
|
1736
|
+
...params,
|
|
1737
|
+
}),
|
|
1738
|
+
/**
|
|
1739
|
+
* @description This endpoint enables the retrieval of a specific alert for a subscription.
|
|
1740
|
+
*
|
|
1741
|
+
* @tags subscriptions
|
|
1742
|
+
* @name GetSubscriptionAlert
|
|
1743
|
+
* @summary Retrieve a subscription alert
|
|
1744
|
+
* @request GET:/subscriptions/{external_id}/alerts/{code}
|
|
1745
|
+
* @secure
|
|
1746
|
+
*/
|
|
1747
|
+
getSubscriptionAlert: (externalId, code, params = {}) => this.request({
|
|
1748
|
+
path: `/subscriptions/${externalId}/alerts/${code}`,
|
|
1749
|
+
method: "GET",
|
|
1750
|
+
secure: true,
|
|
1751
|
+
format: "json",
|
|
1752
|
+
...params,
|
|
1753
|
+
}),
|
|
1754
|
+
/**
|
|
1755
|
+
* @description This endpoint allows you to update an existing alert for a subscription.
|
|
1756
|
+
*
|
|
1757
|
+
* @tags subscriptions
|
|
1758
|
+
* @name UpdateSubscriptionAlert
|
|
1759
|
+
* @summary Update a subscription alert
|
|
1760
|
+
* @request PUT:/subscriptions/{external_id}/alerts/{code}
|
|
1761
|
+
* @secure
|
|
1762
|
+
*/
|
|
1763
|
+
updateSubscriptionAlert: (externalId, code, data, params = {}) => this.request({
|
|
1764
|
+
path: `/subscriptions/${externalId}/alerts/${code}`,
|
|
1765
|
+
method: "PUT",
|
|
1766
|
+
body: data,
|
|
1767
|
+
secure: true,
|
|
1768
|
+
type: ContentType.Json,
|
|
1769
|
+
format: "json",
|
|
1770
|
+
...params,
|
|
1771
|
+
}),
|
|
1772
|
+
/**
|
|
1773
|
+
* @description This endpoint allows you to delete an existing alert for a subscription.
|
|
1774
|
+
*
|
|
1775
|
+
* @tags subscriptions
|
|
1776
|
+
* @name DeleteSubscriptionAlert
|
|
1777
|
+
* @summary Delete a subscription alert
|
|
1778
|
+
* @request DELETE:/subscriptions/{external_id}/alerts/{code}
|
|
1779
|
+
* @secure
|
|
1780
|
+
*/
|
|
1781
|
+
deleteSubscriptionAlert: (externalId, code, params = {}) => this.request({
|
|
1782
|
+
path: `/subscriptions/${externalId}/alerts/${code}`,
|
|
1783
|
+
method: "DELETE",
|
|
1784
|
+
secure: true,
|
|
1785
|
+
format: "json",
|
|
1786
|
+
...params,
|
|
1787
|
+
}),
|
|
1631
1788
|
};
|
|
1632
1789
|
taxes = {
|
|
1633
1790
|
/**
|