lago-javascript-client 1.5.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.
@@ -16,7 +16,7 @@ export var ContentType;
16
16
  ContentType["Text"] = "text/plain";
17
17
  })(ContentType || (ContentType = {}));
18
18
  export class HttpClient {
19
- baseUrl = "https://api.getlago.com/api/v1";
19
+ baseUrl = "https://{region}.getlago.com/api/v1";
20
20
  securityData = null;
21
21
  securityWorker;
22
22
  abortControllers = new Map();
@@ -148,9 +148,9 @@ export class HttpClient {
148
148
  }
149
149
  /**
150
150
  * @title Lago API documentation
151
- * @version 1.5.0
151
+ * @version 1.7.0
152
152
  * @license AGPLv3
153
- * @baseUrl https://api.getlago.com/api/v1
153
+ * @baseUrl https://{region}.getlago.com/api/v1
154
154
  * @externalDocs https://github.com/getlago
155
155
  * @contact <tech@getlago.com>
156
156
  *
@@ -313,6 +313,23 @@ export class Api extends HttpClient {
313
313
  format: "json",
314
314
  ...params,
315
315
  }),
316
+ /**
317
+ * @description Overdue balance is the total amount associated with overdue invoices (invoices with pending or failed payments which are past their due dates).
318
+ *
319
+ * @tags analytics
320
+ * @name FindAllOverdueBalances
321
+ * @summary List overdue balance
322
+ * @request GET:/analytics/overdue_balance
323
+ * @secure
324
+ */
325
+ findAllOverdueBalances: (query, params = {}) => this.request({
326
+ path: `/analytics/overdue_balance`,
327
+ method: "GET",
328
+ query: query,
329
+ secure: true,
330
+ format: "json",
331
+ ...params,
332
+ }),
316
333
  };
317
334
  appliedCoupons = {
318
335
  /**
@@ -437,24 +454,6 @@ export class Api extends HttpClient {
437
454
  format: "json",
438
455
  ...params,
439
456
  }),
440
- /**
441
- * @description This endpoint retrieves all groups for a billable metric.
442
- *
443
- * @tags billable_metrics
444
- * @name FindAllBillableMetricGroups
445
- * @summary Find a billable metric's groups
446
- * @request GET:/billable_metrics/{code}/groups
447
- * @deprecated
448
- * @secure
449
- */
450
- findAllBillableMetricGroups: (code, query, params = {}) => this.request({
451
- path: `/billable_metrics/${code}/groups`,
452
- method: "GET",
453
- query: query,
454
- secure: true,
455
- format: "json",
456
- ...params,
457
- }),
458
457
  };
459
458
  coupons = {
460
459
  /**
@@ -938,6 +937,22 @@ export class Api extends HttpClient {
938
937
  format: "json",
939
938
  ...params,
940
939
  }),
940
+ /**
941
+ * @description This endpoint is used for deleting a specific fee that has not yet been invoiced
942
+ *
943
+ * @tags fees
944
+ * @name DeleteFee
945
+ * @summary Delete a fee
946
+ * @request DELETE:/fees/{lago_id}
947
+ * @secure
948
+ */
949
+ deleteFee: (lagoId, params = {}) => this.request({
950
+ path: `/fees/${lagoId}`,
951
+ method: "DELETE",
952
+ secure: true,
953
+ format: "json",
954
+ ...params,
955
+ }),
941
956
  };
942
957
  invoices = {
943
958
  /**
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "./script/mod.js",
4
4
  "name": "lago-javascript-client",
5
5
  "sideEffects": false,
6
- "version": "v1.5.0",
6
+ "version": "v1.7.0",
7
7
  "description": "Lago JavaScript API Client",
8
8
  "repository": {
9
9
  "type": "git",