lago-javascript-client 1.2.0 → 1.3.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.
@@ -3862,17 +3862,17 @@ export interface WalletCreateInput {
3862
3862
  /** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
3863
3863
  recurring_transaction_rules?: {
3864
3864
  /**
3865
- * The rule type. Possible values are `interval` or `threshold`.
3865
+ * The trigger. Possible values are `interval` or `threshold`.
3866
3866
  * @example "interval"
3867
3867
  */
3868
- rule_type: "interval" | "threshold";
3868
+ trigger: "interval" | "threshold";
3869
3869
  /**
3870
- * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only when rule type is `interval`.
3870
+ * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only when trigger is `interval`.
3871
3871
  * @example "monthly"
3872
3872
  */
3873
3873
  interval?: "weekly" | "monthly" | "quarterly" | "yearly";
3874
3874
  /**
3875
- * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when rule type is set to `threshold`.
3875
+ * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
3876
3876
  * @pattern ^[0-9]+.?[0-9]*$
3877
3877
  * @example "20.0"
3878
3878
  */
@@ -3972,17 +3972,17 @@ export interface WalletObject {
3972
3972
  */
3973
3973
  lago_id: string;
3974
3974
  /**
3975
- * The rule type. Possible values are `interval` or `threshold`.
3975
+ * The trigger. Possible values are `interval` or `threshold`.
3976
3976
  * @example "interval"
3977
3977
  */
3978
- rule_type: "interval" | "threshold";
3978
+ trigger: "interval" | "threshold";
3979
3979
  /**
3980
- * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only if rule type is set to `interval`.
3980
+ * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only if trigger is set to `interval`.
3981
3981
  * @example "monthly"
3982
3982
  */
3983
3983
  interval?: "weekly" | "monthly" | "quarterly" | "yearly";
3984
3984
  /**
3985
- * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when rule type is set to `threshold`.
3985
+ * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
3986
3986
  * @pattern ^[0-9]+.?[0-9]*$
3987
3987
  * @example "20.0"
3988
3988
  */
@@ -4042,17 +4042,23 @@ export interface WalletTransactionCreateInput {
4042
4042
  */
4043
4043
  wallet_id: string;
4044
4044
  /**
4045
- * The number of paid credits. Required only if there is no granted credits.
4045
+ * The number of paid credits.
4046
4046
  * @pattern ^[0-9]+.?[0-9]*$
4047
4047
  * @example "20.0"
4048
4048
  */
4049
4049
  paid_credits?: string;
4050
4050
  /**
4051
- * The number of free granted credits. Required only if there is no paid credits.
4051
+ * The number of free granted credits.
4052
4052
  * @pattern ^[0-9]+.?[0-9]*$
4053
4053
  * @example "10.0"
4054
4054
  */
4055
4055
  granted_credits?: string;
4056
+ /**
4057
+ * The number of voided credits.
4058
+ * @pattern ^[0-9]+.?[0-9]*$
4059
+ * @example "5.0"
4060
+ */
4061
+ voided_credits?: string;
4056
4062
  };
4057
4063
  }
4058
4064
  export interface WalletTransactionObject {
@@ -4073,6 +4079,11 @@ export interface WalletTransactionObject {
4073
4079
  * @example "settled"
4074
4080
  */
4075
4081
  status: "pending" | "settled";
4082
+ /**
4083
+ * The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.
4084
+ * @example "purchased"
4085
+ */
4086
+ transaction_status: "purchased" | "granted" | "voided" | "invoiced";
4076
4087
  /**
4077
4088
  * The type of transaction. Possible values are `inbound` (increasing the balance) or `outbound` (decreasing the balance).
4078
4089
  * @example "inbound"
@@ -4131,17 +4142,17 @@ export interface WalletUpdateInput {
4131
4142
  */
4132
4143
  lago_id?: string;
4133
4144
  /**
4134
- * The rule type. Possible values are `interval` or `threshold`.
4145
+ * The trigger. Possible values are `interval` or `threshold`.
4135
4146
  * @example "interval"
4136
4147
  */
4137
- rule_type?: "interval" | "threshold";
4148
+ trigger?: "interval" | "threshold";
4138
4149
  /**
4139
- * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only when rule type is set to `interval`.
4150
+ * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only when trigger is set to `interval`.
4140
4151
  * @example "monthly"
4141
4152
  */
4142
4153
  interval?: "weekly" | "monthly" | "quarterly" | "yearly";
4143
4154
  /**
4144
- * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when rule type is set to `threshold`.
4155
+ * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
4145
4156
  * @pattern ^[0-9]+.?[0-9]*$
4146
4157
  * @example "20.0"
4147
4158
  */
@@ -4286,7 +4297,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
4286
4297
  }
4287
4298
  /**
4288
4299
  * @title Lago API documentation
4289
- * @version 1.1.0
4300
+ * @version 1.2.0
4290
4301
  * @license AGPLv3
4291
4302
  * @baseUrl https://api.getlago.com/api/v1
4292
4303
  * @externalDocs https://github.com/getlago
@@ -4376,6 +4387,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4376
4387
  * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
4377
4388
  */
4378
4389
  external_customer_id?: string;
4390
+ /**
4391
+ * Show data only for given number of months.
4392
+ * @example 12
4393
+ */
4394
+ months?: number;
4379
4395
  }, params?: RequestParams) => Promise<HttpResponse<GrossRevenues, ApiErrorUnauthorized>>;
4380
4396
  /**
4381
4397
  * @description Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`.
@@ -4389,6 +4405,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4389
4405
  findAllInvoiceCollections: (query?: {
4390
4406
  /** The currency of revenue analytics. Format must be ISO 4217. */
4391
4407
  currency?: Currency;
4408
+ /**
4409
+ * Show data only for given number of months.
4410
+ * @example 12
4411
+ */
4412
+ months?: number;
4392
4413
  }, params?: RequestParams) => Promise<HttpResponse<InvoiceCollections, ApiErrorUnauthorized>>;
4393
4414
  /**
4394
4415
  * @description Reports a monthly analysis focused on the revenue generated from all usage-based fees. It exclusively accounts for revenue that has been formally invoiced. Importantly, this report does not include revenue related to the usage in the current billing period, limiting its scope to previously invoiced amounts.
@@ -4402,6 +4423,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4402
4423
  findAllInvoicedUsages: (query?: {
4403
4424
  /** The currency of invoiced usage analytics. Format must be ISO 4217. */
4404
4425
  currency?: Currency;
4426
+ /**
4427
+ * Show data only for given number of months.
4428
+ * @example 12
4429
+ */
4430
+ months?: number;
4405
4431
  }, params?: RequestParams) => Promise<HttpResponse<InvoicedUsages, ApiErrorUnauthorized>>;
4406
4432
  /**
4407
4433
  * @description This endpoint is used to list MRR.
@@ -5520,6 +5546,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5520
5546
  * @example "pending"
5521
5547
  */
5522
5548
  status?: string;
5549
+ /**
5550
+ * The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.
5551
+ * @example "purchased"
5552
+ */
5553
+ transaction_status?: string;
5523
5554
  /**
5524
5555
  * The transaction type of the wallet transaction. Possible values are `inbound` (increasing the wallet balance) or `outbound` (decreasing the wallet balance).
5525
5556
  * @example "inbound"
@@ -148,7 +148,7 @@ export class HttpClient {
148
148
  }
149
149
  /**
150
150
  * @title Lago API documentation
151
- * @version 1.1.0
151
+ * @version 1.2.0
152
152
  * @license AGPLv3
153
153
  * @baseUrl https://api.getlago.com/api/v1
154
154
  * @externalDocs https://github.com/getlago
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.2.0",
6
+ "version": "v1.3.0",
7
7
  "description": "Lago JavaScript API Client",
8
8
  "repository": {
9
9
  "type": "git",
@@ -3862,17 +3862,17 @@ export interface WalletCreateInput {
3862
3862
  /** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
3863
3863
  recurring_transaction_rules?: {
3864
3864
  /**
3865
- * The rule type. Possible values are `interval` or `threshold`.
3865
+ * The trigger. Possible values are `interval` or `threshold`.
3866
3866
  * @example "interval"
3867
3867
  */
3868
- rule_type: "interval" | "threshold";
3868
+ trigger: "interval" | "threshold";
3869
3869
  /**
3870
- * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only when rule type is `interval`.
3870
+ * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only when trigger is `interval`.
3871
3871
  * @example "monthly"
3872
3872
  */
3873
3873
  interval?: "weekly" | "monthly" | "quarterly" | "yearly";
3874
3874
  /**
3875
- * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when rule type is set to `threshold`.
3875
+ * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
3876
3876
  * @pattern ^[0-9]+.?[0-9]*$
3877
3877
  * @example "20.0"
3878
3878
  */
@@ -3972,17 +3972,17 @@ export interface WalletObject {
3972
3972
  */
3973
3973
  lago_id: string;
3974
3974
  /**
3975
- * The rule type. Possible values are `interval` or `threshold`.
3975
+ * The trigger. Possible values are `interval` or `threshold`.
3976
3976
  * @example "interval"
3977
3977
  */
3978
- rule_type: "interval" | "threshold";
3978
+ trigger: "interval" | "threshold";
3979
3979
  /**
3980
- * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only if rule type is set to `interval`.
3980
+ * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only if trigger is set to `interval`.
3981
3981
  * @example "monthly"
3982
3982
  */
3983
3983
  interval?: "weekly" | "monthly" | "quarterly" | "yearly";
3984
3984
  /**
3985
- * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when rule type is set to `threshold`.
3985
+ * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
3986
3986
  * @pattern ^[0-9]+.?[0-9]*$
3987
3987
  * @example "20.0"
3988
3988
  */
@@ -4042,17 +4042,23 @@ export interface WalletTransactionCreateInput {
4042
4042
  */
4043
4043
  wallet_id: string;
4044
4044
  /**
4045
- * The number of paid credits. Required only if there is no granted credits.
4045
+ * The number of paid credits.
4046
4046
  * @pattern ^[0-9]+.?[0-9]*$
4047
4047
  * @example "20.0"
4048
4048
  */
4049
4049
  paid_credits?: string;
4050
4050
  /**
4051
- * The number of free granted credits. Required only if there is no paid credits.
4051
+ * The number of free granted credits.
4052
4052
  * @pattern ^[0-9]+.?[0-9]*$
4053
4053
  * @example "10.0"
4054
4054
  */
4055
4055
  granted_credits?: string;
4056
+ /**
4057
+ * The number of voided credits.
4058
+ * @pattern ^[0-9]+.?[0-9]*$
4059
+ * @example "5.0"
4060
+ */
4061
+ voided_credits?: string;
4056
4062
  };
4057
4063
  }
4058
4064
  export interface WalletTransactionObject {
@@ -4073,6 +4079,11 @@ export interface WalletTransactionObject {
4073
4079
  * @example "settled"
4074
4080
  */
4075
4081
  status: "pending" | "settled";
4082
+ /**
4083
+ * The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.
4084
+ * @example "purchased"
4085
+ */
4086
+ transaction_status: "purchased" | "granted" | "voided" | "invoiced";
4076
4087
  /**
4077
4088
  * The type of transaction. Possible values are `inbound` (increasing the balance) or `outbound` (decreasing the balance).
4078
4089
  * @example "inbound"
@@ -4131,17 +4142,17 @@ export interface WalletUpdateInput {
4131
4142
  */
4132
4143
  lago_id?: string;
4133
4144
  /**
4134
- * The rule type. Possible values are `interval` or `threshold`.
4145
+ * The trigger. Possible values are `interval` or `threshold`.
4135
4146
  * @example "interval"
4136
4147
  */
4137
- rule_type?: "interval" | "threshold";
4148
+ trigger?: "interval" | "threshold";
4138
4149
  /**
4139
- * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only when rule type is set to `interval`.
4150
+ * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only when trigger is set to `interval`.
4140
4151
  * @example "monthly"
4141
4152
  */
4142
4153
  interval?: "weekly" | "monthly" | "quarterly" | "yearly";
4143
4154
  /**
4144
- * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when rule type is set to `threshold`.
4155
+ * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
4145
4156
  * @pattern ^[0-9]+.?[0-9]*$
4146
4157
  * @example "20.0"
4147
4158
  */
@@ -4286,7 +4297,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
4286
4297
  }
4287
4298
  /**
4288
4299
  * @title Lago API documentation
4289
- * @version 1.1.0
4300
+ * @version 1.2.0
4290
4301
  * @license AGPLv3
4291
4302
  * @baseUrl https://api.getlago.com/api/v1
4292
4303
  * @externalDocs https://github.com/getlago
@@ -4376,6 +4387,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4376
4387
  * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
4377
4388
  */
4378
4389
  external_customer_id?: string;
4390
+ /**
4391
+ * Show data only for given number of months.
4392
+ * @example 12
4393
+ */
4394
+ months?: number;
4379
4395
  }, params?: RequestParams) => Promise<HttpResponse<GrossRevenues, ApiErrorUnauthorized>>;
4380
4396
  /**
4381
4397
  * @description Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`.
@@ -4389,6 +4405,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4389
4405
  findAllInvoiceCollections: (query?: {
4390
4406
  /** The currency of revenue analytics. Format must be ISO 4217. */
4391
4407
  currency?: Currency;
4408
+ /**
4409
+ * Show data only for given number of months.
4410
+ * @example 12
4411
+ */
4412
+ months?: number;
4392
4413
  }, params?: RequestParams) => Promise<HttpResponse<InvoiceCollections, ApiErrorUnauthorized>>;
4393
4414
  /**
4394
4415
  * @description Reports a monthly analysis focused on the revenue generated from all usage-based fees. It exclusively accounts for revenue that has been formally invoiced. Importantly, this report does not include revenue related to the usage in the current billing period, limiting its scope to previously invoiced amounts.
@@ -4402,6 +4423,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4402
4423
  findAllInvoicedUsages: (query?: {
4403
4424
  /** The currency of invoiced usage analytics. Format must be ISO 4217. */
4404
4425
  currency?: Currency;
4426
+ /**
4427
+ * Show data only for given number of months.
4428
+ * @example 12
4429
+ */
4430
+ months?: number;
4405
4431
  }, params?: RequestParams) => Promise<HttpResponse<InvoicedUsages, ApiErrorUnauthorized>>;
4406
4432
  /**
4407
4433
  * @description This endpoint is used to list MRR.
@@ -5520,6 +5546,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5520
5546
  * @example "pending"
5521
5547
  */
5522
5548
  status?: string;
5549
+ /**
5550
+ * The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.
5551
+ * @example "purchased"
5552
+ */
5553
+ transaction_status?: string;
5523
5554
  /**
5524
5555
  * The transaction type of the wallet transaction. Possible values are `inbound` (increasing the wallet balance) or `outbound` (decreasing the wallet balance).
5525
5556
  * @example "inbound"
@@ -152,7 +152,7 @@ class HttpClient {
152
152
  exports.HttpClient = HttpClient;
153
153
  /**
154
154
  * @title Lago API documentation
155
- * @version 1.1.0
155
+ * @version 1.2.0
156
156
  * @license AGPLv3
157
157
  * @baseUrl https://api.getlago.com/api/v1
158
158
  * @externalDocs https://github.com/getlago