lago-javascript-client 1.27.1 → 1.30.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.26.0
151
+ * @version 1.28.1
152
152
  * @license AGPLv3
153
153
  * @baseUrl https://api.getlago.com/api/v1
154
154
  * @externalDocs https://github.com/getlago
@@ -174,6 +174,24 @@ export class Api extends HttpClient {
174
174
  format: "json",
175
175
  ...params,
176
176
  }),
177
+ /**
178
+ * @description This endpoint is used to create a new billing entity
179
+ *
180
+ * @tags billing_entities
181
+ * @name CreateBillingEntity
182
+ * @summary Create a billing entity
183
+ * @request POST:/billing_entities
184
+ * @secure
185
+ */
186
+ createBillingEntity: (data, params = {}) => this.request({
187
+ path: `/billing_entities`,
188
+ method: "POST",
189
+ body: data,
190
+ secure: true,
191
+ type: ContentType.Json,
192
+ format: "json",
193
+ ...params,
194
+ }),
177
195
  /**
178
196
  * @description This endpoint returns a specific billing entity by its code
179
197
  *
@@ -190,6 +208,59 @@ export class Api extends HttpClient {
190
208
  format: "json",
191
209
  ...params,
192
210
  }),
211
+ /**
212
+ * @description This endpoint is used to update an existing billing entity
213
+ *
214
+ * @tags billing_entities
215
+ * @name UpdateBillingEntity
216
+ * @summary Update a billing entity
217
+ * @request PUT:/billing_entities/{code}
218
+ * @secure
219
+ */
220
+ updateBillingEntity: (code, data, params = {}) => this.request({
221
+ path: `/billing_entities/${code}`,
222
+ method: "PUT",
223
+ body: data,
224
+ secure: true,
225
+ type: ContentType.Json,
226
+ format: "json",
227
+ ...params,
228
+ }),
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
+ }),
193
264
  };
194
265
  addOns = {
195
266
  /**
@@ -1516,9 +1587,10 @@ export class Api extends HttpClient {
1516
1587
  * @request GET:/subscriptions/{external_id}
1517
1588
  * @secure
1518
1589
  */
1519
- findSubscription: (externalId, params = {}) => this.request({
1590
+ findSubscription: (externalId, query, params = {}) => this.request({
1520
1591
  path: `/subscriptions/${externalId}`,
1521
1592
  method: "GET",
1593
+ query: query,
1522
1594
  secure: true,
1523
1595
  format: "json",
1524
1596
  ...params,
@@ -1563,7 +1635,7 @@ export class Api extends HttpClient {
1563
1635
  *
1564
1636
  * @tags subscriptions
1565
1637
  * @name GetSubscriptionLifetimeUsage
1566
- * @summary Retrive subscription lifetime usage
1638
+ * @summary Retrieve subscription lifetime usage
1567
1639
  * @request GET:/subscriptions/{external_id}/lifetime_usage
1568
1640
  * @secure
1569
1641
  */
@@ -1592,6 +1664,90 @@ export class Api extends HttpClient {
1592
1664
  format: "json",
1593
1665
  ...params,
1594
1666
  }),
1667
+ /**
1668
+ * @description This endpoint enables the retrieval of all alerts for a subscription.
1669
+ *
1670
+ * @tags subscriptions
1671
+ * @name GetSubscriptionAlerts
1672
+ * @summary List subscription alerts
1673
+ * @request GET:/subscriptions/{external_id}/alerts
1674
+ * @secure
1675
+ */
1676
+ getSubscriptionAlerts: (externalId, params = {}) => this.request({
1677
+ path: `/subscriptions/${externalId}/alerts`,
1678
+ method: "GET",
1679
+ secure: true,
1680
+ format: "json",
1681
+ ...params,
1682
+ }),
1683
+ /**
1684
+ * @description This endpoint allows you to create a new alert for a subscription.
1685
+ *
1686
+ * @tags subscriptions
1687
+ * @name CreateSubscriptionAlert
1688
+ * @summary Create a subscription alert
1689
+ * @request POST:/subscriptions/{external_id}/alerts
1690
+ * @secure
1691
+ */
1692
+ createSubscriptionAlert: (externalId, data, params = {}) => this.request({
1693
+ path: `/subscriptions/${externalId}/alerts`,
1694
+ method: "POST",
1695
+ body: data,
1696
+ secure: true,
1697
+ type: ContentType.Json,
1698
+ format: "json",
1699
+ ...params,
1700
+ }),
1701
+ /**
1702
+ * @description This endpoint enables the retrieval of a specific alert for a subscription.
1703
+ *
1704
+ * @tags subscriptions
1705
+ * @name GetSubscriptionAlert
1706
+ * @summary Retrieve a subscription alert
1707
+ * @request GET:/subscriptions/{external_id}/alerts/{code}
1708
+ * @secure
1709
+ */
1710
+ getSubscriptionAlert: (externalId, code, params = {}) => this.request({
1711
+ path: `/subscriptions/${externalId}/alerts/${code}`,
1712
+ method: "GET",
1713
+ secure: true,
1714
+ format: "json",
1715
+ ...params,
1716
+ }),
1717
+ /**
1718
+ * @description This endpoint allows you to update an existing alert for a subscription.
1719
+ *
1720
+ * @tags subscriptions
1721
+ * @name UpdateSubscriptionAlert
1722
+ * @summary Update a subscription alert
1723
+ * @request PUT:/subscriptions/{external_id}/alerts/{code}
1724
+ * @secure
1725
+ */
1726
+ updateSubscriptionAlert: (externalId, code, data, params = {}) => this.request({
1727
+ path: `/subscriptions/${externalId}/alerts/${code}`,
1728
+ method: "PUT",
1729
+ body: data,
1730
+ secure: true,
1731
+ type: ContentType.Json,
1732
+ format: "json",
1733
+ ...params,
1734
+ }),
1735
+ /**
1736
+ * @description This endpoint allows you to delete an existing alert for a subscription.
1737
+ *
1738
+ * @tags subscriptions
1739
+ * @name DeleteSubscriptionAlert
1740
+ * @summary Delete a subscription alert
1741
+ * @request DELETE:/subscriptions/{external_id}/alerts/{code}
1742
+ * @secure
1743
+ */
1744
+ deleteSubscriptionAlert: (externalId, code, params = {}) => this.request({
1745
+ path: `/subscriptions/${externalId}/alerts/${code}`,
1746
+ method: "DELETE",
1747
+ secure: true,
1748
+ format: "json",
1749
+ ...params,
1750
+ }),
1595
1751
  };
1596
1752
  taxes = {
1597
1753
  /**
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.27.1",
6
+ "version": "v1.30.0",
7
7
  "description": "Lago JavaScript API Client",
8
8
  "repository": {
9
9
  "type": "git",