lago-javascript-client 0.29.0-beta → 0.31.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.
@@ -148,7 +148,7 @@ export class HttpClient {
148
148
  }
149
149
  /**
150
150
  * @title Lago API documentation
151
- * @version 0.28.0-beta
151
+ * @version 0.30.0-beta
152
152
  * @baseUrl https://api.getlago.com/api/v1
153
153
  * @externalDocs https://github.com/getlago
154
154
  * @contact <tech@getlago.com>
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.29.0-beta",
7
+ "version": "v0.31.0-beta",
8
8
  "description": "Lago JavaScript API Client",
9
9
  "repository": {
10
10
  "type": "git",
@@ -20,7 +20,8 @@
20
20
  "Lovro Colic",
21
21
  "Jérémy Denquin",
22
22
  "Arjun Yelamanchili",
23
- "Vincent Pochet"
23
+ "Vincent Pochet",
24
+ "Romain Sempé"
24
25
  ],
25
26
  "license": "MIT",
26
27
  "bugs": {
@@ -152,7 +152,7 @@ class HttpClient {
152
152
  exports.HttpClient = HttpClient;
153
153
  /**
154
154
  * @title Lago API documentation
155
- * @version 0.28.0-beta
155
+ * @version 0.30.0-beta
156
156
  * @baseUrl https://api.getlago.com/api/v1
157
157
  * @externalDocs https://github.com/getlago
158
158
  * @contact <tech@getlago.com>
@@ -568,6 +568,8 @@ export interface ChargeUsageObject {
568
568
  /** Charge model type */
569
569
  charge_model?: "standard" | "graduated" | "package" | "percentage" | "volume";
570
570
  instant?: boolean;
571
+ /** @example 1200 */
572
+ min_amount_cents?: number;
571
573
  };
572
574
  billable_metric: {
573
575
  /**
@@ -749,6 +751,8 @@ export interface ChargeObject {
749
751
  charge_model: "standard" | "graduated" | "package" | "percentage" | "volume";
750
752
  /** @example true */
751
753
  instant?: boolean;
754
+ /** @example 1200 */
755
+ min_amount_cents?: number;
752
756
  properties?: object;
753
757
  group_properties?: GroupPropertiesObject[];
754
758
  }
@@ -828,6 +832,7 @@ export interface PlanInput {
828
832
  /** Charge model type */
829
833
  charge_model?: "standard" | "graduated" | "package" | "percentage" | "volume";
830
834
  instant?: boolean;
835
+ min_amount_cents?: number;
831
836
  properties?: object;
832
837
  group_properties?: {
833
838
  /** @example "123456" */
@@ -942,6 +947,8 @@ export interface CreditObject {
942
947
  amount_cents: number;
943
948
  /** @example "EUR" */
944
949
  amount_currency: string;
950
+ /** @example false */
951
+ before_vat: boolean;
945
952
  item: {
946
953
  /**
947
954
  * @format uuid
@@ -980,6 +987,16 @@ export interface FeeObject {
980
987
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
981
988
  */
982
989
  lago_invoice_id?: string;
990
+ /**
991
+ * @format uuid
992
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
993
+ */
994
+ lago_true_up_fee_id?: string;
995
+ /**
996
+ * @format uuid
997
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
998
+ */
999
+ lago_true_up_parent_fee_id?: string;
983
1000
  /** @example "54321" */
984
1001
  external_subscription_id?: string;
985
1002
  /** @example 1000 */
@@ -1070,36 +1087,68 @@ export interface InvoiceObject {
1070
1087
  sequential_id: number;
1071
1088
  /** @example "222345" */
1072
1089
  number: string;
1073
- /**
1074
- * @format date-time
1075
- * @example "2022-09-14T16:35:31Z"
1076
- */
1077
- charges_from_date: string;
1078
1090
  /**
1079
1091
  * @format date-time
1080
1092
  * @example "2022-09-14T16:35:31Z"
1081
1093
  */
1082
1094
  issuing_date: string;
1083
- invoice_type?: "subscription" | "add_on" | "credit";
1095
+ invoice_type: "subscription" | "add_on" | "credit";
1084
1096
  status: "draft" | "finalized";
1085
1097
  payment_status: "pending" | "succeeded" | "failed";
1086
- /** @example 1200 */
1087
- amount_cents: number;
1088
1098
  /** @example "EUR" */
1089
- amount_currency: string;
1099
+ currency: string;
1100
+ /** @example 20 */
1101
+ fees_amount_cents: number;
1102
+ /** @example 20 */
1103
+ coupons_amount_cents: number;
1104
+ /** @example 20 */
1105
+ credit_notes_amount_cents: number;
1106
+ /** @example 20 */
1107
+ sub_total_vat_excluded_amount_cents: number;
1090
1108
  /** @example 20 */
1091
1109
  vat_amount_cents: number;
1092
- /** @example "EUR" */
1093
- vat_amount_currency: string;
1094
1110
  /** @example 20 */
1111
+ sub_total_vat_included_amount_cents: number;
1112
+ /** @example 20 */
1113
+ prepaid_credit_amount_cents: number;
1114
+ /** @example 20 */
1115
+ total_amount_cents: number;
1116
+ /** @example 2 */
1117
+ version_number: number;
1118
+ /**
1119
+ * @deprecated
1120
+ * @example 1200
1121
+ */
1122
+ amount_cents: number;
1123
+ /**
1124
+ * @deprecated
1125
+ * @example "EUR"
1126
+ */
1127
+ amount_currency: string;
1128
+ /**
1129
+ * @deprecated
1130
+ * @example "EUR"
1131
+ */
1132
+ vat_amount_currency: string;
1133
+ /**
1134
+ * @deprecated
1135
+ * @example 20
1136
+ */
1095
1137
  credit_amount_cents: number;
1096
- /** @example "EUR" */
1138
+ /**
1139
+ * @deprecated
1140
+ * @example "EUR"
1141
+ */
1097
1142
  credit_amount_currency: string;
1098
- /** @example 1220 */
1099
- total_amount_cents: number;
1100
- /** @example "EUR" */
1143
+ /**
1144
+ * @deprecated
1145
+ * @example "EUR"
1146
+ */
1101
1147
  total_amount_currency: string;
1102
- /** @example true */
1148
+ /**
1149
+ * @deprecated
1150
+ * @example true
1151
+ */
1103
1152
  legacy: boolean;
1104
1153
  /** @example "https://example.com" */
1105
1154
  file_url?: string;
@@ -1124,7 +1173,7 @@ export interface InvoicesPaginated {
1124
1173
  export interface InvoiceInput {
1125
1174
  invoice: {
1126
1175
  /** Status */
1127
- payment_status: "pending" | "succeeded" | "failed";
1176
+ payment_status?: "pending" | "succeeded" | "failed";
1128
1177
  metadata?: {
1129
1178
  /**
1130
1179
  * @format uuid
@@ -1329,30 +1378,52 @@ export interface CreditNoteObject {
1329
1378
  reason: "duplicated_charge" | "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "other";
1330
1379
  /** @example "description" */
1331
1380
  description?: string;
1381
+ /** @example "EUR" */
1382
+ currency: string;
1332
1383
  /** @example 1220 */
1333
1384
  total_amount_cents: number;
1334
- /** @example "EUR" */
1385
+ /**
1386
+ * @deprecated
1387
+ * @example "EUR"
1388
+ */
1335
1389
  total_amount_currency: string;
1336
1390
  /** @example 20 */
1337
1391
  vat_amount_cents: number;
1338
- /** @example "EUR" */
1392
+ /**
1393
+ * @deprecated
1394
+ * @example "EUR"
1395
+ */
1339
1396
  vat_amount_currency: string;
1340
1397
  /** @example 1000 */
1341
1398
  sub_total_vat_excluded_amount_cents: number;
1342
- /** @example "EUR" */
1399
+ /**
1400
+ * @deprecated
1401
+ * @example "EUR"
1402
+ */
1343
1403
  sub_total_vat_excluded_amount_currency: string;
1344
1404
  /** @example 20 */
1345
1405
  balance_amount_cents: number;
1346
- /** @example "EUR" */
1406
+ /**
1407
+ * @deprecated
1408
+ * @example "EUR"
1409
+ */
1347
1410
  balance_amount_currency: string;
1348
1411
  /** @example 20 */
1349
1412
  credit_amount_cents: number;
1350
- /** @example "EUR" */
1413
+ /**
1414
+ * @deprecated
1415
+ * @example "EUR"
1416
+ */
1351
1417
  credit_amount_currency: string;
1352
1418
  /** @example 20 */
1353
1419
  refund_amount_cents: number;
1354
- /** @example "EUR" */
1420
+ /**
1421
+ * @deprecated
1422
+ * @example "EUR"
1423
+ */
1355
1424
  refund_amount_currency: string;
1425
+ /** @example 20 */
1426
+ coupons_adjustement_amount_cents: number;
1356
1427
  /**
1357
1428
  * @format date-time
1358
1429
  * @example "2022-09-14T16:35:31Z"
@@ -1540,7 +1611,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
1540
1611
  }
1541
1612
  /**
1542
1613
  * @title Lago API documentation
1543
- * @version 0.28.0-beta
1614
+ * @version 0.30.0-beta
1544
1615
  * @baseUrl https://api.getlago.com/api/v1
1545
1616
  * @externalDocs https://github.com/getlago
1546
1617
  * @contact <tech@getlago.com>