lago-javascript-client 1.44.0 → 1.45.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.
@@ -1045,6 +1045,17 @@ export interface AppliedCouponObject {
1045
1045
  * @example "Startup Deal"
1046
1046
  */
1047
1047
  coupon_name: string;
1048
+ /**
1049
+ * The status of the parent coupon. Can be either `active` or `terminated`.
1050
+ * @example "active"
1051
+ */
1052
+ coupon_status?: "active" | "terminated";
1053
+ /**
1054
+ * The date and time when the parent coupon was deleted. If null, the coupon still exists. It is expressed in UTC format according to the ISO 8601 datetime standard.
1055
+ * @format date-time
1056
+ * @example "2022-04-29T08:59:51Z"
1057
+ */
1058
+ coupon_deleted_at?: string | null;
1048
1059
  /**
1049
1060
  * Unique identifier of the customer, created by Lago.
1050
1061
  * @format uuid
@@ -7996,12 +8007,24 @@ export interface WalletTransactionObject {
7996
8007
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
7997
8008
  */
7998
8009
  lago_wallet_id: string;
8010
+ /**
8011
+ * Unique identifier assigned to the invoice associated with this wallet transaction. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
8012
+ * @format uuid
8013
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
8014
+ */
8015
+ lago_invoice_id: string | null;
8016
+ /**
8017
+ * Unique identifier of the credit note associated with this wallet transaction. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
8018
+ * @format uuid
8019
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
8020
+ */
8021
+ lago_credit_note_id: string | null;
7999
8022
  /**
8000
8023
  * Unique identifier of the invoice that was voided and triggered the creation of this inbound wallet transaction. Only present for inbound transactions on traceable wallets that were created as a result of an invoice void.
8001
8024
  * @format uuid
8002
8025
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
8003
8026
  */
8004
- lago_voided_invoice_id?: string | null;
8027
+ lago_voided_invoice_id: string | null;
8005
8028
  /**
8006
8029
  * The status of the wallet transaction. Possible values are `pending`, `settled` or `failed`.
8007
8030
  * @example "settled"
@@ -8038,12 +8061,12 @@ export interface WalletTransactionObject {
8038
8061
  * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
8039
8062
  * @example false
8040
8063
  */
8041
- invoice_requires_successful_payment?: boolean;
8064
+ invoice_requires_successful_payment: boolean;
8042
8065
  /**
8043
8066
  * This field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.
8044
8067
  * @example [{"key":"example key","value":"example value"},{"key":"another key","value":"another value"}]
8045
8068
  */
8046
- metadata?: {
8069
+ metadata: {
8047
8070
  /** The unique identifier for the attribute. */
8048
8071
  key?: string;
8049
8072
  /** The value associated with the key. */
@@ -8053,25 +8076,30 @@ export interface WalletTransactionObject {
8053
8076
  * The remaining unconsumed amount of an inbound wallet transaction, expressed in cents. Only present for inbound transactions on traceable wallets. Tracks how much of the original credited amount has not yet been consumed by outbound transactions.
8054
8077
  * @example 5000
8055
8078
  */
8056
- remaining_amount_cents?: number | null;
8079
+ remaining_amount_cents: number | null;
8057
8080
  /**
8058
8081
  * The remaining unconsumed amount of an inbound wallet transaction, expressed in credits. Only present for inbound transactions on traceable wallets.
8059
8082
  * @pattern ^[0-9]+.?[0-9]*$
8060
8083
  * @example "5.0"
8061
8084
  */
8062
- remaining_credit_amount?: string | null;
8085
+ remaining_credit_amount: string | null;
8086
+ /**
8087
+ * The priority of the wallet transaction, used to determine the order in which inbound transactions are consumed. Lower values are consumed first.
8088
+ * @example 50
8089
+ */
8090
+ priority: number;
8063
8091
  /**
8064
8092
  * The date when wallet transaction is settled, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
8065
8093
  * @format date-time
8066
8094
  * @example "2022-04-29T08:59:51Z"
8067
8095
  */
8068
- settled_at?: string | null;
8096
+ settled_at: string | null;
8069
8097
  /**
8070
8098
  * The date when the wallet transaction failed, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
8071
8099
  * @format date-time
8072
8100
  * @example "2022-04-29T08:59:51Z"
8073
8101
  */
8074
- failed_at?: string | null;
8102
+ failed_at: string | null;
8075
8103
  /**
8076
8104
  * The date of the wallet transaction creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
8077
8105
  * @format date-time
@@ -8086,7 +8114,7 @@ export interface WalletTransactionObject {
8086
8114
  /** The invoice custom sections applied to invoices generated by this wallet transaction. */
8087
8115
  applied_invoice_custom_sections?: AppliedInvoiceCustomSectionObject[];
8088
8116
  /** The payment method assigned to this wallet transaction for processing the payment. */
8089
- payment_method?: PaymentMethodReference;
8117
+ payment_method: PaymentMethodReference;
8090
8118
  }
8091
8119
  export interface WalletTransactions {
8092
8120
  wallet_transactions: WalletTransactionObject[];
@@ -8753,7 +8781,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
8753
8781
  }
8754
8782
  /**
8755
8783
  * @title Lago API documentation
8756
- * @version 1.44.0
8784
+ * @version 1.45.0
8757
8785
  * @license AGPLv3 (https://github.com/getlago/lago-openapi/blob/main/LICENSE)
8758
8786
  * @baseUrl https://api.getlago.com/api/v1
8759
8787
  * @externalDocs https://github.com/getlago
@@ -148,7 +148,7 @@ export class HttpClient {
148
148
  }
149
149
  /**
150
150
  * @title Lago API documentation
151
- * @version 1.44.0
151
+ * @version 1.45.0
152
152
  * @license AGPLv3 (https://github.com/getlago/lago-openapi/blob/main/LICENSE)
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.44.0",
6
+ "version": "v1.45.0",
7
7
  "description": "Lago JavaScript API Client",
8
8
  "repository": {
9
9
  "type": "git",
@@ -1045,6 +1045,17 @@ export interface AppliedCouponObject {
1045
1045
  * @example "Startup Deal"
1046
1046
  */
1047
1047
  coupon_name: string;
1048
+ /**
1049
+ * The status of the parent coupon. Can be either `active` or `terminated`.
1050
+ * @example "active"
1051
+ */
1052
+ coupon_status?: "active" | "terminated";
1053
+ /**
1054
+ * The date and time when the parent coupon was deleted. If null, the coupon still exists. It is expressed in UTC format according to the ISO 8601 datetime standard.
1055
+ * @format date-time
1056
+ * @example "2022-04-29T08:59:51Z"
1057
+ */
1058
+ coupon_deleted_at?: string | null;
1048
1059
  /**
1049
1060
  * Unique identifier of the customer, created by Lago.
1050
1061
  * @format uuid
@@ -7996,12 +8007,24 @@ export interface WalletTransactionObject {
7996
8007
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
7997
8008
  */
7998
8009
  lago_wallet_id: string;
8010
+ /**
8011
+ * Unique identifier assigned to the invoice associated with this wallet transaction. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
8012
+ * @format uuid
8013
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
8014
+ */
8015
+ lago_invoice_id: string | null;
8016
+ /**
8017
+ * Unique identifier of the credit note associated with this wallet transaction. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
8018
+ * @format uuid
8019
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
8020
+ */
8021
+ lago_credit_note_id: string | null;
7999
8022
  /**
8000
8023
  * Unique identifier of the invoice that was voided and triggered the creation of this inbound wallet transaction. Only present for inbound transactions on traceable wallets that were created as a result of an invoice void.
8001
8024
  * @format uuid
8002
8025
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
8003
8026
  */
8004
- lago_voided_invoice_id?: string | null;
8027
+ lago_voided_invoice_id: string | null;
8005
8028
  /**
8006
8029
  * The status of the wallet transaction. Possible values are `pending`, `settled` or `failed`.
8007
8030
  * @example "settled"
@@ -8038,12 +8061,12 @@ export interface WalletTransactionObject {
8038
8061
  * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
8039
8062
  * @example false
8040
8063
  */
8041
- invoice_requires_successful_payment?: boolean;
8064
+ invoice_requires_successful_payment: boolean;
8042
8065
  /**
8043
8066
  * This field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.
8044
8067
  * @example [{"key":"example key","value":"example value"},{"key":"another key","value":"another value"}]
8045
8068
  */
8046
- metadata?: {
8069
+ metadata: {
8047
8070
  /** The unique identifier for the attribute. */
8048
8071
  key?: string;
8049
8072
  /** The value associated with the key. */
@@ -8053,25 +8076,30 @@ export interface WalletTransactionObject {
8053
8076
  * The remaining unconsumed amount of an inbound wallet transaction, expressed in cents. Only present for inbound transactions on traceable wallets. Tracks how much of the original credited amount has not yet been consumed by outbound transactions.
8054
8077
  * @example 5000
8055
8078
  */
8056
- remaining_amount_cents?: number | null;
8079
+ remaining_amount_cents: number | null;
8057
8080
  /**
8058
8081
  * The remaining unconsumed amount of an inbound wallet transaction, expressed in credits. Only present for inbound transactions on traceable wallets.
8059
8082
  * @pattern ^[0-9]+.?[0-9]*$
8060
8083
  * @example "5.0"
8061
8084
  */
8062
- remaining_credit_amount?: string | null;
8085
+ remaining_credit_amount: string | null;
8086
+ /**
8087
+ * The priority of the wallet transaction, used to determine the order in which inbound transactions are consumed. Lower values are consumed first.
8088
+ * @example 50
8089
+ */
8090
+ priority: number;
8063
8091
  /**
8064
8092
  * The date when wallet transaction is settled, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
8065
8093
  * @format date-time
8066
8094
  * @example "2022-04-29T08:59:51Z"
8067
8095
  */
8068
- settled_at?: string | null;
8096
+ settled_at: string | null;
8069
8097
  /**
8070
8098
  * The date when the wallet transaction failed, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
8071
8099
  * @format date-time
8072
8100
  * @example "2022-04-29T08:59:51Z"
8073
8101
  */
8074
- failed_at?: string | null;
8102
+ failed_at: string | null;
8075
8103
  /**
8076
8104
  * The date of the wallet transaction creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
8077
8105
  * @format date-time
@@ -8086,7 +8114,7 @@ export interface WalletTransactionObject {
8086
8114
  /** The invoice custom sections applied to invoices generated by this wallet transaction. */
8087
8115
  applied_invoice_custom_sections?: AppliedInvoiceCustomSectionObject[];
8088
8116
  /** The payment method assigned to this wallet transaction for processing the payment. */
8089
- payment_method?: PaymentMethodReference;
8117
+ payment_method: PaymentMethodReference;
8090
8118
  }
8091
8119
  export interface WalletTransactions {
8092
8120
  wallet_transactions: WalletTransactionObject[];
@@ -8753,7 +8781,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
8753
8781
  }
8754
8782
  /**
8755
8783
  * @title Lago API documentation
8756
- * @version 1.44.0
8784
+ * @version 1.45.0
8757
8785
  * @license AGPLv3 (https://github.com/getlago/lago-openapi/blob/main/LICENSE)
8758
8786
  * @baseUrl https://api.getlago.com/api/v1
8759
8787
  * @externalDocs https://github.com/getlago
@@ -152,7 +152,7 @@ class HttpClient {
152
152
  exports.HttpClient = HttpClient;
153
153
  /**
154
154
  * @title Lago API documentation
155
- * @version 1.44.0
155
+ * @version 1.45.0
156
156
  * @license AGPLv3 (https://github.com/getlago/lago-openapi/blob/main/LICENSE)
157
157
  * @baseUrl https://api.getlago.com/api/v1
158
158
  * @externalDocs https://github.com/getlago