lago-javascript-client 1.5.0 → 1.6.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.
@@ -1413,12 +1413,18 @@ export interface CustomerBillingConfiguration {
1413
1413
  }
1414
1414
  /** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
1415
1415
  export interface IntegrationCustomer {
1416
+ /**
1417
+ * A unique identifier for the integration customer object in the Lago application.
1418
+ * @format uuid
1419
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1420
+ */
1421
+ lago_id?: string;
1416
1422
  /**
1417
1423
  * The integration type used for accounting and tax syncs.
1418
1424
  * Accepted values: `netsuite`.
1419
1425
  * @example "netsuite"
1420
1426
  */
1421
- integration_type?: "netsuite";
1427
+ type?: "netsuite";
1422
1428
  /**
1423
1429
  * Unique code used to identify an integration connection.
1424
1430
  * @example "netsuite-eu-1"
@@ -1692,8 +1698,40 @@ export interface CustomerCreateInput {
1692
1698
  net_payment_term?: number | null;
1693
1699
  /** 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. */
1694
1700
  billing_configuration?: CustomerBillingConfiguration;
1695
- /** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
1696
- integration_customer?: IntegrationCustomer;
1701
+ integration_customers?: {
1702
+ /**
1703
+ * A unique identifier for the integration customer object in the Lago application.
1704
+ * @format uuid
1705
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1706
+ */
1707
+ id?: string;
1708
+ /**
1709
+ * The integration type used for accounting and tax syncs.
1710
+ * Accepted values: `netsuite`.
1711
+ * @example "netsuite"
1712
+ */
1713
+ integration_type?: "netsuite";
1714
+ /**
1715
+ * Unique code used to identify an integration connection.
1716
+ * @example "netsuite-eu-1"
1717
+ */
1718
+ integration_code?: string;
1719
+ /**
1720
+ * The customer ID within the integration's system. If this field is not provided, Lago has the option to create a new customer record within the integration's system on behalf of the customer.
1721
+ * @example "cus_12345"
1722
+ */
1723
+ external_customer_id?: string;
1724
+ /**
1725
+ * Set this field to `true` if you want to create a customer record in the integration's system. This option is applicable only when the `external_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`
1726
+ * @example true
1727
+ */
1728
+ sync_with_provider?: boolean;
1729
+ /**
1730
+ * This optional field is needed only when working with `netsuite` connection.
1731
+ * @example "2"
1732
+ */
1733
+ subsidiary_id?: string;
1734
+ }[];
1697
1735
  /** Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format */
1698
1736
  metadata?: {
1699
1737
  /**
@@ -1865,8 +1903,7 @@ export interface CustomerObject {
1865
1903
  updated_at?: string;
1866
1904
  /** 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. */
1867
1905
  billing_configuration?: CustomerBillingConfiguration;
1868
- /** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
1869
- integration_customer?: IntegrationCustomer;
1906
+ integration_customers?: IntegrationCustomer[];
1870
1907
  metadata?: CustomerMetadata[];
1871
1908
  }
1872
1909
  export type CustomerObjectExtended = CustomerObject & {
@@ -2725,6 +2762,11 @@ export interface InvoiceObject {
2725
2762
  * @example "2022-04-30"
2726
2763
  */
2727
2764
  payment_due_date?: string;
2765
+ /**
2766
+ * Specifies if the payment is considered as overdue.
2767
+ * @example true
2768
+ */
2769
+ payment_overdue?: boolean;
2728
2770
  /**
2729
2771
  * The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
2730
2772
  * @example 30
@@ -4393,9 +4435,9 @@ export declare class HttpClient<SecurityDataType = unknown> {
4393
4435
  }
4394
4436
  /**
4395
4437
  * @title Lago API documentation
4396
- * @version 1.5.0
4438
+ * @version 1.6.0
4397
4439
  * @license AGPLv3
4398
- * @baseUrl https://api.getlago.com/api/v1
4440
+ * @baseUrl https://{region}.getlago.com/api/v1
4399
4441
  * @externalDocs https://github.com/getlago
4400
4442
  * @contact <tech@getlago.com>
4401
4443
  *
@@ -5208,6 +5250,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5208
5250
  status?: "draft" | "finalized";
5209
5251
  /** Filter invoices by payment status. Possible values are `pending`, `failed` or `succeeded`. */
5210
5252
  payment_status?: "pending" | "failed" | "succeeded";
5253
+ /**
5254
+ * Filter invoices by payment_overdue. Possible values are `true` or `false`.
5255
+ * @example true
5256
+ */
5257
+ payment_overdue?: boolean;
5211
5258
  }, params?: RequestParams) => Promise<HttpResponse<InvoicesPaginated, ApiErrorUnauthorized>>;
5212
5259
  /**
5213
5260
  * @description This endpoint is used for updating an existing invoice.
@@ -16,7 +16,7 @@ export var ContentType;
16
16
  ContentType["Text"] = "text/plain";
17
17
  })(ContentType || (ContentType = {}));
18
18
  export class HttpClient {
19
- baseUrl = "https://api.getlago.com/api/v1";
19
+ baseUrl = "https://{region}.getlago.com/api/v1";
20
20
  securityData = null;
21
21
  securityWorker;
22
22
  abortControllers = new Map();
@@ -148,9 +148,9 @@ export class HttpClient {
148
148
  }
149
149
  /**
150
150
  * @title Lago API documentation
151
- * @version 1.5.0
151
+ * @version 1.6.0
152
152
  * @license AGPLv3
153
- * @baseUrl https://api.getlago.com/api/v1
153
+ * @baseUrl https://{region}.getlago.com/api/v1
154
154
  * @externalDocs https://github.com/getlago
155
155
  * @contact <tech@getlago.com>
156
156
  *
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.5.0",
6
+ "version": "v1.6.0",
7
7
  "description": "Lago JavaScript API Client",
8
8
  "repository": {
9
9
  "type": "git",
@@ -1413,12 +1413,18 @@ export interface CustomerBillingConfiguration {
1413
1413
  }
1414
1414
  /** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
1415
1415
  export interface IntegrationCustomer {
1416
+ /**
1417
+ * A unique identifier for the integration customer object in the Lago application.
1418
+ * @format uuid
1419
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1420
+ */
1421
+ lago_id?: string;
1416
1422
  /**
1417
1423
  * The integration type used for accounting and tax syncs.
1418
1424
  * Accepted values: `netsuite`.
1419
1425
  * @example "netsuite"
1420
1426
  */
1421
- integration_type?: "netsuite";
1427
+ type?: "netsuite";
1422
1428
  /**
1423
1429
  * Unique code used to identify an integration connection.
1424
1430
  * @example "netsuite-eu-1"
@@ -1692,8 +1698,40 @@ export interface CustomerCreateInput {
1692
1698
  net_payment_term?: number | null;
1693
1699
  /** 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. */
1694
1700
  billing_configuration?: CustomerBillingConfiguration;
1695
- /** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
1696
- integration_customer?: IntegrationCustomer;
1701
+ integration_customers?: {
1702
+ /**
1703
+ * A unique identifier for the integration customer object in the Lago application.
1704
+ * @format uuid
1705
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1706
+ */
1707
+ id?: string;
1708
+ /**
1709
+ * The integration type used for accounting and tax syncs.
1710
+ * Accepted values: `netsuite`.
1711
+ * @example "netsuite"
1712
+ */
1713
+ integration_type?: "netsuite";
1714
+ /**
1715
+ * Unique code used to identify an integration connection.
1716
+ * @example "netsuite-eu-1"
1717
+ */
1718
+ integration_code?: string;
1719
+ /**
1720
+ * The customer ID within the integration's system. If this field is not provided, Lago has the option to create a new customer record within the integration's system on behalf of the customer.
1721
+ * @example "cus_12345"
1722
+ */
1723
+ external_customer_id?: string;
1724
+ /**
1725
+ * Set this field to `true` if you want to create a customer record in the integration's system. This option is applicable only when the `external_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`
1726
+ * @example true
1727
+ */
1728
+ sync_with_provider?: boolean;
1729
+ /**
1730
+ * This optional field is needed only when working with `netsuite` connection.
1731
+ * @example "2"
1732
+ */
1733
+ subsidiary_id?: string;
1734
+ }[];
1697
1735
  /** Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format */
1698
1736
  metadata?: {
1699
1737
  /**
@@ -1865,8 +1903,7 @@ export interface CustomerObject {
1865
1903
  updated_at?: string;
1866
1904
  /** 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. */
1867
1905
  billing_configuration?: CustomerBillingConfiguration;
1868
- /** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
1869
- integration_customer?: IntegrationCustomer;
1906
+ integration_customers?: IntegrationCustomer[];
1870
1907
  metadata?: CustomerMetadata[];
1871
1908
  }
1872
1909
  export type CustomerObjectExtended = CustomerObject & {
@@ -2725,6 +2762,11 @@ export interface InvoiceObject {
2725
2762
  * @example "2022-04-30"
2726
2763
  */
2727
2764
  payment_due_date?: string;
2765
+ /**
2766
+ * Specifies if the payment is considered as overdue.
2767
+ * @example true
2768
+ */
2769
+ payment_overdue?: boolean;
2728
2770
  /**
2729
2771
  * The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
2730
2772
  * @example 30
@@ -4393,9 +4435,9 @@ export declare class HttpClient<SecurityDataType = unknown> {
4393
4435
  }
4394
4436
  /**
4395
4437
  * @title Lago API documentation
4396
- * @version 1.5.0
4438
+ * @version 1.6.0
4397
4439
  * @license AGPLv3
4398
- * @baseUrl https://api.getlago.com/api/v1
4440
+ * @baseUrl https://{region}.getlago.com/api/v1
4399
4441
  * @externalDocs https://github.com/getlago
4400
4442
  * @contact <tech@getlago.com>
4401
4443
  *
@@ -5208,6 +5250,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5208
5250
  status?: "draft" | "finalized";
5209
5251
  /** Filter invoices by payment status. Possible values are `pending`, `failed` or `succeeded`. */
5210
5252
  payment_status?: "pending" | "failed" | "succeeded";
5253
+ /**
5254
+ * Filter invoices by payment_overdue. Possible values are `true` or `false`.
5255
+ * @example true
5256
+ */
5257
+ payment_overdue?: boolean;
5211
5258
  }, params?: RequestParams) => Promise<HttpResponse<InvoicesPaginated, ApiErrorUnauthorized>>;
5212
5259
  /**
5213
5260
  * @description This endpoint is used for updating an existing invoice.
@@ -19,7 +19,7 @@ var ContentType;
19
19
  ContentType["Text"] = "text/plain";
20
20
  })(ContentType = exports.ContentType || (exports.ContentType = {}));
21
21
  class HttpClient {
22
- baseUrl = "https://api.getlago.com/api/v1";
22
+ baseUrl = "https://{region}.getlago.com/api/v1";
23
23
  securityData = null;
24
24
  securityWorker;
25
25
  abortControllers = new Map();
@@ -152,9 +152,9 @@ class HttpClient {
152
152
  exports.HttpClient = HttpClient;
153
153
  /**
154
154
  * @title Lago API documentation
155
- * @version 1.5.0
155
+ * @version 1.6.0
156
156
  * @license AGPLv3
157
- * @baseUrl https://api.getlago.com/api/v1
157
+ * @baseUrl https://{region}.getlago.com/api/v1
158
158
  * @externalDocs https://github.com/getlago
159
159
  * @contact <tech@getlago.com>
160
160
  *