lago-javascript-client 1.20.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.
@@ -1557,8 +1557,8 @@ export interface CustomerBillingConfiguration {
1557
1557
  */
1558
1558
  document_locale?: string;
1559
1559
  /**
1560
- * Specifies the available payment methods that can be used for this customer when `payment_provider` is set to `stripe`. The `provider_payment_methods` field is an array that allows multiple payment options to be defined. If this field is not explicitly set, the payment methods will be set to `card`. For now, possible values are `card`, `sepa_debit`, `us_bank_account`, `bacs_debit` and `link`. Note that when `link` is selected, `card` should also be provided in the array.
1561
- * @example ["card","sepa_debit"]
1560
+ * Specifies the available payment methods that can be used for this customer when `payment_provider` is set to `stripe`. The `provider_payment_methods` field is an array that allows multiple payment options to be defined. If this field is not explicitly set, the payment methods will be set to `card`. For now, possible values are `card`, `sepa_debit`, `us_bank_account`, `bacs_debit`, `boleto`, `link`, `crypto` and `customer_balance`. Note that when `link` is selected, `card` should also be provided in the array. When `customer_balance` is selected, no other payment can be selected.
1561
+ * @example ["card","sepa_debit","us_bank_account","bacs_debit","link","boleto","crypto","customer_balance"]
1562
1562
  */
1563
1563
  provider_payment_methods?: string[] | null;
1564
1564
  }
@@ -1949,9 +1949,9 @@ export interface CustomerIntegratrionErrorObject {
1949
1949
  external_customer_id: string;
1950
1950
  /**
1951
1951
  * The type of accounting provider code
1952
- * @example "anrock"
1952
+ * @example "anrok"
1953
1953
  */
1954
- accounting_provider: "anrock" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
1954
+ accounting_provider: "anrok" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
1955
1955
  /**
1956
1956
  * Code of the accounting provider
1957
1957
  * @example "Netsuite Prod"
@@ -2845,17 +2845,17 @@ export interface FeeObject {
2845
2845
  /** Item attached to the fee */
2846
2846
  item: {
2847
2847
  /**
2848
- * The fee type. Possible values are `add-on`, `charge`, `credit` or `subscription`.
2848
+ * The fee type. Possible values are `add-on`, `charge`, `credit`, `subscription` or `commitment`.
2849
2849
  * @example "subscription"
2850
2850
  */
2851
2851
  type: "charge" | "add_on" | "subscription" | "credit";
2852
2852
  /**
2853
- * The code of the fee item. It can be the code of the `add-o`n, the code of the `charge`, the code of the `credit` or the code of the `subscription`.
2853
+ * The code of the fee item. It can be the code of the `add-on`, the code of the `charge`, the code of the `credit` or the code of the `subscription`.
2854
2854
  * @example "startup"
2855
2855
  */
2856
2856
  code: string;
2857
2857
  /**
2858
- * The name of the fee item. It can be the name of the `add-on`, the name of the `charge`, the name of the `credit` or the name of the `subscription`.
2858
+ * The name of the fee item. It can be the name of the `add-on`, the `charge`, the `credit`, the `subscription` or the `commitment`.
2859
2859
  * @example "Startup"
2860
2860
  */
2861
2861
  name: string;
@@ -2872,13 +2872,13 @@ export interface FeeObject {
2872
2872
  /** Key value list of event properties */
2873
2873
  filters?: Record<string, string[]>;
2874
2874
  /**
2875
- * Unique identifier of the fee item, created by Lago. It can be the identifier of the `add-on`, the identifier of the `charge`, the identifier of the `credit` or the identifier of the `subscription`.
2875
+ * Unique identifier of the fee item, created by Lago. It can be the identifier of the `add-on`, the `charge`, the `credit`, the `subscription` or the `commitment`.
2876
2876
  * @format uuid
2877
2877
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2878
2878
  */
2879
2879
  lago_item_id: string;
2880
2880
  /**
2881
- * The type of the fee item. Possible values are `AddOn`, `BillableMetric`, `WalletTransaction` or `Subscription`.
2881
+ * The type of the fee item. Possible values are `AddOn`, `BillableMetric`, `WalletTransaction`, `Subscription` or `Commitment`.
2882
2882
  * @example "Subscription"
2883
2883
  */
2884
2884
  item_type: "AddOn" | "BillableMetric" | "Subscription" | "WalletTransaction";
@@ -5452,7 +5452,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
5452
5452
  }
5453
5453
  /**
5454
5454
  * @title Lago API documentation
5455
- * @version 1.20.0
5455
+ * @version 1.22.0
5456
5456
  * @license AGPLv3
5457
5457
  * @baseUrl https://api.getlago.com/api/v1
5458
5458
  * @externalDocs https://github.com/getlago
@@ -5991,20 +5991,20 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5991
5991
  * @tags customers
5992
5992
  * @name FindCustomer
5993
5993
  * @summary Retrieve a customer
5994
- * @request GET:/customers/{external_id}
5994
+ * @request GET:/customers/{external_customer_id}
5995
5995
  * @secure
5996
5996
  */
5997
- findCustomer: (externalId: string, params?: RequestParams) => Promise<HttpResponse<Customer, ApiErrorUnauthorized | ApiErrorNotFound>>;
5997
+ findCustomer: (externalCustomerId: string, params?: RequestParams) => Promise<HttpResponse<Customer, ApiErrorUnauthorized | ApiErrorNotFound>>;
5998
5998
  /**
5999
5999
  * @description This endpoint deletes an existing customer.
6000
6000
  *
6001
6001
  * @tags customers
6002
6002
  * @name DestroyCustomer
6003
6003
  * @summary Delete a customer
6004
- * @request DELETE:/customers/{external_id}
6004
+ * @request DELETE:/customers/{external_customer_id}
6005
6005
  * @secure
6006
6006
  */
6007
- destroyCustomer: (externalId: string, params?: RequestParams) => Promise<HttpResponse<Customer, ApiErrorUnauthorized | ApiErrorNotFound>>;
6007
+ destroyCustomer: (externalCustomerId: string, params?: RequestParams) => Promise<HttpResponse<Customer, ApiErrorUnauthorized | ApiErrorNotFound>>;
6008
6008
  /**
6009
6009
  * @description This endpoint is used to delete a specific coupon that has been applied to a customer.
6010
6010
  *
@@ -6048,6 +6048,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6048
6048
  * @example "sub_1234567890"
6049
6049
  */
6050
6050
  external_subscription_id: string;
6051
+ /**
6052
+ * Optional flag to determine if taxes should be applied. Defaults to `true` if not provided or if null.
6053
+ * @default true
6054
+ * @example true
6055
+ */
6056
+ apply_taxes?: boolean;
6051
6057
  }, params?: RequestParams) => Promise<HttpResponse<CustomerUsage, ApiErrorUnauthorized | ApiErrorNotFound>>;
6052
6058
  /**
6053
6059
  * @description This endpoint enables the retrieval of the usage-based billing data for a customer within past periods.
@@ -6427,8 +6433,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6427
6433
  * @example true
6428
6434
  */
6429
6435
  payment_dispute_lost?: boolean;
6430
- /** Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off` or `advance_charges` */
6431
- invoice_type?: "subscription" | "add_on" | "credit" | "one_off" | "advance_charges";
6436
+ /** Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off`, `advance_charges` or `progressive_billing`. */
6437
+ invoice_type?: "subscription" | "add_on" | "credit" | "one_off" | "advance_charges" | "progressive_billing";
6432
6438
  /**
6433
6439
  * Filter invoices by self billed. Possible values are `true` or `false`.
6434
6440
  * @example true
@@ -6548,6 +6554,141 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6548
6554
  payment_url?: string | undefined;
6549
6555
  } | undefined;
6550
6556
  }, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
6557
+ /**
6558
+ * @description This endpoint is used for generating invoice preview.
6559
+ *
6560
+ * @tags invoices
6561
+ * @name InvoicePreview
6562
+ * @summary Create an invoice preview
6563
+ * @request POST:/invoices/preview
6564
+ * @secure
6565
+ */
6566
+ invoicePreview: (data: {
6567
+ customer: {
6568
+ /**
6569
+ * The first line of the billing address
6570
+ * @example "5230 Penfield Ave"
6571
+ */
6572
+ address_line1?: string;
6573
+ /**
6574
+ * The second line of the billing address
6575
+ * @example null
6576
+ */
6577
+ address_line2?: string | null;
6578
+ /**
6579
+ * The city of the customer's billing address
6580
+ * @example "Woodland Hills"
6581
+ */
6582
+ city?: string;
6583
+ /**
6584
+ * Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
6585
+ * @example "US"
6586
+ */
6587
+ country?: Country;
6588
+ /**
6589
+ * Unique identifier assigned to the customer in your application.
6590
+ * @example "hooli_1234"
6591
+ */
6592
+ external_id?: string;
6593
+ integration_customers?: {
6594
+ /**
6595
+ * The integration type used for accounting and tax syncs.
6596
+ * Accepted values: `anrok`.
6597
+ * @example "anrok"
6598
+ */
6599
+ integration_type: "anrok";
6600
+ /**
6601
+ * Unique code used to identify an integration connection.
6602
+ * @example "anrok1"
6603
+ */
6604
+ integration_code: string;
6605
+ }[];
6606
+ /**
6607
+ * The full name of the customer
6608
+ * @example "Gavin Belson"
6609
+ */
6610
+ name?: string;
6611
+ /**
6612
+ * The currency of the invoice.
6613
+ * @example "EUR"
6614
+ */
6615
+ currency?: Currency;
6616
+ /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
6617
+ shipping_address?: Address;
6618
+ /**
6619
+ * The state of the customer's billing address
6620
+ * @example "CA"
6621
+ */
6622
+ state?: string;
6623
+ /**
6624
+ * The tax identification number of the customer
6625
+ * @example "EU123456789"
6626
+ */
6627
+ tax_identification_number?: string;
6628
+ /** The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone */
6629
+ timezone?: Timezone;
6630
+ };
6631
+ /**
6632
+ * The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.
6633
+ * @example "startup"
6634
+ */
6635
+ plan_code?: string;
6636
+ /**
6637
+ * The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with `anniversary` billing time. The `anniversary_date` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
6638
+ * @format date-time
6639
+ * @example "2022-08-08T00:00:00Z"
6640
+ */
6641
+ subscription_at?: string;
6642
+ /**
6643
+ * The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration).
6644
+ * @example "anniversary"
6645
+ */
6646
+ billing_time?: "calendar" | "anniversary";
6647
+ coupons?: {
6648
+ /**
6649
+ * The name of the coupon.
6650
+ * @example "Startup Deal"
6651
+ */
6652
+ name?: string;
6653
+ /**
6654
+ * Unique code used to identify the coupon.
6655
+ * @example "startup_deal"
6656
+ */
6657
+ code: string;
6658
+ /**
6659
+ * The type of the coupon. It can have two possible values: `fixed_amount` or `percentage`.
6660
+ *
6661
+ * - If set to `fixed_amount`, the coupon represents a fixed amount discount.
6662
+ * - If set to `percentage`, the coupon represents a percentage-based discount.
6663
+ * @example "fixed_amount"
6664
+ */
6665
+ coupon_type?: "fixed_amount" | "percentage";
6666
+ /**
6667
+ * The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.
6668
+ * @example 5000
6669
+ */
6670
+ amount_cents?: number | null;
6671
+ /**
6672
+ * The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
6673
+ * @example "USD"
6674
+ */
6675
+ amount_currency?: Currency | null;
6676
+ /**
6677
+ * The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
6678
+ * @pattern ^[0-9]+.?[0-9]*$
6679
+ * @example null
6680
+ */
6681
+ percentage_rate?: string | null;
6682
+ /**
6683
+ * Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type
6684
+ * @example 6
6685
+ */
6686
+ frequency_duration?: number | null;
6687
+ }[];
6688
+ subscriptions?: {
6689
+ external_ids: string[];
6690
+ };
6691
+ }, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
6551
6692
  /**
6552
6693
  * @description This endpoint resends an invoice for collection and retry a payment.
6553
6694
  *
@@ -6637,6 +6778,124 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6637
6778
  external_customer_id?: string;
6638
6779
  }, params?: RequestParams) => Promise<HttpResponse<PaymentRequestsPaginated, ApiErrorUnauthorized>>;
6639
6780
  };
6781
+ payments: {
6782
+ /**
6783
+ * @description This endpoint is used to create a manual payment
6784
+ *
6785
+ * @tags payments
6786
+ * @name CreatePayment
6787
+ * @summary Create a payment
6788
+ * @request POST:/payments
6789
+ * @secure
6790
+ */
6791
+ createPayment: (data: {
6792
+ payment: {
6793
+ /**
6794
+ * Unique identifier assigned to the invoice
6795
+ * @example "486b147a-02a1-4ccf-8603-f3541fc25e7a"
6796
+ */
6797
+ invoice_id: string;
6798
+ /**
6799
+ * The payment amount in cents
6800
+ * @example 100
6801
+ */
6802
+ amount_cents: number;
6803
+ /**
6804
+ * Reference for the payment
6805
+ * @example "ref1"
6806
+ */
6807
+ reference: string;
6808
+ /**
6809
+ * The date the payment was made
6810
+ * @format date
6811
+ * @example "2025-02-20"
6812
+ */
6813
+ paid_at?: string;
6814
+ };
6815
+ }, params?: RequestParams) => Promise<HttpResponse<{
6816
+ payment: {
6817
+ /**
6818
+ * The unique identifier of the payment, created by Lago.
6819
+ * @format uuid
6820
+ * @example "4cf085a7-c196-4f07-a543-97c50ec6e8b2"
6821
+ */
6822
+ lago_id?: string;
6823
+ /** List of invoice IDs associated with the payment. */
6824
+ invoice_ids?: string[];
6825
+ /**
6826
+ * The amount of the payment in cents.
6827
+ * @example 100
6828
+ */
6829
+ amount_cents?: number;
6830
+ /**
6831
+ * The currency of the payment amount.
6832
+ * @example "USD"
6833
+ */
6834
+ amount_currency?: string;
6835
+ /**
6836
+ * The current status of the payment.
6837
+ * @example "succeeded"
6838
+ */
6839
+ payment_status?: string;
6840
+ /**
6841
+ * The type of payment.
6842
+ * @example "manual"
6843
+ */
6844
+ type?: string;
6845
+ /**
6846
+ * Reference for the payment.
6847
+ * @example "ref1"
6848
+ */
6849
+ reference?: string;
6850
+ /**
6851
+ * External identifier for the payment (if applicable).
6852
+ * @example null
6853
+ */
6854
+ external_payment_id?: string | null;
6855
+ /**
6856
+ * Timestamp when the payment was created.
6857
+ * @format date-time
6858
+ * @example "2025-02-20T00:00:00Z"
6859
+ */
6860
+ created_at?: string;
6861
+ };
6862
+ }, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
6863
+ /**
6864
+ * @description This endpoint is used to list all payments
6865
+ *
6866
+ * @tags payments
6867
+ * @name FindAllPayments
6868
+ * @summary List all payments
6869
+ * @request GET:/payments
6870
+ * @secure
6871
+ */
6872
+ findAllPayments: (query?: {
6873
+ /**
6874
+ * Page number.
6875
+ * @example 1
6876
+ */
6877
+ page?: number;
6878
+ /**
6879
+ * Number of records per page.
6880
+ * @example 20
6881
+ */
6882
+ per_page?: number;
6883
+ /**
6884
+ * Unique identifier assigned to the customer in your application.
6885
+ * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
6886
+ */
6887
+ external_customer_id?: string;
6888
+ /**
6889
+ * Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
6890
+ * @format uuid
6891
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6892
+ */
6893
+ lago_invoice_id?: string;
6894
+ }, params?: RequestParams) => Promise<HttpResponse<{
6895
+ payments: any[];
6896
+ meta: PaginationMeta;
6897
+ }, ApiErrorUnauthorized>>;
6898
+ };
6640
6899
  plans: {
6641
6900
  /**
6642
6901
  * @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.
@@ -6982,6 +7241,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6982
7241
  * @secure
6983
7242
  */
6984
7243
  createWalletTransaction: (data: WalletTransactionCreateInput, params?: RequestParams) => Promise<HttpResponse<WalletTransactions, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
7244
+ /**
7245
+ * @description This endpoint is used to retrieve a specific wallet transactions.
7246
+ *
7247
+ * @tags wallets
7248
+ * @name FindWalletTransaction
7249
+ * @summary Retrieve a wallet transaction
7250
+ * @request GET:/wallet_transactions/{lago_id}
7251
+ * @secure
7252
+ */
7253
+ findWalletTransaction: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletTransactionObject, ApiErrorUnauthorized | ApiErrorNotFound>>;
6985
7254
  };
6986
7255
  webhooks: {
6987
7256
  /**
@@ -148,7 +148,7 @@ export class HttpClient {
148
148
  }
149
149
  /**
150
150
  * @title Lago API documentation
151
- * @version 1.20.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.20.0",
6
+ "version": "v1.22.0",
7
7
  "description": "Lago JavaScript API Client",
8
8
  "repository": {
9
9
  "type": "git",
@@ -1557,8 +1557,8 @@ export interface CustomerBillingConfiguration {
1557
1557
  */
1558
1558
  document_locale?: string;
1559
1559
  /**
1560
- * Specifies the available payment methods that can be used for this customer when `payment_provider` is set to `stripe`. The `provider_payment_methods` field is an array that allows multiple payment options to be defined. If this field is not explicitly set, the payment methods will be set to `card`. For now, possible values are `card`, `sepa_debit`, `us_bank_account`, `bacs_debit` and `link`. Note that when `link` is selected, `card` should also be provided in the array.
1561
- * @example ["card","sepa_debit"]
1560
+ * Specifies the available payment methods that can be used for this customer when `payment_provider` is set to `stripe`. The `provider_payment_methods` field is an array that allows multiple payment options to be defined. If this field is not explicitly set, the payment methods will be set to `card`. For now, possible values are `card`, `sepa_debit`, `us_bank_account`, `bacs_debit`, `boleto`, `link`, `crypto` and `customer_balance`. Note that when `link` is selected, `card` should also be provided in the array. When `customer_balance` is selected, no other payment can be selected.
1561
+ * @example ["card","sepa_debit","us_bank_account","bacs_debit","link","boleto","crypto","customer_balance"]
1562
1562
  */
1563
1563
  provider_payment_methods?: string[] | null;
1564
1564
  }
@@ -1949,9 +1949,9 @@ export interface CustomerIntegratrionErrorObject {
1949
1949
  external_customer_id: string;
1950
1950
  /**
1951
1951
  * The type of accounting provider code
1952
- * @example "anrock"
1952
+ * @example "anrok"
1953
1953
  */
1954
- accounting_provider: "anrock" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
1954
+ accounting_provider: "anrok" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
1955
1955
  /**
1956
1956
  * Code of the accounting provider
1957
1957
  * @example "Netsuite Prod"
@@ -2845,17 +2845,17 @@ export interface FeeObject {
2845
2845
  /** Item attached to the fee */
2846
2846
  item: {
2847
2847
  /**
2848
- * The fee type. Possible values are `add-on`, `charge`, `credit` or `subscription`.
2848
+ * The fee type. Possible values are `add-on`, `charge`, `credit`, `subscription` or `commitment`.
2849
2849
  * @example "subscription"
2850
2850
  */
2851
2851
  type: "charge" | "add_on" | "subscription" | "credit";
2852
2852
  /**
2853
- * The code of the fee item. It can be the code of the `add-o`n, the code of the `charge`, the code of the `credit` or the code of the `subscription`.
2853
+ * The code of the fee item. It can be the code of the `add-on`, the code of the `charge`, the code of the `credit` or the code of the `subscription`.
2854
2854
  * @example "startup"
2855
2855
  */
2856
2856
  code: string;
2857
2857
  /**
2858
- * The name of the fee item. It can be the name of the `add-on`, the name of the `charge`, the name of the `credit` or the name of the `subscription`.
2858
+ * The name of the fee item. It can be the name of the `add-on`, the `charge`, the `credit`, the `subscription` or the `commitment`.
2859
2859
  * @example "Startup"
2860
2860
  */
2861
2861
  name: string;
@@ -2872,13 +2872,13 @@ export interface FeeObject {
2872
2872
  /** Key value list of event properties */
2873
2873
  filters?: Record<string, string[]>;
2874
2874
  /**
2875
- * Unique identifier of the fee item, created by Lago. It can be the identifier of the `add-on`, the identifier of the `charge`, the identifier of the `credit` or the identifier of the `subscription`.
2875
+ * Unique identifier of the fee item, created by Lago. It can be the identifier of the `add-on`, the `charge`, the `credit`, the `subscription` or the `commitment`.
2876
2876
  * @format uuid
2877
2877
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2878
2878
  */
2879
2879
  lago_item_id: string;
2880
2880
  /**
2881
- * The type of the fee item. Possible values are `AddOn`, `BillableMetric`, `WalletTransaction` or `Subscription`.
2881
+ * The type of the fee item. Possible values are `AddOn`, `BillableMetric`, `WalletTransaction`, `Subscription` or `Commitment`.
2882
2882
  * @example "Subscription"
2883
2883
  */
2884
2884
  item_type: "AddOn" | "BillableMetric" | "Subscription" | "WalletTransaction";
@@ -5452,7 +5452,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
5452
5452
  }
5453
5453
  /**
5454
5454
  * @title Lago API documentation
5455
- * @version 1.20.0
5455
+ * @version 1.22.0
5456
5456
  * @license AGPLv3
5457
5457
  * @baseUrl https://api.getlago.com/api/v1
5458
5458
  * @externalDocs https://github.com/getlago
@@ -5991,20 +5991,20 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5991
5991
  * @tags customers
5992
5992
  * @name FindCustomer
5993
5993
  * @summary Retrieve a customer
5994
- * @request GET:/customers/{external_id}
5994
+ * @request GET:/customers/{external_customer_id}
5995
5995
  * @secure
5996
5996
  */
5997
- findCustomer: (externalId: string, params?: RequestParams) => Promise<HttpResponse<Customer, ApiErrorUnauthorized | ApiErrorNotFound>>;
5997
+ findCustomer: (externalCustomerId: string, params?: RequestParams) => Promise<HttpResponse<Customer, ApiErrorUnauthorized | ApiErrorNotFound>>;
5998
5998
  /**
5999
5999
  * @description This endpoint deletes an existing customer.
6000
6000
  *
6001
6001
  * @tags customers
6002
6002
  * @name DestroyCustomer
6003
6003
  * @summary Delete a customer
6004
- * @request DELETE:/customers/{external_id}
6004
+ * @request DELETE:/customers/{external_customer_id}
6005
6005
  * @secure
6006
6006
  */
6007
- destroyCustomer: (externalId: string, params?: RequestParams) => Promise<HttpResponse<Customer, ApiErrorUnauthorized | ApiErrorNotFound>>;
6007
+ destroyCustomer: (externalCustomerId: string, params?: RequestParams) => Promise<HttpResponse<Customer, ApiErrorUnauthorized | ApiErrorNotFound>>;
6008
6008
  /**
6009
6009
  * @description This endpoint is used to delete a specific coupon that has been applied to a customer.
6010
6010
  *
@@ -6048,6 +6048,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6048
6048
  * @example "sub_1234567890"
6049
6049
  */
6050
6050
  external_subscription_id: string;
6051
+ /**
6052
+ * Optional flag to determine if taxes should be applied. Defaults to `true` if not provided or if null.
6053
+ * @default true
6054
+ * @example true
6055
+ */
6056
+ apply_taxes?: boolean;
6051
6057
  }, params?: RequestParams) => Promise<HttpResponse<CustomerUsage, ApiErrorUnauthorized | ApiErrorNotFound>>;
6052
6058
  /**
6053
6059
  * @description This endpoint enables the retrieval of the usage-based billing data for a customer within past periods.
@@ -6427,8 +6433,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6427
6433
  * @example true
6428
6434
  */
6429
6435
  payment_dispute_lost?: boolean;
6430
- /** Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off` or `advance_charges` */
6431
- invoice_type?: "subscription" | "add_on" | "credit" | "one_off" | "advance_charges";
6436
+ /** Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off`, `advance_charges` or `progressive_billing`. */
6437
+ invoice_type?: "subscription" | "add_on" | "credit" | "one_off" | "advance_charges" | "progressive_billing";
6432
6438
  /**
6433
6439
  * Filter invoices by self billed. Possible values are `true` or `false`.
6434
6440
  * @example true
@@ -6548,6 +6554,141 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6548
6554
  payment_url?: string | undefined;
6549
6555
  } | undefined;
6550
6556
  }, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
6557
+ /**
6558
+ * @description This endpoint is used for generating invoice preview.
6559
+ *
6560
+ * @tags invoices
6561
+ * @name InvoicePreview
6562
+ * @summary Create an invoice preview
6563
+ * @request POST:/invoices/preview
6564
+ * @secure
6565
+ */
6566
+ invoicePreview: (data: {
6567
+ customer: {
6568
+ /**
6569
+ * The first line of the billing address
6570
+ * @example "5230 Penfield Ave"
6571
+ */
6572
+ address_line1?: string;
6573
+ /**
6574
+ * The second line of the billing address
6575
+ * @example null
6576
+ */
6577
+ address_line2?: string | null;
6578
+ /**
6579
+ * The city of the customer's billing address
6580
+ * @example "Woodland Hills"
6581
+ */
6582
+ city?: string;
6583
+ /**
6584
+ * Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
6585
+ * @example "US"
6586
+ */
6587
+ country?: Country;
6588
+ /**
6589
+ * Unique identifier assigned to the customer in your application.
6590
+ * @example "hooli_1234"
6591
+ */
6592
+ external_id?: string;
6593
+ integration_customers?: {
6594
+ /**
6595
+ * The integration type used for accounting and tax syncs.
6596
+ * Accepted values: `anrok`.
6597
+ * @example "anrok"
6598
+ */
6599
+ integration_type: "anrok";
6600
+ /**
6601
+ * Unique code used to identify an integration connection.
6602
+ * @example "anrok1"
6603
+ */
6604
+ integration_code: string;
6605
+ }[];
6606
+ /**
6607
+ * The full name of the customer
6608
+ * @example "Gavin Belson"
6609
+ */
6610
+ name?: string;
6611
+ /**
6612
+ * The currency of the invoice.
6613
+ * @example "EUR"
6614
+ */
6615
+ currency?: Currency;
6616
+ /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
6617
+ shipping_address?: Address;
6618
+ /**
6619
+ * The state of the customer's billing address
6620
+ * @example "CA"
6621
+ */
6622
+ state?: string;
6623
+ /**
6624
+ * The tax identification number of the customer
6625
+ * @example "EU123456789"
6626
+ */
6627
+ tax_identification_number?: string;
6628
+ /** The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone */
6629
+ timezone?: Timezone;
6630
+ };
6631
+ /**
6632
+ * The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.
6633
+ * @example "startup"
6634
+ */
6635
+ plan_code?: string;
6636
+ /**
6637
+ * The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with `anniversary` billing time. The `anniversary_date` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
6638
+ * @format date-time
6639
+ * @example "2022-08-08T00:00:00Z"
6640
+ */
6641
+ subscription_at?: string;
6642
+ /**
6643
+ * The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration).
6644
+ * @example "anniversary"
6645
+ */
6646
+ billing_time?: "calendar" | "anniversary";
6647
+ coupons?: {
6648
+ /**
6649
+ * The name of the coupon.
6650
+ * @example "Startup Deal"
6651
+ */
6652
+ name?: string;
6653
+ /**
6654
+ * Unique code used to identify the coupon.
6655
+ * @example "startup_deal"
6656
+ */
6657
+ code: string;
6658
+ /**
6659
+ * The type of the coupon. It can have two possible values: `fixed_amount` or `percentage`.
6660
+ *
6661
+ * - If set to `fixed_amount`, the coupon represents a fixed amount discount.
6662
+ * - If set to `percentage`, the coupon represents a percentage-based discount.
6663
+ * @example "fixed_amount"
6664
+ */
6665
+ coupon_type?: "fixed_amount" | "percentage";
6666
+ /**
6667
+ * The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.
6668
+ * @example 5000
6669
+ */
6670
+ amount_cents?: number | null;
6671
+ /**
6672
+ * The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
6673
+ * @example "USD"
6674
+ */
6675
+ amount_currency?: Currency | null;
6676
+ /**
6677
+ * The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
6678
+ * @pattern ^[0-9]+.?[0-9]*$
6679
+ * @example null
6680
+ */
6681
+ percentage_rate?: string | null;
6682
+ /**
6683
+ * Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type
6684
+ * @example 6
6685
+ */
6686
+ frequency_duration?: number | null;
6687
+ }[];
6688
+ subscriptions?: {
6689
+ external_ids: string[];
6690
+ };
6691
+ }, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
6551
6692
  /**
6552
6693
  * @description This endpoint resends an invoice for collection and retry a payment.
6553
6694
  *
@@ -6637,6 +6778,124 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6637
6778
  external_customer_id?: string;
6638
6779
  }, params?: RequestParams) => Promise<HttpResponse<PaymentRequestsPaginated, ApiErrorUnauthorized>>;
6639
6780
  };
6781
+ payments: {
6782
+ /**
6783
+ * @description This endpoint is used to create a manual payment
6784
+ *
6785
+ * @tags payments
6786
+ * @name CreatePayment
6787
+ * @summary Create a payment
6788
+ * @request POST:/payments
6789
+ * @secure
6790
+ */
6791
+ createPayment: (data: {
6792
+ payment: {
6793
+ /**
6794
+ * Unique identifier assigned to the invoice
6795
+ * @example "486b147a-02a1-4ccf-8603-f3541fc25e7a"
6796
+ */
6797
+ invoice_id: string;
6798
+ /**
6799
+ * The payment amount in cents
6800
+ * @example 100
6801
+ */
6802
+ amount_cents: number;
6803
+ /**
6804
+ * Reference for the payment
6805
+ * @example "ref1"
6806
+ */
6807
+ reference: string;
6808
+ /**
6809
+ * The date the payment was made
6810
+ * @format date
6811
+ * @example "2025-02-20"
6812
+ */
6813
+ paid_at?: string;
6814
+ };
6815
+ }, params?: RequestParams) => Promise<HttpResponse<{
6816
+ payment: {
6817
+ /**
6818
+ * The unique identifier of the payment, created by Lago.
6819
+ * @format uuid
6820
+ * @example "4cf085a7-c196-4f07-a543-97c50ec6e8b2"
6821
+ */
6822
+ lago_id?: string;
6823
+ /** List of invoice IDs associated with the payment. */
6824
+ invoice_ids?: string[];
6825
+ /**
6826
+ * The amount of the payment in cents.
6827
+ * @example 100
6828
+ */
6829
+ amount_cents?: number;
6830
+ /**
6831
+ * The currency of the payment amount.
6832
+ * @example "USD"
6833
+ */
6834
+ amount_currency?: string;
6835
+ /**
6836
+ * The current status of the payment.
6837
+ * @example "succeeded"
6838
+ */
6839
+ payment_status?: string;
6840
+ /**
6841
+ * The type of payment.
6842
+ * @example "manual"
6843
+ */
6844
+ type?: string;
6845
+ /**
6846
+ * Reference for the payment.
6847
+ * @example "ref1"
6848
+ */
6849
+ reference?: string;
6850
+ /**
6851
+ * External identifier for the payment (if applicable).
6852
+ * @example null
6853
+ */
6854
+ external_payment_id?: string | null;
6855
+ /**
6856
+ * Timestamp when the payment was created.
6857
+ * @format date-time
6858
+ * @example "2025-02-20T00:00:00Z"
6859
+ */
6860
+ created_at?: string;
6861
+ };
6862
+ }, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
6863
+ /**
6864
+ * @description This endpoint is used to list all payments
6865
+ *
6866
+ * @tags payments
6867
+ * @name FindAllPayments
6868
+ * @summary List all payments
6869
+ * @request GET:/payments
6870
+ * @secure
6871
+ */
6872
+ findAllPayments: (query?: {
6873
+ /**
6874
+ * Page number.
6875
+ * @example 1
6876
+ */
6877
+ page?: number;
6878
+ /**
6879
+ * Number of records per page.
6880
+ * @example 20
6881
+ */
6882
+ per_page?: number;
6883
+ /**
6884
+ * Unique identifier assigned to the customer in your application.
6885
+ * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
6886
+ */
6887
+ external_customer_id?: string;
6888
+ /**
6889
+ * Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
6890
+ * @format uuid
6891
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6892
+ */
6893
+ lago_invoice_id?: string;
6894
+ }, params?: RequestParams) => Promise<HttpResponse<{
6895
+ payments: any[];
6896
+ meta: PaginationMeta;
6897
+ }, ApiErrorUnauthorized>>;
6898
+ };
6640
6899
  plans: {
6641
6900
  /**
6642
6901
  * @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.
@@ -6982,6 +7241,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6982
7241
  * @secure
6983
7242
  */
6984
7243
  createWalletTransaction: (data: WalletTransactionCreateInput, params?: RequestParams) => Promise<HttpResponse<WalletTransactions, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
7244
+ /**
7245
+ * @description This endpoint is used to retrieve a specific wallet transactions.
7246
+ *
7247
+ * @tags wallets
7248
+ * @name FindWalletTransaction
7249
+ * @summary Retrieve a wallet transaction
7250
+ * @request GET:/wallet_transactions/{lago_id}
7251
+ * @secure
7252
+ */
7253
+ findWalletTransaction: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletTransactionObject, ApiErrorUnauthorized | ApiErrorNotFound>>;
6985
7254
  };
6986
7255
  webhooks: {
6987
7256
  /**
@@ -152,7 +152,7 @@ class HttpClient {
152
152
  exports.HttpClient = HttpClient;
153
153
  /**
154
154
  * @title Lago API documentation
155
- * @version 1.20.0
155
+ * @version 1.22.0
156
156
  * @license AGPLv3
157
157
  * @baseUrl https://api.getlago.com/api/v1
158
158
  * @externalDocs https://github.com/getlago
@@ -727,11 +727,11 @@ class Api extends HttpClient {
727
727
  * @tags customers
728
728
  * @name FindCustomer
729
729
  * @summary Retrieve a customer
730
- * @request GET:/customers/{external_id}
730
+ * @request GET:/customers/{external_customer_id}
731
731
  * @secure
732
732
  */
733
- findCustomer: (externalId, params = {}) => this.request({
734
- path: `/customers/${externalId}`,
733
+ findCustomer: (externalCustomerId, params = {}) => this.request({
734
+ path: `/customers/${externalCustomerId}`,
735
735
  method: "GET",
736
736
  secure: true,
737
737
  format: "json",
@@ -743,11 +743,11 @@ class Api extends HttpClient {
743
743
  * @tags customers
744
744
  * @name DestroyCustomer
745
745
  * @summary Delete a customer
746
- * @request DELETE:/customers/{external_id}
746
+ * @request DELETE:/customers/{external_customer_id}
747
747
  * @secure
748
748
  */
749
- destroyCustomer: (externalId, params = {}) => this.request({
750
- path: `/customers/${externalId}`,
749
+ destroyCustomer: (externalCustomerId, params = {}) => this.request({
750
+ path: `/customers/${externalCustomerId}`,
751
751
  method: "DELETE",
752
752
  secure: true,
753
753
  format: "json",
@@ -1159,6 +1159,24 @@ class Api extends HttpClient {
1159
1159
  format: "json",
1160
1160
  ...params,
1161
1161
  }),
1162
+ /**
1163
+ * @description This endpoint is used for generating invoice preview.
1164
+ *
1165
+ * @tags invoices
1166
+ * @name InvoicePreview
1167
+ * @summary Create an invoice preview
1168
+ * @request POST:/invoices/preview
1169
+ * @secure
1170
+ */
1171
+ invoicePreview: (data, params = {}) => this.request({
1172
+ path: `/invoices/preview`,
1173
+ method: "POST",
1174
+ body: data,
1175
+ secure: true,
1176
+ type: ContentType.Json,
1177
+ format: "json",
1178
+ ...params,
1179
+ }),
1162
1180
  /**
1163
1181
  * @description This endpoint resends an invoice for collection and retry a payment.
1164
1182
  *
@@ -1248,6 +1266,43 @@ class Api extends HttpClient {
1248
1266
  ...params,
1249
1267
  }),
1250
1268
  };
1269
+ payments = {
1270
+ /**
1271
+ * @description This endpoint is used to create a manual payment
1272
+ *
1273
+ * @tags payments
1274
+ * @name CreatePayment
1275
+ * @summary Create a payment
1276
+ * @request POST:/payments
1277
+ * @secure
1278
+ */
1279
+ createPayment: (data, params = {}) => this.request({
1280
+ path: `/payments`,
1281
+ method: "POST",
1282
+ body: data,
1283
+ secure: true,
1284
+ type: ContentType.Json,
1285
+ format: "json",
1286
+ ...params,
1287
+ }),
1288
+ /**
1289
+ * @description This endpoint is used to list all payments
1290
+ *
1291
+ * @tags payments
1292
+ * @name FindAllPayments
1293
+ * @summary List all payments
1294
+ * @request GET:/payments
1295
+ * @secure
1296
+ */
1297
+ findAllPayments: (query, params = {}) => this.request({
1298
+ path: `/payments`,
1299
+ method: "GET",
1300
+ query: query,
1301
+ secure: true,
1302
+ format: "json",
1303
+ ...params,
1304
+ }),
1305
+ };
1251
1306
  plans = {
1252
1307
  /**
1253
1308
  * @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.
@@ -1667,6 +1722,22 @@ class Api extends HttpClient {
1667
1722
  format: "json",
1668
1723
  ...params,
1669
1724
  }),
1725
+ /**
1726
+ * @description This endpoint is used to retrieve a specific wallet transactions.
1727
+ *
1728
+ * @tags wallets
1729
+ * @name FindWalletTransaction
1730
+ * @summary Retrieve a wallet transaction
1731
+ * @request GET:/wallet_transactions/{lago_id}
1732
+ * @secure
1733
+ */
1734
+ findWalletTransaction: (lagoId, params = {}) => this.request({
1735
+ path: `/wallet_transactions/${lagoId}`,
1736
+ method: "GET",
1737
+ secure: true,
1738
+ format: "json",
1739
+ ...params,
1740
+ }),
1670
1741
  };
1671
1742
  webhooks = {
1672
1743
  /**