lago-javascript-client 1.18.0 → 1.22.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.
@@ -148,7 +148,7 @@ export class HttpClient {
148
148
  }
149
149
  /**
150
150
  * @title Lago API documentation
151
- * @version 1.18.0
151
+ * @version 1.22.0
152
152
  * @license AGPLv3
153
153
  * @baseUrl https://api.getlago.com/api/v1
154
154
  * @externalDocs https://github.com/getlago
@@ -723,11 +723,11 @@ export class Api extends HttpClient {
723
723
  * @tags customers
724
724
  * @name FindCustomer
725
725
  * @summary Retrieve a customer
726
- * @request GET:/customers/{external_id}
726
+ * @request GET:/customers/{external_customer_id}
727
727
  * @secure
728
728
  */
729
- findCustomer: (externalId, params = {}) => this.request({
730
- path: `/customers/${externalId}`,
729
+ findCustomer: (externalCustomerId, params = {}) => this.request({
730
+ path: `/customers/${externalCustomerId}`,
731
731
  method: "GET",
732
732
  secure: true,
733
733
  format: "json",
@@ -739,11 +739,11 @@ export class Api extends HttpClient {
739
739
  * @tags customers
740
740
  * @name DestroyCustomer
741
741
  * @summary Delete a customer
742
- * @request DELETE:/customers/{external_id}
742
+ * @request DELETE:/customers/{external_customer_id}
743
743
  * @secure
744
744
  */
745
- destroyCustomer: (externalId, params = {}) => this.request({
746
- path: `/customers/${externalId}`,
745
+ destroyCustomer: (externalCustomerId, params = {}) => this.request({
746
+ path: `/customers/${externalCustomerId}`,
747
747
  method: "DELETE",
748
748
  secure: true,
749
749
  format: "json",
@@ -1155,6 +1155,24 @@ export class Api extends HttpClient {
1155
1155
  format: "json",
1156
1156
  ...params,
1157
1157
  }),
1158
+ /**
1159
+ * @description This endpoint is used for generating invoice preview.
1160
+ *
1161
+ * @tags invoices
1162
+ * @name InvoicePreview
1163
+ * @summary Create an invoice preview
1164
+ * @request POST:/invoices/preview
1165
+ * @secure
1166
+ */
1167
+ invoicePreview: (data, params = {}) => this.request({
1168
+ path: `/invoices/preview`,
1169
+ method: "POST",
1170
+ body: data,
1171
+ secure: true,
1172
+ type: ContentType.Json,
1173
+ format: "json",
1174
+ ...params,
1175
+ }),
1158
1176
  /**
1159
1177
  * @description This endpoint resends an invoice for collection and retry a payment.
1160
1178
  *
@@ -1244,6 +1262,43 @@ export class Api extends HttpClient {
1244
1262
  ...params,
1245
1263
  }),
1246
1264
  };
1265
+ payments = {
1266
+ /**
1267
+ * @description This endpoint is used to create a manual payment
1268
+ *
1269
+ * @tags payments
1270
+ * @name CreatePayment
1271
+ * @summary Create a payment
1272
+ * @request POST:/payments
1273
+ * @secure
1274
+ */
1275
+ createPayment: (data, params = {}) => this.request({
1276
+ path: `/payments`,
1277
+ method: "POST",
1278
+ body: data,
1279
+ secure: true,
1280
+ type: ContentType.Json,
1281
+ format: "json",
1282
+ ...params,
1283
+ }),
1284
+ /**
1285
+ * @description This endpoint is used to list all payments
1286
+ *
1287
+ * @tags payments
1288
+ * @name FindAllPayments
1289
+ * @summary List all payments
1290
+ * @request GET:/payments
1291
+ * @secure
1292
+ */
1293
+ findAllPayments: (query, params = {}) => this.request({
1294
+ path: `/payments`,
1295
+ method: "GET",
1296
+ query: query,
1297
+ secure: true,
1298
+ format: "json",
1299
+ ...params,
1300
+ }),
1301
+ };
1247
1302
  plans = {
1248
1303
  /**
1249
1304
  * @description This endpoint creates a plan with subscription and usage-based charges. It supports flexible billing cadence (in-advance or in-arrears) and allows for both recurring and metered charges.
@@ -1663,6 +1718,22 @@ export class Api extends HttpClient {
1663
1718
  format: "json",
1664
1719
  ...params,
1665
1720
  }),
1721
+ /**
1722
+ * @description This endpoint is used to retrieve a specific wallet transactions.
1723
+ *
1724
+ * @tags wallets
1725
+ * @name FindWalletTransaction
1726
+ * @summary Retrieve a wallet transaction
1727
+ * @request GET:/wallet_transactions/{lago_id}
1728
+ * @secure
1729
+ */
1730
+ findWalletTransaction: (lagoId, params = {}) => this.request({
1731
+ path: `/wallet_transactions/${lagoId}`,
1732
+ method: "GET",
1733
+ secure: true,
1734
+ format: "json",
1735
+ ...params,
1736
+ }),
1666
1737
  };
1667
1738
  webhooks = {
1668
1739
  /**
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.18.0",
6
+ "version": "v1.22.0",
7
7
  "description": "Lago JavaScript API Client",
8
8
  "repository": {
9
9
  "type": "git",