@layr-labs/ecloud-sdk 0.3.2-dev → 0.3.3-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.
- package/VERSION +2 -2
- package/dist/billing.cjs +6 -2
- package/dist/billing.cjs.map +1 -1
- package/dist/billing.d.cts +1 -1
- package/dist/billing.d.ts +1 -1
- package/dist/billing.js +6 -2
- package/dist/billing.js.map +1 -1
- package/dist/browser.cjs +7 -3
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +4 -4
- package/dist/browser.d.ts +4 -4
- package/dist/browser.js +7 -3
- package/dist/browser.js.map +1 -1
- package/dist/{compute-B88Qqudr.d.cts → compute-6WmcUluf.d.cts} +1 -1
- package/dist/{compute-DR_h97yd.d.ts → compute-D0TNHHmD.d.ts} +1 -1
- package/dist/compute.cjs +1 -1
- package/dist/compute.cjs.map +1 -1
- package/dist/compute.d.cts +2 -2
- package/dist/compute.d.ts +2 -2
- package/dist/compute.js +1 -1
- package/dist/compute.js.map +1 -1
- package/dist/{helpers-COZW0ijf.d.cts → helpers-D0Mn-6TI.d.cts} +2 -2
- package/dist/{helpers-BvvKPHp-.d.ts → helpers-Dn6fECtP.d.ts} +2 -2
- package/dist/{index-CT9GxT1-.d.cts → index-WDunKGVL.d.cts} +5 -1
- package/dist/{index-CT9GxT1-.d.ts → index-WDunKGVL.d.ts} +5 -1
- package/dist/index.cjs +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a6 as EnvironmentConfig, ag as SubscriptionStatus, a5 as BillingEnvironmentConfig, ae as ProductID, ai as CreateSubscriptionOptions,
|
|
1
|
+
import { a6 as EnvironmentConfig, ag as SubscriptionStatus, a5 as BillingEnvironmentConfig, ae as ProductID, ai as CreateSubscriptionOptions, ak as CreateSubscriptionResponse, aj as GetSubscriptionOptions, as as ProductSubscriptionResponse, G as GasEstimate, ab as Logger } from './index-WDunKGVL.cjs';
|
|
2
2
|
import { Address, Hex, WalletClient, PublicClient, SignAuthorizationReturnType, Chain } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -789,7 +789,7 @@ declare class BillingApiClient {
|
|
|
789
789
|
*/
|
|
790
790
|
isSessionValid(): Promise<boolean>;
|
|
791
791
|
createSubscription(productId?: ProductID, options?: CreateSubscriptionOptions): Promise<CreateSubscriptionResponse>;
|
|
792
|
-
getSubscription(productId?: ProductID): Promise<ProductSubscriptionResponse>;
|
|
792
|
+
getSubscription(productId?: ProductID, options?: GetSubscriptionOptions): Promise<ProductSubscriptionResponse>;
|
|
793
793
|
cancelSubscription(productId?: ProductID): Promise<void>;
|
|
794
794
|
/**
|
|
795
795
|
* Make an authenticated request to the billing API
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a6 as EnvironmentConfig, ag as SubscriptionStatus, a5 as BillingEnvironmentConfig, ae as ProductID, ai as CreateSubscriptionOptions,
|
|
1
|
+
import { a6 as EnvironmentConfig, ag as SubscriptionStatus, a5 as BillingEnvironmentConfig, ae as ProductID, ai as CreateSubscriptionOptions, ak as CreateSubscriptionResponse, aj as GetSubscriptionOptions, as as ProductSubscriptionResponse, G as GasEstimate, ab as Logger } from './index-WDunKGVL.js';
|
|
2
2
|
import { Address, Hex, WalletClient, PublicClient, SignAuthorizationReturnType, Chain } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -789,7 +789,7 @@ declare class BillingApiClient {
|
|
|
789
789
|
*/
|
|
790
790
|
isSessionValid(): Promise<boolean>;
|
|
791
791
|
createSubscription(productId?: ProductID, options?: CreateSubscriptionOptions): Promise<CreateSubscriptionResponse>;
|
|
792
|
-
getSubscription(productId?: ProductID): Promise<ProductSubscriptionResponse>;
|
|
792
|
+
getSubscription(productId?: ProductID, options?: GetSubscriptionOptions): Promise<ProductSubscriptionResponse>;
|
|
793
793
|
cancelSubscription(productId?: ProductID): Promise<void>;
|
|
794
794
|
/**
|
|
795
795
|
* Make an authenticated request to the billing API
|
|
@@ -672,6 +672,10 @@ interface CreateSubscriptionOptions {
|
|
|
672
672
|
/** URL to return if return link is clicked from stripe portal */
|
|
673
673
|
returnUrl?: string;
|
|
674
674
|
}
|
|
675
|
+
interface GetSubscriptionOptions {
|
|
676
|
+
/** URL to return to from the billing portal */
|
|
677
|
+
returnUrl?: string;
|
|
678
|
+
}
|
|
675
679
|
interface CreateSubscriptionResponse {
|
|
676
680
|
checkoutUrl: string;
|
|
677
681
|
}
|
|
@@ -746,4 +750,4 @@ interface SequentialDeployResult {
|
|
|
746
750
|
};
|
|
747
751
|
}
|
|
748
752
|
|
|
749
|
-
export { type PreparedDeploy as $, type AppId as A, type SuspendOptions as B, type CalculateAppIDOptions as C, type DeployAppOptions as D, type EstimateGasOptions as E, type UndelegateOptions as F, type GasEstimate as G, type ExecuteDeploySequentialOptions as H, type IsDelegatedOptions as I, type ExecuteDeployBatchedOptions as J, type BatchedDeployResult as K, noopLogger as L, type logVisibility as M, type DeployAppOpts as N, type UpgradeAppOpts as O, type PrepareDeployBatchOptions as P, type PrepareDeployOpts as Q, type PrepareUpgradeOpts as R, type SendTransactionOptions as S, type PrepareDeployFromVerifiableBuildOpts as T, type UpgradeAppOptions as U, type PrepareUpgradeFromVerifiableBuildOpts as V, type GasOpts as W, type ExecuteDeployResult as X, type ExecuteUpgradeResult as Y, type PreparedDeployData as Z, type PreparedUpgradeData as _, getAppsByCreator as a, type PreparedUpgrade as a0, type LifecycleOpts as a1, type AppRecord as a2, type DeployOptions as a3, type DeployResult as a4, type BillingEnvironmentConfig as a5, type EnvironmentConfig as a6, type Release as a7, type ParsedEnvironment as a8, type ImageDigestResult as a9, type DockerImageConfig as aa, type Logger as ab, type AppProfile as ac, type AppProfileResponse as ad, type ProductID as ae, type ChainID as af, type SubscriptionStatus as ag, type SubscriptionLineItem as ah, type CreateSubscriptionOptions as ai, type
|
|
753
|
+
export { type PreparedDeploy as $, type AppId as A, type SuspendOptions as B, type CalculateAppIDOptions as C, type DeployAppOptions as D, type EstimateGasOptions as E, type UndelegateOptions as F, type GasEstimate as G, type ExecuteDeploySequentialOptions as H, type IsDelegatedOptions as I, type ExecuteDeployBatchedOptions as J, type BatchedDeployResult as K, noopLogger as L, type logVisibility as M, type DeployAppOpts as N, type UpgradeAppOpts as O, type PrepareDeployBatchOptions as P, type PrepareDeployOpts as Q, type PrepareUpgradeOpts as R, type SendTransactionOptions as S, type PrepareDeployFromVerifiableBuildOpts as T, type UpgradeAppOptions as U, type PrepareUpgradeFromVerifiableBuildOpts as V, type GasOpts as W, type ExecuteDeployResult as X, type ExecuteUpgradeResult as Y, type PreparedDeployData as Z, type PreparedUpgradeData as _, getAppsByCreator as a, type PreparedUpgrade as a0, type LifecycleOpts as a1, type AppRecord as a2, type DeployOptions as a3, type DeployResult as a4, type BillingEnvironmentConfig as a5, type EnvironmentConfig as a6, type Release as a7, type ParsedEnvironment as a8, type ImageDigestResult as a9, type DockerImageConfig as aa, type Logger as ab, type AppProfile as ac, type AppProfileResponse as ad, type ProductID as ae, type ChainID as af, type SubscriptionStatus as ag, type SubscriptionLineItem as ah, type CreateSubscriptionOptions as ai, type GetSubscriptionOptions as aj, type CreateSubscriptionResponse as ak, type CheckoutCreatedResponse as al, type AlreadyActiveResponse as am, type PaymentIssueResponse as an, type SubscribeResponse as ao, type CancelSuccessResponse as ap, type NoActiveSubscriptionResponse as aq, type CancelResponse as ar, type ProductSubscriptionResponse as as, type SubscriptionOpts as at, type DeployProgressCallback as au, type DeployStep as av, type SequentialDeployResult as aw, getAppLatestReleaseBlockNumbers as ax, getBlockTimestamps as ay, getAppsByDeveloper as b, getActiveAppCount as c, getMaxActiveAppsPerUser as d, estimateTransactionGas as e, formatETH as f, getAllAppsByDeveloper as g, executeDeployBatch as h, deployApp as i, calculateAppID as j, executeDeploySequential as k, executeDeployBatched as l, supportsEIP5792 as m, prepareUpgradeBatch as n, executeUpgradeBatch as o, prepareDeployBatch as p, sendAndWaitForTransaction as q, isDelegated as r, supportsEIP7702 as s, suspend as t, upgradeApp as u, undelegate as v, type AppConfig as w, type PrepareUpgradeBatchOptions as x, type PreparedDeployBatch as y, type PreparedUpgradeBatch as z };
|
|
@@ -672,6 +672,10 @@ interface CreateSubscriptionOptions {
|
|
|
672
672
|
/** URL to return if return link is clicked from stripe portal */
|
|
673
673
|
returnUrl?: string;
|
|
674
674
|
}
|
|
675
|
+
interface GetSubscriptionOptions {
|
|
676
|
+
/** URL to return to from the billing portal */
|
|
677
|
+
returnUrl?: string;
|
|
678
|
+
}
|
|
675
679
|
interface CreateSubscriptionResponse {
|
|
676
680
|
checkoutUrl: string;
|
|
677
681
|
}
|
|
@@ -746,4 +750,4 @@ interface SequentialDeployResult {
|
|
|
746
750
|
};
|
|
747
751
|
}
|
|
748
752
|
|
|
749
|
-
export { type PreparedDeploy as $, type AppId as A, type SuspendOptions as B, type CalculateAppIDOptions as C, type DeployAppOptions as D, type EstimateGasOptions as E, type UndelegateOptions as F, type GasEstimate as G, type ExecuteDeploySequentialOptions as H, type IsDelegatedOptions as I, type ExecuteDeployBatchedOptions as J, type BatchedDeployResult as K, noopLogger as L, type logVisibility as M, type DeployAppOpts as N, type UpgradeAppOpts as O, type PrepareDeployBatchOptions as P, type PrepareDeployOpts as Q, type PrepareUpgradeOpts as R, type SendTransactionOptions as S, type PrepareDeployFromVerifiableBuildOpts as T, type UpgradeAppOptions as U, type PrepareUpgradeFromVerifiableBuildOpts as V, type GasOpts as W, type ExecuteDeployResult as X, type ExecuteUpgradeResult as Y, type PreparedDeployData as Z, type PreparedUpgradeData as _, getAppsByCreator as a, type PreparedUpgrade as a0, type LifecycleOpts as a1, type AppRecord as a2, type DeployOptions as a3, type DeployResult as a4, type BillingEnvironmentConfig as a5, type EnvironmentConfig as a6, type Release as a7, type ParsedEnvironment as a8, type ImageDigestResult as a9, type DockerImageConfig as aa, type Logger as ab, type AppProfile as ac, type AppProfileResponse as ad, type ProductID as ae, type ChainID as af, type SubscriptionStatus as ag, type SubscriptionLineItem as ah, type CreateSubscriptionOptions as ai, type
|
|
753
|
+
export { type PreparedDeploy as $, type AppId as A, type SuspendOptions as B, type CalculateAppIDOptions as C, type DeployAppOptions as D, type EstimateGasOptions as E, type UndelegateOptions as F, type GasEstimate as G, type ExecuteDeploySequentialOptions as H, type IsDelegatedOptions as I, type ExecuteDeployBatchedOptions as J, type BatchedDeployResult as K, noopLogger as L, type logVisibility as M, type DeployAppOpts as N, type UpgradeAppOpts as O, type PrepareDeployBatchOptions as P, type PrepareDeployOpts as Q, type PrepareUpgradeOpts as R, type SendTransactionOptions as S, type PrepareDeployFromVerifiableBuildOpts as T, type UpgradeAppOptions as U, type PrepareUpgradeFromVerifiableBuildOpts as V, type GasOpts as W, type ExecuteDeployResult as X, type ExecuteUpgradeResult as Y, type PreparedDeployData as Z, type PreparedUpgradeData as _, getAppsByCreator as a, type PreparedUpgrade as a0, type LifecycleOpts as a1, type AppRecord as a2, type DeployOptions as a3, type DeployResult as a4, type BillingEnvironmentConfig as a5, type EnvironmentConfig as a6, type Release as a7, type ParsedEnvironment as a8, type ImageDigestResult as a9, type DockerImageConfig as aa, type Logger as ab, type AppProfile as ac, type AppProfileResponse as ad, type ProductID as ae, type ChainID as af, type SubscriptionStatus as ag, type SubscriptionLineItem as ah, type CreateSubscriptionOptions as ai, type GetSubscriptionOptions as aj, type CreateSubscriptionResponse as ak, type CheckoutCreatedResponse as al, type AlreadyActiveResponse as am, type PaymentIssueResponse as an, type SubscribeResponse as ao, type CancelSuccessResponse as ap, type NoActiveSubscriptionResponse as aq, type CancelResponse as ar, type ProductSubscriptionResponse as as, type SubscriptionOpts as at, type DeployProgressCallback as au, type DeployStep as av, type SequentialDeployResult as aw, getAppLatestReleaseBlockNumbers as ax, getBlockTimestamps as ay, getAppsByDeveloper as b, getActiveAppCount as c, getMaxActiveAppsPerUser as d, estimateTransactionGas as e, formatETH as f, getAllAppsByDeveloper as g, executeDeployBatch as h, deployApp as i, calculateAppID as j, executeDeploySequential as k, executeDeployBatched as l, supportsEIP5792 as m, prepareUpgradeBatch as n, executeUpgradeBatch as o, prepareDeployBatch as p, sendAndWaitForTransaction as q, isDelegated as r, supportsEIP7702 as s, suspend as t, upgradeApp as u, undelegate as v, type AppConfig as w, type PrepareUpgradeBatchOptions as x, type PreparedDeployBatch as y, type PreparedUpgradeBatch as z };
|
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.
|
|
4758
|
+
const version = true ? "0.3.3-dev" : "0.0.0";
|
|
4759
4759
|
return `ecloud-sdk/v${version}`;
|
|
4760
4760
|
}
|
|
4761
4761
|
var UserApiClient = class {
|
|
@@ -5881,8 +5881,12 @@ var BillingApiClient = class {
|
|
|
5881
5881
|
const resp = await this.makeAuthenticatedRequest(endpoint, "POST", productId, body);
|
|
5882
5882
|
return resp.json();
|
|
5883
5883
|
}
|
|
5884
|
-
async getSubscription(productId = "compute") {
|
|
5885
|
-
|
|
5884
|
+
async getSubscription(productId = "compute", options) {
|
|
5885
|
+
let endpoint = `${this.config.billingApiServerURL}/products/${productId}/subscription`;
|
|
5886
|
+
if (options?.returnUrl) {
|
|
5887
|
+
const params = new URLSearchParams({ return_url: options.returnUrl });
|
|
5888
|
+
endpoint = `${endpoint}?${params.toString()}`;
|
|
5889
|
+
}
|
|
5886
5890
|
const resp = await this.makeAuthenticatedRequest(endpoint, "GET", productId);
|
|
5887
5891
|
return resp.json();
|
|
5888
5892
|
}
|