lago-javascript-client 0.22.0-beta → 0.23.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.22.0-beta
151
+ * @version 0.23.0-beta
152
152
  * @baseUrl https://api.getlago.com/api/v1
153
153
  * @externalDocs https://github.com/getlago
154
154
  * @contact <tech@getlago.com>
@@ -579,6 +579,22 @@ export class Api extends HttpClient {
579
579
  format: "json",
580
580
  ...params,
581
581
  }),
582
+ /**
583
+ * @description Delete customer's appplied coupon
584
+ *
585
+ * @tags customers
586
+ * @name DeleteAppliedCoupon
587
+ * @summary Delete customer's appplied coupon
588
+ * @request DELETE:/customers/{customer_external_id}/applied_coupons/{applied_coupon_id}
589
+ * @secure
590
+ */
591
+ deleteAppliedCoupon: (customerExternalId, appliedCouponId, params = {}) => this.request({
592
+ path: `/customers/${customerExternalId}/applied_coupons/${appliedCouponId}`,
593
+ method: "DELETE",
594
+ secure: true,
595
+ format: "json",
596
+ ...params,
597
+ }),
582
598
  /**
583
599
  * @description Find all customers in certain organisation
584
600
  *
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.22.0-beta",
7
+ "version": "v0.23.0-beta",
8
8
  "description": "Lago JavaScript API Client",
9
9
  "repository": {
10
10
  "type": "git",
@@ -152,7 +152,7 @@ class HttpClient {
152
152
  exports.HttpClient = HttpClient;
153
153
  /**
154
154
  * @title Lago API documentation
155
- * @version 0.22.0-beta
155
+ * @version 0.23.0-beta
156
156
  * @baseUrl https://api.getlago.com/api/v1
157
157
  * @externalDocs https://github.com/getlago
158
158
  * @contact <tech@getlago.com>
@@ -583,6 +583,22 @@ class Api extends HttpClient {
583
583
  format: "json",
584
584
  ...params,
585
585
  }),
586
+ /**
587
+ * @description Delete customer's appplied coupon
588
+ *
589
+ * @tags customers
590
+ * @name DeleteAppliedCoupon
591
+ * @summary Delete customer's appplied coupon
592
+ * @request DELETE:/customers/{customer_external_id}/applied_coupons/{applied_coupon_id}
593
+ * @secure
594
+ */
595
+ deleteAppliedCoupon: (customerExternalId, appliedCouponId, params = {}) => this.request({
596
+ path: `/customers/${customerExternalId}/applied_coupons/${appliedCouponId}`,
597
+ method: "DELETE",
598
+ secure: true,
599
+ format: "json",
600
+ ...params,
601
+ }),
586
602
  /**
587
603
  * @description Find all customers in certain organisation
588
604
  *
@@ -140,6 +140,9 @@ export interface CouponObject {
140
140
  amount_currency?: string;
141
141
  /** @example true */
142
142
  reusable?: boolean;
143
+ /** @example true */
144
+ limited_plans?: boolean;
145
+ plan_codes?: string[];
143
146
  /** @example "2022-09-14T16:35:31.000Z" */
144
147
  created_at?: string;
145
148
  /** @example 25 */
@@ -183,6 +186,9 @@ export interface CouponInput {
183
186
  expiration_at?: string;
184
187
  /** Expiration type */
185
188
  expiration?: "no_expiration" | "time_limit";
189
+ applies_to?: {
190
+ plan_codes?: string[];
191
+ };
186
192
  };
187
193
  }
188
194
  export interface AppliedCouponObject {
@@ -248,6 +254,8 @@ export interface BillingConfigurationOrganization {
248
254
  invoice_footer?: string;
249
255
  /** @example 5 */
250
256
  invoice_grace_period?: number;
257
+ /** @example "fr" */
258
+ document_locale?: string;
251
259
  /** @example 25 */
252
260
  vat_rate?: number;
253
261
  }
@@ -269,7 +277,7 @@ export interface OrganizationObject {
269
277
  /** @example "state1" */
270
278
  state?: string;
271
279
  /** @example 10000 */
272
- zipode?: string;
280
+ zipcode?: string;
273
281
  /** @example "example@example.com" */
274
282
  email?: string;
275
283
  /** @example "City" */
@@ -298,7 +306,7 @@ export interface OrganizationInput {
298
306
  /** @example "state1" */
299
307
  state?: string;
300
308
  /** @example 10000 */
301
- zipode?: string;
309
+ zipcode?: string;
302
310
  /** @example "example@example.com" */
303
311
  email?: string;
304
312
  /** @example "City" */
@@ -321,6 +329,8 @@ export interface BillingConfigurationCustomer {
321
329
  provider_customer_id?: string;
322
330
  /** @example true */
323
331
  sync_with_provider?: boolean;
332
+ /** @example "fr" */
333
+ document_locale?: string;
324
334
  /** @example 25 */
325
335
  vat_rate?: number;
326
336
  [key: string]: any;
@@ -347,7 +357,7 @@ export interface CustomerObject {
347
357
  /** @example "state1" */
348
358
  state?: string;
349
359
  /** @example 10000 */
350
- zipode?: string;
360
+ zipcode?: string;
351
361
  /** @example "example@example.com" */
352
362
  email?: string;
353
363
  /** @example "City" */
@@ -391,7 +401,7 @@ export interface CustomerInput {
391
401
  /** @example "state1" */
392
402
  state?: string;
393
403
  /** @example 10000 */
394
- zipode?: string;
404
+ zipcode?: string;
395
405
  /** @example "example@example.com" */
396
406
  email?: string;
397
407
  /** @example "City" */
@@ -566,6 +576,10 @@ export interface PlanObject {
566
576
  pay_in_advance?: boolean;
567
577
  /** @example false */
568
578
  bill_charges_monthly?: boolean;
579
+ /** @example 2 */
580
+ active_subscriptions_count?: number;
581
+ /** @example 2 */
582
+ draft_invoices_count?: number;
569
583
  charges?: ChargeObject[];
570
584
  }
571
585
  export interface Plan {
@@ -1072,7 +1086,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
1072
1086
  }
1073
1087
  /**
1074
1088
  * @title Lago API documentation
1075
- * @version 0.22.0-beta
1089
+ * @version 0.23.0-beta
1076
1090
  * @baseUrl https://api.getlago.com/api/v1
1077
1091
  * @externalDocs https://github.com/getlago
1078
1092
  * @contact <tech@getlago.com>
@@ -1204,7 +1218,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
1204
1218
  * @request DELETE:/add_ons/{code}
1205
1219
  * @secure
1206
1220
  */
1207
- destroyAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiResponseUnauthorized | ApiResponseNotFound | ApiResponseNotAllowed>>;
1221
+ destroyAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiResponseUnauthorized | ApiResponseNotFound>>;
1208
1222
  /**
1209
1223
  * @description Find all add-ons in certain organisation
1210
1224
  *
@@ -1279,7 +1293,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
1279
1293
  * @request DELETE:/coupons/{code}
1280
1294
  * @secure
1281
1295
  */
1282
- destroyCoupon: (code: string, params?: RequestParams) => Promise<HttpResponse<Coupon, ApiResponseUnauthorized | ApiResponseNotFound | ApiResponseNotAllowed>>;
1296
+ destroyCoupon: (code: string, params?: RequestParams) => Promise<HttpResponse<Coupon, ApiResponseUnauthorized | ApiResponseNotFound>>;
1283
1297
  /**
1284
1298
  * @description Find all coupons in certain organisation
1285
1299
  *
@@ -1384,7 +1398,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
1384
1398
  * @request DELETE:/customers/{external_id}
1385
1399
  * @secure
1386
1400
  */
1387
- deleteCustomer: (externalId: string, params?: RequestParams) => Promise<HttpResponse<Customer, ApiResponseUnauthorized | ApiResponseNotFound | ApiResponseNotAllowed>>;
1401
+ deleteCustomer: (externalId: string, params?: RequestParams) => Promise<HttpResponse<Customer, ApiResponseUnauthorized | ApiResponseNotFound>>;
1388
1402
  /**
1389
1403
  * @description Return a customer current usage
1390
1404
  *
@@ -1401,6 +1415,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
1401
1415
  */
1402
1416
  external_subscription_id: string;
1403
1417
  }, params?: RequestParams) => Promise<HttpResponse<CustomerUsage, ApiResponseUnauthorized | ApiResponseNotFound>>;
1418
+ /**
1419
+ * @description Delete customer's appplied coupon
1420
+ *
1421
+ * @tags customers
1422
+ * @name DeleteAppliedCoupon
1423
+ * @summary Delete customer's appplied coupon
1424
+ * @request DELETE:/customers/{customer_external_id}/applied_coupons/{applied_coupon_id}
1425
+ * @secure
1426
+ */
1427
+ deleteAppliedCoupon: (customerExternalId: string, appliedCouponId: string, params?: RequestParams) => Promise<HttpResponse<AppliedCoupon, ApiResponseUnauthorized | ApiResponseNotFound>>;
1404
1428
  /**
1405
1429
  * @description Find all customers in certain organisation
1406
1430
  *
@@ -1495,7 +1519,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
1495
1519
  * @request DELETE:/plans/{code}
1496
1520
  * @secure
1497
1521
  */
1498
- destroyPlan: (code: string, params?: RequestParams) => Promise<HttpResponse<Plan, ApiResponseUnauthorized | ApiResponseNotFound | ApiResponseNotAllowed>>;
1522
+ destroyPlan: (code: string, params?: RequestParams) => Promise<HttpResponse<Plan, ApiResponseUnauthorized | ApiResponseNotFound>>;
1499
1523
  /**
1500
1524
  * @description Find all plans in certain organisation
1501
1525
  *