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.
@@ -152,7 +152,7 @@ class HttpClient {
152
152
  exports.HttpClient = HttpClient;
153
153
  /**
154
154
  * @title Lago API documentation
155
- * @version 1.26.0
155
+ * @version 1.28.1
156
156
  * @license AGPLv3
157
157
  * @baseUrl https://api.getlago.com/api/v1
158
158
  * @externalDocs https://github.com/getlago
@@ -178,6 +178,24 @@ class Api extends HttpClient {
178
178
  format: "json",
179
179
  ...params,
180
180
  }),
181
+ /**
182
+ * @description This endpoint is used to create a new billing entity
183
+ *
184
+ * @tags billing_entities
185
+ * @name CreateBillingEntity
186
+ * @summary Create a billing entity
187
+ * @request POST:/billing_entities
188
+ * @secure
189
+ */
190
+ createBillingEntity: (data, params = {}) => this.request({
191
+ path: `/billing_entities`,
192
+ method: "POST",
193
+ body: data,
194
+ secure: true,
195
+ type: ContentType.Json,
196
+ format: "json",
197
+ ...params,
198
+ }),
181
199
  /**
182
200
  * @description This endpoint returns a specific billing entity by its code
183
201
  *
@@ -194,6 +212,59 @@ class Api extends HttpClient {
194
212
  format: "json",
195
213
  ...params,
196
214
  }),
215
+ /**
216
+ * @description This endpoint is used to update an existing billing entity
217
+ *
218
+ * @tags billing_entities
219
+ * @name UpdateBillingEntity
220
+ * @summary Update a billing entity
221
+ * @request PUT:/billing_entities/{code}
222
+ * @secure
223
+ */
224
+ updateBillingEntity: (code, data, params = {}) => this.request({
225
+ path: `/billing_entities/${code}`,
226
+ method: "PUT",
227
+ body: data,
228
+ secure: true,
229
+ type: ContentType.Json,
230
+ format: "json",
231
+ ...params,
232
+ }),
233
+ };
234
+ activityLogs = {
235
+ /**
236
+ * @description This endpoint retrieves all existing activity logs that represent actions performed on application resources.
237
+ *
238
+ * @tags activity_logs
239
+ * @name FindAllActivityLogs
240
+ * @summary List all activity logs
241
+ * @request GET:/activity_logs
242
+ * @secure
243
+ */
244
+ findAllActivityLogs: (query, params = {}) => this.request({
245
+ path: `/activity_logs`,
246
+ method: "GET",
247
+ query: query,
248
+ secure: true,
249
+ format: "json",
250
+ ...params,
251
+ }),
252
+ /**
253
+ * @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.
254
+ *
255
+ * @tags activity_logs
256
+ * @name FindActivityLog
257
+ * @summary Retrieve an activity log
258
+ * @request GET:/activity_logs/{activity_id}
259
+ * @secure
260
+ */
261
+ findActivityLog: (activityId, params = {}) => this.request({
262
+ path: `/activity_logs/${activityId}`,
263
+ method: "GET",
264
+ secure: true,
265
+ format: "json",
266
+ ...params,
267
+ }),
197
268
  };
198
269
  addOns = {
199
270
  /**
@@ -1520,9 +1591,10 @@ class Api extends HttpClient {
1520
1591
  * @request GET:/subscriptions/{external_id}
1521
1592
  * @secure
1522
1593
  */
1523
- findSubscription: (externalId, params = {}) => this.request({
1594
+ findSubscription: (externalId, query, params = {}) => this.request({
1524
1595
  path: `/subscriptions/${externalId}`,
1525
1596
  method: "GET",
1597
+ query: query,
1526
1598
  secure: true,
1527
1599
  format: "json",
1528
1600
  ...params,
@@ -1567,7 +1639,7 @@ class Api extends HttpClient {
1567
1639
  *
1568
1640
  * @tags subscriptions
1569
1641
  * @name GetSubscriptionLifetimeUsage
1570
- * @summary Retrive subscription lifetime usage
1642
+ * @summary Retrieve subscription lifetime usage
1571
1643
  * @request GET:/subscriptions/{external_id}/lifetime_usage
1572
1644
  * @secure
1573
1645
  */
@@ -1596,6 +1668,90 @@ class Api extends HttpClient {
1596
1668
  format: "json",
1597
1669
  ...params,
1598
1670
  }),
1671
+ /**
1672
+ * @description This endpoint enables the retrieval of all alerts for a subscription.
1673
+ *
1674
+ * @tags subscriptions
1675
+ * @name GetSubscriptionAlerts
1676
+ * @summary List subscription alerts
1677
+ * @request GET:/subscriptions/{external_id}/alerts
1678
+ * @secure
1679
+ */
1680
+ getSubscriptionAlerts: (externalId, params = {}) => this.request({
1681
+ path: `/subscriptions/${externalId}/alerts`,
1682
+ method: "GET",
1683
+ secure: true,
1684
+ format: "json",
1685
+ ...params,
1686
+ }),
1687
+ /**
1688
+ * @description This endpoint allows you to create a new alert for a subscription.
1689
+ *
1690
+ * @tags subscriptions
1691
+ * @name CreateSubscriptionAlert
1692
+ * @summary Create a subscription alert
1693
+ * @request POST:/subscriptions/{external_id}/alerts
1694
+ * @secure
1695
+ */
1696
+ createSubscriptionAlert: (externalId, data, params = {}) => this.request({
1697
+ path: `/subscriptions/${externalId}/alerts`,
1698
+ method: "POST",
1699
+ body: data,
1700
+ secure: true,
1701
+ type: ContentType.Json,
1702
+ format: "json",
1703
+ ...params,
1704
+ }),
1705
+ /**
1706
+ * @description This endpoint enables the retrieval of a specific alert for a subscription.
1707
+ *
1708
+ * @tags subscriptions
1709
+ * @name GetSubscriptionAlert
1710
+ * @summary Retrieve a subscription alert
1711
+ * @request GET:/subscriptions/{external_id}/alerts/{code}
1712
+ * @secure
1713
+ */
1714
+ getSubscriptionAlert: (externalId, code, params = {}) => this.request({
1715
+ path: `/subscriptions/${externalId}/alerts/${code}`,
1716
+ method: "GET",
1717
+ secure: true,
1718
+ format: "json",
1719
+ ...params,
1720
+ }),
1721
+ /**
1722
+ * @description This endpoint allows you to update an existing alert for a subscription.
1723
+ *
1724
+ * @tags subscriptions
1725
+ * @name UpdateSubscriptionAlert
1726
+ * @summary Update a subscription alert
1727
+ * @request PUT:/subscriptions/{external_id}/alerts/{code}
1728
+ * @secure
1729
+ */
1730
+ updateSubscriptionAlert: (externalId, code, data, params = {}) => this.request({
1731
+ path: `/subscriptions/${externalId}/alerts/${code}`,
1732
+ method: "PUT",
1733
+ body: data,
1734
+ secure: true,
1735
+ type: ContentType.Json,
1736
+ format: "json",
1737
+ ...params,
1738
+ }),
1739
+ /**
1740
+ * @description This endpoint allows you to delete an existing alert for a subscription.
1741
+ *
1742
+ * @tags subscriptions
1743
+ * @name DeleteSubscriptionAlert
1744
+ * @summary Delete a subscription alert
1745
+ * @request DELETE:/subscriptions/{external_id}/alerts/{code}
1746
+ * @secure
1747
+ */
1748
+ deleteSubscriptionAlert: (externalId, code, params = {}) => this.request({
1749
+ path: `/subscriptions/${externalId}/alerts/${code}`,
1750
+ method: "DELETE",
1751
+ secure: true,
1752
+ format: "json",
1753
+ ...params,
1754
+ }),
1599
1755
  };
1600
1756
  taxes = {
1601
1757
  /**