lago-javascript-client 0.28.0-beta → 0.29.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/package.json +3 -2
- package/types/openapi/client.d.ts +52 -30
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"types": "./types/mod.d.ts",
|
|
5
5
|
"name": "lago-javascript-client",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"version": "v0.
|
|
7
|
+
"version": "v0.29.0-beta",
|
|
8
8
|
"description": "Lago JavaScript API Client",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"contributors": [
|
|
20
20
|
"Lovro Colic",
|
|
21
21
|
"Jérémy Denquin",
|
|
22
|
-
"Arjun Yelamanchili"
|
|
22
|
+
"Arjun Yelamanchili",
|
|
23
|
+
"Vincent Pochet"
|
|
23
24
|
],
|
|
24
25
|
"license": "MIT",
|
|
25
26
|
"bugs": {
|
|
@@ -35,8 +35,9 @@ export interface BillableMetricObject {
|
|
|
35
35
|
export interface BillableMetric {
|
|
36
36
|
billable_metric: BillableMetricObject;
|
|
37
37
|
}
|
|
38
|
-
export interface
|
|
38
|
+
export interface BillableMetricsPaginated {
|
|
39
39
|
billable_metrics: BillableMetricObject[];
|
|
40
|
+
meta: PaginationMeta;
|
|
40
41
|
}
|
|
41
42
|
export interface BillableMetricInput {
|
|
42
43
|
billable_metric: {
|
|
@@ -64,8 +65,9 @@ export interface GroupObject {
|
|
|
64
65
|
/** @example "EU" */
|
|
65
66
|
value: string;
|
|
66
67
|
}
|
|
67
|
-
export interface
|
|
68
|
+
export interface GroupsPaginated {
|
|
68
69
|
groups: GroupObject[];
|
|
70
|
+
meta: PaginationMeta;
|
|
69
71
|
}
|
|
70
72
|
export interface AddOnObject {
|
|
71
73
|
/**
|
|
@@ -92,8 +94,9 @@ export interface AddOnObject {
|
|
|
92
94
|
export interface AddOn {
|
|
93
95
|
add_on: AddOnObject;
|
|
94
96
|
}
|
|
95
|
-
export interface
|
|
97
|
+
export interface AddOnsPaginated {
|
|
96
98
|
add_ons: AddOnObject[];
|
|
99
|
+
meta: PaginationMeta;
|
|
97
100
|
}
|
|
98
101
|
export interface AddOnInput {
|
|
99
102
|
add_on: {
|
|
@@ -175,6 +178,9 @@ export interface CouponObject {
|
|
|
175
178
|
/** @example true */
|
|
176
179
|
limited_plans?: boolean;
|
|
177
180
|
plan_codes?: string[];
|
|
181
|
+
/** @example true */
|
|
182
|
+
limited_billable_metrics?: boolean;
|
|
183
|
+
billable_metric_codes?: string[];
|
|
178
184
|
/**
|
|
179
185
|
* @format date-time
|
|
180
186
|
* @example "2022-09-14T16:35:31Z"
|
|
@@ -197,8 +203,9 @@ export interface CouponObject {
|
|
|
197
203
|
export interface Coupon {
|
|
198
204
|
coupon: CouponObject;
|
|
199
205
|
}
|
|
200
|
-
export interface
|
|
206
|
+
export interface CouponsPaginated {
|
|
201
207
|
coupons: CouponObject[];
|
|
208
|
+
meta: PaginationMeta;
|
|
202
209
|
}
|
|
203
210
|
export interface CouponInput {
|
|
204
211
|
coupon: {
|
|
@@ -229,6 +236,7 @@ export interface CouponInput {
|
|
|
229
236
|
expiration?: "no_expiration" | "time_limit";
|
|
230
237
|
applies_to?: {
|
|
231
238
|
plan_codes?: string[];
|
|
239
|
+
billable_metric_codes?: string[];
|
|
232
240
|
};
|
|
233
241
|
};
|
|
234
242
|
}
|
|
@@ -283,13 +291,16 @@ export interface AppliedCouponObject {
|
|
|
283
291
|
* @example "2022-09-14T16:35:31Z"
|
|
284
292
|
*/
|
|
285
293
|
terminated_at?: string;
|
|
286
|
-
credits: CreditObject[];
|
|
287
294
|
}
|
|
295
|
+
export type AppliedCouponObjectExtended = AppliedCouponObject & {
|
|
296
|
+
credits: CreditObject[];
|
|
297
|
+
};
|
|
288
298
|
export interface AppliedCoupon {
|
|
289
299
|
applied_coupon: AppliedCouponObject;
|
|
290
300
|
}
|
|
291
|
-
export interface
|
|
292
|
-
applied_coupons:
|
|
301
|
+
export interface AppliedCouponsPaginated {
|
|
302
|
+
applied_coupons: AppliedCouponObjectExtended[];
|
|
303
|
+
meta: PaginationMeta;
|
|
293
304
|
}
|
|
294
305
|
export interface AppliedCouponInput {
|
|
295
306
|
applied_coupon: {
|
|
@@ -484,8 +495,9 @@ export interface CustomerObject {
|
|
|
484
495
|
export interface Customer {
|
|
485
496
|
customer: CustomerObject;
|
|
486
497
|
}
|
|
487
|
-
export interface
|
|
498
|
+
export interface CustomersPaginated {
|
|
488
499
|
customers: CustomerObject[];
|
|
500
|
+
meta: PaginationMeta;
|
|
489
501
|
}
|
|
490
502
|
export interface CustomerInput {
|
|
491
503
|
customer: {
|
|
@@ -701,10 +713,9 @@ export interface BatchEventInput {
|
|
|
701
713
|
export interface Fees {
|
|
702
714
|
fees: FeeObject[];
|
|
703
715
|
}
|
|
704
|
-
export
|
|
705
|
-
fees: FeeObject[];
|
|
716
|
+
export type FeesPaginated = Fees & {
|
|
706
717
|
meta: PaginationMeta;
|
|
707
|
-
}
|
|
718
|
+
};
|
|
708
719
|
export interface FeeUpdateInput {
|
|
709
720
|
invoice: {
|
|
710
721
|
/** Status */
|
|
@@ -779,8 +790,9 @@ export interface PlanObject {
|
|
|
779
790
|
export interface Plan {
|
|
780
791
|
plan: PlanObject;
|
|
781
792
|
}
|
|
782
|
-
export interface
|
|
793
|
+
export interface PlansPaginated {
|
|
783
794
|
plans: PlanObject[];
|
|
795
|
+
meta: PaginationMeta;
|
|
784
796
|
}
|
|
785
797
|
export interface PlanInput {
|
|
786
798
|
plan: {
|
|
@@ -886,8 +898,9 @@ export interface SubscriptionObject {
|
|
|
886
898
|
export interface Subscription {
|
|
887
899
|
subscription: SubscriptionObject;
|
|
888
900
|
}
|
|
889
|
-
export interface
|
|
901
|
+
export interface SubscriptionsPaginated {
|
|
890
902
|
subscriptions: SubscriptionObject[];
|
|
903
|
+
meta: PaginationMeta;
|
|
891
904
|
}
|
|
892
905
|
export interface SubscriptionCreateInput {
|
|
893
906
|
subscription: {
|
|
@@ -1091,17 +1104,23 @@ export interface InvoiceObject {
|
|
|
1091
1104
|
/** @example "https://example.com" */
|
|
1092
1105
|
file_url?: string;
|
|
1093
1106
|
customer: CustomerObject;
|
|
1094
|
-
subscriptions: SubscriptionObject[];
|
|
1095
1107
|
metadata?: InvoiceMetadataObject[];
|
|
1096
|
-
fees: FeeObject[];
|
|
1097
|
-
credits: CreditObject[];
|
|
1098
1108
|
}
|
|
1109
|
+
export type InvoiceObjectExtended = InvoiceObject & {
|
|
1110
|
+
credits: CreditObject[];
|
|
1111
|
+
fees: FeeObject[];
|
|
1112
|
+
subscriptions: SubscriptionObject[];
|
|
1113
|
+
};
|
|
1099
1114
|
export interface Invoice {
|
|
1100
|
-
invoice:
|
|
1115
|
+
invoice: InvoiceObjectExtended;
|
|
1101
1116
|
}
|
|
1102
1117
|
export interface Invoices {
|
|
1103
1118
|
invoices: InvoiceObject[];
|
|
1104
1119
|
}
|
|
1120
|
+
export interface InvoicesPaginated {
|
|
1121
|
+
invoices: InvoiceObject[];
|
|
1122
|
+
meta: PaginationMeta;
|
|
1123
|
+
}
|
|
1105
1124
|
export interface InvoiceInput {
|
|
1106
1125
|
invoice: {
|
|
1107
1126
|
/** Status */
|
|
@@ -1180,8 +1199,9 @@ export interface WalletObject {
|
|
|
1180
1199
|
export interface Wallet {
|
|
1181
1200
|
wallet: WalletObject;
|
|
1182
1201
|
}
|
|
1183
|
-
export interface
|
|
1202
|
+
export interface WalletsPaginated {
|
|
1184
1203
|
wallets: WalletObject[];
|
|
1204
|
+
meta: PaginationMeta;
|
|
1185
1205
|
}
|
|
1186
1206
|
export interface WalletInput {
|
|
1187
1207
|
wallet?: {
|
|
@@ -1251,6 +1271,9 @@ export interface WalletTransaction {
|
|
|
1251
1271
|
export interface WalletTransactions {
|
|
1252
1272
|
wallet_transactions: WalletTransactionObject[];
|
|
1253
1273
|
}
|
|
1274
|
+
export type WalletTransactionsPaginated = WalletTransactions & {
|
|
1275
|
+
meta: PaginationMeta;
|
|
1276
|
+
};
|
|
1254
1277
|
export interface WalletTransactionInput {
|
|
1255
1278
|
wallet_transaction: {
|
|
1256
1279
|
/**
|
|
@@ -1342,7 +1365,6 @@ export interface CreditNoteObject {
|
|
|
1342
1365
|
updated_at: string;
|
|
1343
1366
|
/** @example "https://example.com" */
|
|
1344
1367
|
file_url?: string;
|
|
1345
|
-
customer?: CustomerObject;
|
|
1346
1368
|
items?: CreditNoteItemObject[];
|
|
1347
1369
|
}
|
|
1348
1370
|
export interface CreditNote {
|
|
@@ -1557,7 +1579,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1557
1579
|
* @example 20
|
|
1558
1580
|
*/
|
|
1559
1581
|
per_page?: number;
|
|
1560
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
1582
|
+
}, params?: RequestParams) => Promise<HttpResponse<BillableMetricsPaginated, ApiResponseUnauthorized>>;
|
|
1561
1583
|
/**
|
|
1562
1584
|
* @description Update an existing billable metric by code
|
|
1563
1585
|
*
|
|
@@ -1608,7 +1630,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1608
1630
|
* @example 20
|
|
1609
1631
|
*/
|
|
1610
1632
|
per_page?: number;
|
|
1611
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
1633
|
+
}, params?: RequestParams) => Promise<HttpResponse<GroupsPaginated, ApiResponseUnauthorized>>;
|
|
1612
1634
|
};
|
|
1613
1635
|
addOns: {
|
|
1614
1636
|
/**
|
|
@@ -1641,7 +1663,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1641
1663
|
* @example 20
|
|
1642
1664
|
*/
|
|
1643
1665
|
per_page?: number;
|
|
1644
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
1666
|
+
}, params?: RequestParams) => Promise<HttpResponse<AddOnsPaginated, ApiResponseUnauthorized>>;
|
|
1645
1667
|
/**
|
|
1646
1668
|
* @description Update an existing add-on by code
|
|
1647
1669
|
*
|
|
@@ -1716,7 +1738,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1716
1738
|
* @example 20
|
|
1717
1739
|
*/
|
|
1718
1740
|
per_page?: number;
|
|
1719
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
1741
|
+
}, params?: RequestParams) => Promise<HttpResponse<CouponsPaginated, ApiResponseUnauthorized>>;
|
|
1720
1742
|
/**
|
|
1721
1743
|
* @description Update an existing coupon by code
|
|
1722
1744
|
*
|
|
@@ -1786,7 +1808,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1786
1808
|
* @example "12345"
|
|
1787
1809
|
*/
|
|
1788
1810
|
external_customer_id?: string;
|
|
1789
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
1811
|
+
}, params?: RequestParams) => Promise<HttpResponse<AppliedCouponsPaginated, ApiResponseUnauthorized>>;
|
|
1790
1812
|
};
|
|
1791
1813
|
organizations: {
|
|
1792
1814
|
/**
|
|
@@ -1831,7 +1853,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1831
1853
|
* @example 20
|
|
1832
1854
|
*/
|
|
1833
1855
|
per_page?: number;
|
|
1834
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
1856
|
+
}, params?: RequestParams) => Promise<HttpResponse<CustomersPaginated, ApiResponseUnauthorized>>;
|
|
1835
1857
|
/**
|
|
1836
1858
|
* @description Return a single customer
|
|
1837
1859
|
*
|
|
@@ -1967,7 +1989,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1967
1989
|
* @example 20
|
|
1968
1990
|
*/
|
|
1969
1991
|
per_page?: number;
|
|
1970
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
1992
|
+
}, params?: RequestParams) => Promise<HttpResponse<PlansPaginated, ApiResponseUnauthorized>>;
|
|
1971
1993
|
/**
|
|
1972
1994
|
* @description Update an existing plan by code
|
|
1973
1995
|
*
|
|
@@ -2035,7 +2057,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2035
2057
|
* @example "12345"
|
|
2036
2058
|
*/
|
|
2037
2059
|
external_customer_id: string;
|
|
2038
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
2060
|
+
}, params?: RequestParams) => Promise<HttpResponse<SubscriptionsPaginated, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
2039
2061
|
/**
|
|
2040
2062
|
* @description Update an existing subscription by external ID
|
|
2041
2063
|
*
|
|
@@ -2109,7 +2131,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2109
2131
|
issuing_date_to?: string;
|
|
2110
2132
|
/** Status */
|
|
2111
2133
|
status?: "draft" | "finalized";
|
|
2112
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
2134
|
+
}, params?: RequestParams) => Promise<HttpResponse<InvoicesPaginated, ApiResponseUnauthorized>>;
|
|
2113
2135
|
/**
|
|
2114
2136
|
* @description Update an existing invoice
|
|
2115
2137
|
*
|
|
@@ -2328,7 +2350,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2328
2350
|
* @example "12345"
|
|
2329
2351
|
*/
|
|
2330
2352
|
external_customer_id: string;
|
|
2331
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
2353
|
+
}, params?: RequestParams) => Promise<HttpResponse<WalletsPaginated, ApiResponseUnauthorized>>;
|
|
2332
2354
|
/**
|
|
2333
2355
|
* @description Update an existing wallet
|
|
2334
2356
|
*
|
|
@@ -2389,7 +2411,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2389
2411
|
* @example "inbound"
|
|
2390
2412
|
*/
|
|
2391
2413
|
transaction_type?: string;
|
|
2392
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
2414
|
+
}, params?: RequestParams) => Promise<HttpResponse<WalletTransactionsPaginated, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
2393
2415
|
};
|
|
2394
2416
|
walletTransactions: {
|
|
2395
2417
|
/**
|