lago-javascript-client 0.19.4-alpha → 0.21.0-beta
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.
- package/README.md +1 -1
- package/esm/swagger/client.js +49 -2
- package/package.json +2 -1
- package/script/swagger/client.js +49 -2
- package/types/swagger/client.d.ts +47 -9
package/README.md
CHANGED
package/esm/swagger/client.js
CHANGED
|
@@ -148,7 +148,7 @@ export class HttpClient {
|
|
|
148
148
|
}
|
|
149
149
|
/**
|
|
150
150
|
* @title Lago API documentation
|
|
151
|
-
* @version 0.0
|
|
151
|
+
* @version 0.21.0-beta
|
|
152
152
|
* @baseUrl https://api.getlago.com/api/v1
|
|
153
153
|
* @externalDocs https://github.com/getlago
|
|
154
154
|
* @contact <tech@getlago.com>
|
|
@@ -859,12 +859,59 @@ export class Api extends HttpClient {
|
|
|
859
859
|
format: "json",
|
|
860
860
|
...params,
|
|
861
861
|
}),
|
|
862
|
+
/**
|
|
863
|
+
* @description Retry invoice payment
|
|
864
|
+
*
|
|
865
|
+
* @tags invoices
|
|
866
|
+
* @name RetryPayment
|
|
867
|
+
* @summary Retry invoice payment
|
|
868
|
+
* @request POST:/invoices/{id}/retry_payment
|
|
869
|
+
* @secure
|
|
870
|
+
*/
|
|
871
|
+
retryPayment: (id, params = {}) => this.request({
|
|
872
|
+
path: `/invoices/${id}/retry_payment`,
|
|
873
|
+
method: "POST",
|
|
874
|
+
secure: true,
|
|
875
|
+
...params,
|
|
876
|
+
}),
|
|
877
|
+
/**
|
|
878
|
+
* @description Refresh a draft invoice
|
|
879
|
+
*
|
|
880
|
+
* @tags invoices
|
|
881
|
+
* @name RefreshInvoice
|
|
882
|
+
* @summary Refresh a draft invoice
|
|
883
|
+
* @request PUT:/invoices/{id}/refresh
|
|
884
|
+
* @secure
|
|
885
|
+
*/
|
|
886
|
+
refreshInvoice: (id, params = {}) => this.request({
|
|
887
|
+
path: `/invoices/${id}/refresh`,
|
|
888
|
+
method: "PUT",
|
|
889
|
+
secure: true,
|
|
890
|
+
format: "json",
|
|
891
|
+
...params,
|
|
892
|
+
}),
|
|
893
|
+
/**
|
|
894
|
+
* @description Finalize a draft invoice
|
|
895
|
+
*
|
|
896
|
+
* @tags invoices
|
|
897
|
+
* @name FinalizeInvoice
|
|
898
|
+
* @summary Finalize a draft invoice
|
|
899
|
+
* @request PUT:/invoices/{id}/finalize
|
|
900
|
+
* @secure
|
|
901
|
+
*/
|
|
902
|
+
finalizeInvoice: (id, params = {}) => this.request({
|
|
903
|
+
path: `/invoices/${id}/finalize`,
|
|
904
|
+
method: "PUT",
|
|
905
|
+
secure: true,
|
|
906
|
+
format: "json",
|
|
907
|
+
...params,
|
|
908
|
+
}),
|
|
862
909
|
/**
|
|
863
910
|
* @description Find all invoices in certain organisation
|
|
864
911
|
*
|
|
865
912
|
* @tags invoices
|
|
866
913
|
* @name FindAllInvoices
|
|
867
|
-
* @summary Find
|
|
914
|
+
* @summary Find all invoices
|
|
868
915
|
* @request GET:/invoices/
|
|
869
916
|
* @secure
|
|
870
917
|
*/
|
package/package.json
CHANGED
package/script/swagger/client.js
CHANGED
|
@@ -152,7 +152,7 @@ class HttpClient {
|
|
|
152
152
|
exports.HttpClient = HttpClient;
|
|
153
153
|
/**
|
|
154
154
|
* @title Lago API documentation
|
|
155
|
-
* @version 0.0
|
|
155
|
+
* @version 0.21.0-beta
|
|
156
156
|
* @baseUrl https://api.getlago.com/api/v1
|
|
157
157
|
* @externalDocs https://github.com/getlago
|
|
158
158
|
* @contact <tech@getlago.com>
|
|
@@ -863,12 +863,59 @@ class Api extends HttpClient {
|
|
|
863
863
|
format: "json",
|
|
864
864
|
...params,
|
|
865
865
|
}),
|
|
866
|
+
/**
|
|
867
|
+
* @description Retry invoice payment
|
|
868
|
+
*
|
|
869
|
+
* @tags invoices
|
|
870
|
+
* @name RetryPayment
|
|
871
|
+
* @summary Retry invoice payment
|
|
872
|
+
* @request POST:/invoices/{id}/retry_payment
|
|
873
|
+
* @secure
|
|
874
|
+
*/
|
|
875
|
+
retryPayment: (id, params = {}) => this.request({
|
|
876
|
+
path: `/invoices/${id}/retry_payment`,
|
|
877
|
+
method: "POST",
|
|
878
|
+
secure: true,
|
|
879
|
+
...params,
|
|
880
|
+
}),
|
|
881
|
+
/**
|
|
882
|
+
* @description Refresh a draft invoice
|
|
883
|
+
*
|
|
884
|
+
* @tags invoices
|
|
885
|
+
* @name RefreshInvoice
|
|
886
|
+
* @summary Refresh a draft invoice
|
|
887
|
+
* @request PUT:/invoices/{id}/refresh
|
|
888
|
+
* @secure
|
|
889
|
+
*/
|
|
890
|
+
refreshInvoice: (id, params = {}) => this.request({
|
|
891
|
+
path: `/invoices/${id}/refresh`,
|
|
892
|
+
method: "PUT",
|
|
893
|
+
secure: true,
|
|
894
|
+
format: "json",
|
|
895
|
+
...params,
|
|
896
|
+
}),
|
|
897
|
+
/**
|
|
898
|
+
* @description Finalize a draft invoice
|
|
899
|
+
*
|
|
900
|
+
* @tags invoices
|
|
901
|
+
* @name FinalizeInvoice
|
|
902
|
+
* @summary Finalize a draft invoice
|
|
903
|
+
* @request PUT:/invoices/{id}/finalize
|
|
904
|
+
* @secure
|
|
905
|
+
*/
|
|
906
|
+
finalizeInvoice: (id, params = {}) => this.request({
|
|
907
|
+
path: `/invoices/${id}/finalize`,
|
|
908
|
+
method: "PUT",
|
|
909
|
+
secure: true,
|
|
910
|
+
format: "json",
|
|
911
|
+
...params,
|
|
912
|
+
}),
|
|
866
913
|
/**
|
|
867
914
|
* @description Find all invoices in certain organisation
|
|
868
915
|
*
|
|
869
916
|
* @tags invoices
|
|
870
917
|
* @name FindAllInvoices
|
|
871
|
-
* @summary Find
|
|
918
|
+
* @summary Find all invoices
|
|
872
919
|
* @request GET:/invoices/
|
|
873
920
|
* @secure
|
|
874
921
|
*/
|
|
@@ -19,6 +19,10 @@ export interface BillableMetricObject {
|
|
|
19
19
|
/** Aggregation type */
|
|
20
20
|
aggregation_type?: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg" | "recurring_count_agg";
|
|
21
21
|
group?: BillableMetricGroup;
|
|
22
|
+
/** @example 0 */
|
|
23
|
+
active_subscriptions_count?: number;
|
|
24
|
+
/** @example 0 */
|
|
25
|
+
draft_invoices_count?: number;
|
|
22
26
|
}
|
|
23
27
|
export interface BillableMetric {
|
|
24
28
|
billable_metric?: BillableMetricObject;
|
|
@@ -242,10 +246,10 @@ export interface AppliedCouponInput {
|
|
|
242
246
|
export interface BillingConfigurationOrganization {
|
|
243
247
|
/** @example "text" */
|
|
244
248
|
invoice_footer?: string;
|
|
245
|
-
/** @example 25 */
|
|
246
|
-
vat_rate?: number;
|
|
247
249
|
/** @example 5 */
|
|
248
250
|
invoice_grace_period?: number;
|
|
251
|
+
/** @example 25 */
|
|
252
|
+
vat_rate?: number;
|
|
249
253
|
}
|
|
250
254
|
export interface OrganizationObject {
|
|
251
255
|
/** @example "183da83c-c007-4fbb-afcd-b00c07c41ffe" */
|
|
@@ -311,14 +315,14 @@ export interface OrganizationInput {
|
|
|
311
315
|
export interface BillingConfigurationCustomer {
|
|
312
316
|
/** @example 3 */
|
|
313
317
|
invoice_grace_period?: number;
|
|
314
|
-
/** @example 25 */
|
|
315
|
-
vat_rate?: number;
|
|
316
318
|
/** Payment provider type */
|
|
317
319
|
payment_provider?: "stripe" | "gocardless";
|
|
318
320
|
/** @example 123456 */
|
|
319
321
|
provider_customer_id?: string;
|
|
320
322
|
/** @example true */
|
|
321
323
|
sync_with_provider?: boolean;
|
|
324
|
+
/** @example 25 */
|
|
325
|
+
vat_rate?: number;
|
|
322
326
|
[key: string]: any;
|
|
323
327
|
}
|
|
324
328
|
export interface CustomerObject {
|
|
@@ -723,9 +727,8 @@ export interface InvoiceObject {
|
|
|
723
727
|
number?: string;
|
|
724
728
|
/** @example "2022-09-14T16:35:31.000Z" */
|
|
725
729
|
issuing_date?: string;
|
|
726
|
-
/** Invoice type */
|
|
727
730
|
invoice_type?: "subscription" | "add_on" | "credit";
|
|
728
|
-
|
|
731
|
+
status?: "draft" | "finalized";
|
|
729
732
|
payment_status?: "pending" | "succeeded" | "failed";
|
|
730
733
|
/** @example 1200 */
|
|
731
734
|
amount_cents?: number;
|
|
@@ -1066,7 +1069,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
1066
1069
|
}
|
|
1067
1070
|
/**
|
|
1068
1071
|
* @title Lago API documentation
|
|
1069
|
-
* @version 0.0
|
|
1072
|
+
* @version 0.21.0-beta
|
|
1070
1073
|
* @baseUrl https://api.getlago.com/api/v1
|
|
1071
1074
|
* @externalDocs https://github.com/getlago
|
|
1072
1075
|
* @contact <tech@getlago.com>
|
|
@@ -1114,7 +1117,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1114
1117
|
* @request DELETE:/billable_metrics/{code}
|
|
1115
1118
|
* @secure
|
|
1116
1119
|
*/
|
|
1117
|
-
destroyBillableMetric: (code: string, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiResponseUnauthorized | ApiResponseNotFound
|
|
1120
|
+
destroyBillableMetric: (code: string, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1118
1121
|
/**
|
|
1119
1122
|
* @description Find all billable metrics in certain organisation
|
|
1120
1123
|
*
|
|
@@ -1603,12 +1606,42 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1603
1606
|
* @secure
|
|
1604
1607
|
*/
|
|
1605
1608
|
downloadInvoice: (id: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1609
|
+
/**
|
|
1610
|
+
* @description Retry invoice payment
|
|
1611
|
+
*
|
|
1612
|
+
* @tags invoices
|
|
1613
|
+
* @name RetryPayment
|
|
1614
|
+
* @summary Retry invoice payment
|
|
1615
|
+
* @request POST:/invoices/{id}/retry_payment
|
|
1616
|
+
* @secure
|
|
1617
|
+
*/
|
|
1618
|
+
retryPayment: (id: string, params?: RequestParams) => Promise<HttpResponse<void, ApiResponseUnauthorized | ApiResponseNotFound | ApiResponseNotAllowed>>;
|
|
1619
|
+
/**
|
|
1620
|
+
* @description Refresh a draft invoice
|
|
1621
|
+
*
|
|
1622
|
+
* @tags invoices
|
|
1623
|
+
* @name RefreshInvoice
|
|
1624
|
+
* @summary Refresh a draft invoice
|
|
1625
|
+
* @request PUT:/invoices/{id}/refresh
|
|
1626
|
+
* @secure
|
|
1627
|
+
*/
|
|
1628
|
+
refreshInvoice: (id: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1629
|
+
/**
|
|
1630
|
+
* @description Finalize a draft invoice
|
|
1631
|
+
*
|
|
1632
|
+
* @tags invoices
|
|
1633
|
+
* @name FinalizeInvoice
|
|
1634
|
+
* @summary Finalize a draft invoice
|
|
1635
|
+
* @request PUT:/invoices/{id}/finalize
|
|
1636
|
+
* @secure
|
|
1637
|
+
*/
|
|
1638
|
+
finalizeInvoice: (id: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1606
1639
|
/**
|
|
1607
1640
|
* @description Find all invoices in certain organisation
|
|
1608
1641
|
*
|
|
1609
1642
|
* @tags invoices
|
|
1610
1643
|
* @name FindAllInvoices
|
|
1611
|
-
* @summary Find
|
|
1644
|
+
* @summary Find all invoices
|
|
1612
1645
|
* @request GET:/invoices/
|
|
1613
1646
|
* @secure
|
|
1614
1647
|
*/
|
|
@@ -1638,6 +1671,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1638
1671
|
* @example "2022-08-09T00:00:00.000Z"
|
|
1639
1672
|
*/
|
|
1640
1673
|
issuing_date_to?: string;
|
|
1674
|
+
/**
|
|
1675
|
+
* Status (draft or finalized)
|
|
1676
|
+
* @example "draft"
|
|
1677
|
+
*/
|
|
1678
|
+
status?: string;
|
|
1641
1679
|
}, params?: RequestParams) => Promise<HttpResponse<Invoices, ApiResponseUnauthorized>>;
|
|
1642
1680
|
};
|
|
1643
1681
|
wallets: {
|