@borealise/api 1.0.8 → 1.0.9

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/dist/index.d.mts CHANGED
@@ -648,6 +648,9 @@ declare class SubscriptionResource extends ApiResource {
648
648
  data: SubscriptionStatus;
649
649
  }>>;
650
650
  createIntent(plan: SubscriptionPlan): Promise<ApiResponse<CreateIntentResponse>>;
651
+ cancelIntent(subscriptionId: string): Promise<ApiResponse<{
652
+ success: boolean;
653
+ }>>;
651
654
  createPortal(): Promise<ApiResponse<PortalResponse>>;
652
655
  }
653
656
  declare const subscriptionResource: SubscriptionResource;
package/dist/index.d.ts CHANGED
@@ -648,6 +648,9 @@ declare class SubscriptionResource extends ApiResource {
648
648
  data: SubscriptionStatus;
649
649
  }>>;
650
650
  createIntent(plan: SubscriptionPlan): Promise<ApiResponse<CreateIntentResponse>>;
651
+ cancelIntent(subscriptionId: string): Promise<ApiResponse<{
652
+ success: boolean;
653
+ }>>;
651
654
  createPortal(): Promise<ApiResponse<PortalResponse>>;
652
655
  }
653
656
  declare const subscriptionResource: SubscriptionResource;
package/dist/index.js CHANGED
@@ -644,6 +644,11 @@ var SubscriptionResource = class extends ApiResource {
644
644
  async createIntent(plan) {
645
645
  return this.api.post(`${this.endpoint}/create-intent`, { plan });
646
646
  }
647
+ // POST /api/subscriptions/cancel-intent
648
+ // Cancels an incomplete subscription when the user goes back from the payment step
649
+ async cancelIntent(subscriptionId) {
650
+ return this.api.post(`${this.endpoint}/cancel-intent`, { subscriptionId });
651
+ }
647
652
  // POST /api/subscriptions/portal
648
653
  async createPortal() {
649
654
  return this.api.post(`${this.endpoint}/portal`);
package/dist/index.mjs CHANGED
@@ -589,6 +589,11 @@ var SubscriptionResource = class extends ApiResource {
589
589
  async createIntent(plan) {
590
590
  return this.api.post(`${this.endpoint}/create-intent`, { plan });
591
591
  }
592
+ // POST /api/subscriptions/cancel-intent
593
+ // Cancels an incomplete subscription when the user goes back from the payment step
594
+ async cancelIntent(subscriptionId) {
595
+ return this.api.post(`${this.endpoint}/cancel-intent`, { subscriptionId });
596
+ }
592
597
  // POST /api/subscriptions/portal
593
598
  async createPortal() {
594
599
  return this.api.post(`${this.endpoint}/portal`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@borealise/api",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Official API client for Borealise",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",