@layr-labs/ecloud-sdk 0.3.1-dev.0 → 0.3.2-dev

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.
@@ -1,4 +1,4 @@
1
- import { a6 as EnvironmentConfig, ag as SubscriptionStatus, a5 as BillingEnvironmentConfig, ae as ProductID, ai as CreateSubscriptionOptions, aj as CreateSubscriptionResponse, ar as ProductSubscriptionResponse, G as GasEstimate, ab as Logger } from './index-5y9NG_Id.js';
1
+ import { a6 as EnvironmentConfig, ag as SubscriptionStatus, a5 as BillingEnvironmentConfig, ae as ProductID, ai as CreateSubscriptionOptions, aj as CreateSubscriptionResponse, ar as ProductSubscriptionResponse, G as GasEstimate, ab as Logger } from './index-CT9GxT1-.js';
2
2
  import { Address, Hex, WalletClient, PublicClient, SignAuthorizationReturnType, Chain } from 'viem';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { a6 as EnvironmentConfig, ag as SubscriptionStatus, a5 as BillingEnvironmentConfig, ae as ProductID, ai as CreateSubscriptionOptions, aj as CreateSubscriptionResponse, ar as ProductSubscriptionResponse, G as GasEstimate, ab as Logger } from './index-5y9NG_Id.cjs';
1
+ import { a6 as EnvironmentConfig, ag as SubscriptionStatus, a5 as BillingEnvironmentConfig, ae as ProductID, ai as CreateSubscriptionOptions, aj as CreateSubscriptionResponse, ar as ProductSubscriptionResponse, G as GasEstimate, ab as Logger } from './index-CT9GxT1-.cjs';
2
2
  import { Address, Hex, WalletClient, PublicClient, SignAuthorizationReturnType, Chain } from 'viem';
3
3
 
4
4
  /**
@@ -669,6 +669,8 @@ interface CreateSubscriptionOptions {
669
669
  successUrl?: string;
670
670
  /** URL to redirect to if checkout is canceled */
671
671
  cancelUrl?: string;
672
+ /** URL to return if return link is clicked from stripe portal */
673
+ returnUrl?: string;
672
674
  }
673
675
  interface CreateSubscriptionResponse {
674
676
  checkoutUrl: string;
@@ -669,6 +669,8 @@ interface CreateSubscriptionOptions {
669
669
  successUrl?: string;
670
670
  /** URL to redirect to if checkout is canceled */
671
671
  cancelUrl?: string;
672
+ /** URL to return if return link is clicked from stripe portal */
673
+ returnUrl?: string;
672
674
  }
673
675
  interface CreateSubscriptionResponse {
674
676
  checkoutUrl: string;
package/dist/index.cjs CHANGED
@@ -4755,7 +4755,7 @@ var CanViewAppLogsPermission = "0x2fd3f2fe";
4755
4755
  var CanViewSensitiveAppInfoPermission = "0x0e67b22f";
4756
4756
  var CanUpdateAppProfilePermission = "0x036fef61";
4757
4757
  function getDefaultClientId() {
4758
- const version = true ? "0.3.1-dev.0" : "0.0.0";
4758
+ const version = true ? "0.3.2-dev" : "0.0.0";
4759
4759
  return `ecloud-sdk/v${version}`;
4760
4760
  }
4761
4761
  var UserApiClient = class {
@@ -5875,7 +5875,8 @@ var BillingApiClient = class {
5875
5875
  const endpoint = `${this.config.billingApiServerURL}/products/${productId}/subscription`;
5876
5876
  const body = options ? {
5877
5877
  success_url: options.successUrl,
5878
- cancel_url: options.cancelUrl
5878
+ cancel_url: options.cancelUrl,
5879
+ return_url: options.returnUrl
5879
5880
  } : void 0;
5880
5881
  const resp = await this.makeAuthenticatedRequest(endpoint, "POST", productId, body);
5881
5882
  return resp.json();