lago-javascript-client 1.30.0 → 1.32.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 +715 -168
- package/esm/openapi/client.js +77 -3
- package/package.json +1 -1
- package/script/openapi/client.d.ts +715 -168
- package/script/openapi/client.js +77 -3
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.31.0
|
|
156
156
|
* @license AGPLv3
|
|
157
157
|
* @baseUrl https://api.getlago.com/api/v1
|
|
158
158
|
* @externalDocs https://github.com/getlago
|
|
@@ -353,6 +353,41 @@ class Api extends HttpClient {
|
|
|
353
353
|
...params,
|
|
354
354
|
}),
|
|
355
355
|
};
|
|
356
|
+
apiLogs = {
|
|
357
|
+
/**
|
|
358
|
+
* @description This endpoint retrieves all existing api logs that represent requests performed to Lago's API.
|
|
359
|
+
*
|
|
360
|
+
* @tags api_logs
|
|
361
|
+
* @name FindAllApiLogs
|
|
362
|
+
* @summary List all api logs
|
|
363
|
+
* @request GET:/api_logs
|
|
364
|
+
* @secure
|
|
365
|
+
*/
|
|
366
|
+
findAllApiLogs: (query, params = {}) => this.request({
|
|
367
|
+
path: `/api_logs`,
|
|
368
|
+
method: "GET",
|
|
369
|
+
query: query,
|
|
370
|
+
secure: true,
|
|
371
|
+
format: "json",
|
|
372
|
+
...params,
|
|
373
|
+
}),
|
|
374
|
+
/**
|
|
375
|
+
* @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.
|
|
376
|
+
*
|
|
377
|
+
* @tags api_logs
|
|
378
|
+
* @name FindApiLog
|
|
379
|
+
* @summary Retrieve an api log
|
|
380
|
+
* @request GET:/api_logs/{request_id}
|
|
381
|
+
* @secure
|
|
382
|
+
*/
|
|
383
|
+
findApiLog: (requestId, params = {}) => this.request({
|
|
384
|
+
path: `/api_logs/${requestId}`,
|
|
385
|
+
method: "GET",
|
|
386
|
+
secure: true,
|
|
387
|
+
format: "json",
|
|
388
|
+
...params,
|
|
389
|
+
}),
|
|
390
|
+
};
|
|
356
391
|
analytics = {
|
|
357
392
|
/**
|
|
358
393
|
* @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.
|
|
@@ -992,6 +1027,7 @@ class Api extends HttpClient {
|
|
|
992
1027
|
body: data,
|
|
993
1028
|
secure: true,
|
|
994
1029
|
type: ContentType.Json,
|
|
1030
|
+
format: "json",
|
|
995
1031
|
...params,
|
|
996
1032
|
}),
|
|
997
1033
|
/**
|
|
@@ -1012,6 +1048,42 @@ class Api extends HttpClient {
|
|
|
1012
1048
|
format: "json",
|
|
1013
1049
|
...params,
|
|
1014
1050
|
}),
|
|
1051
|
+
/**
|
|
1052
|
+
* @description Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance standard or percentage charges
|
|
1053
|
+
*
|
|
1054
|
+
* @tags events
|
|
1055
|
+
* @name EventEstimateInstantFees
|
|
1056
|
+
* @summary Estimate instant fees for a pay in advance charge
|
|
1057
|
+
* @request POST:/events/estimate_instant_fees
|
|
1058
|
+
* @secure
|
|
1059
|
+
*/
|
|
1060
|
+
eventEstimateInstantFees: (data, params = {}) => this.request({
|
|
1061
|
+
path: `/events/estimate_instant_fees`,
|
|
1062
|
+
method: "POST",
|
|
1063
|
+
body: data,
|
|
1064
|
+
secure: true,
|
|
1065
|
+
type: ContentType.Json,
|
|
1066
|
+
format: "json",
|
|
1067
|
+
...params,
|
|
1068
|
+
}),
|
|
1069
|
+
/**
|
|
1070
|
+
* @description Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance standard or percentage charges
|
|
1071
|
+
*
|
|
1072
|
+
* @tags events
|
|
1073
|
+
* @name EventBatchEstimateInstantFees
|
|
1074
|
+
* @summary Batch estimate instant fees for a pay in advance charge
|
|
1075
|
+
* @request POST:/events/batch_estimate_instant_fees
|
|
1076
|
+
* @secure
|
|
1077
|
+
*/
|
|
1078
|
+
eventBatchEstimateInstantFees: (data, params = {}) => this.request({
|
|
1079
|
+
path: `/events/batch_estimate_instant_fees`,
|
|
1080
|
+
method: "POST",
|
|
1081
|
+
body: data,
|
|
1082
|
+
secure: true,
|
|
1083
|
+
type: ContentType.Json,
|
|
1084
|
+
format: "json",
|
|
1085
|
+
...params,
|
|
1086
|
+
}),
|
|
1015
1087
|
/**
|
|
1016
1088
|
* @description This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription.
|
|
1017
1089
|
*
|
|
@@ -1298,7 +1370,7 @@ class Api extends HttpClient {
|
|
|
1298
1370
|
...params,
|
|
1299
1371
|
}),
|
|
1300
1372
|
/**
|
|
1301
|
-
* @description This endpoint is used for voiding an invoice.
|
|
1373
|
+
* @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.
|
|
1302
1374
|
*
|
|
1303
1375
|
* @tags invoices
|
|
1304
1376
|
* @name VoidInvoice
|
|
@@ -1306,10 +1378,12 @@ class Api extends HttpClient {
|
|
|
1306
1378
|
* @request POST:/invoices/{lago_id}/void
|
|
1307
1379
|
* @secure
|
|
1308
1380
|
*/
|
|
1309
|
-
voidInvoice: (lagoId, params = {}) => this.request({
|
|
1381
|
+
voidInvoice: (lagoId, data, params = {}) => this.request({
|
|
1310
1382
|
path: `/invoices/${lagoId}/void`,
|
|
1311
1383
|
method: "POST",
|
|
1384
|
+
body: data,
|
|
1312
1385
|
secure: true,
|
|
1386
|
+
type: ContentType.Json,
|
|
1313
1387
|
format: "json",
|
|
1314
1388
|
...params,
|
|
1315
1389
|
}),
|