Skip to content

@salesforce/b2c-tooling-sdk / operations/mrt / downloadBundle

Function: downloadBundle() ​

downloadBundle(options, auth): Promise<DownloadBundleResult>

Defined in: packages/b2c-tooling-sdk/src/operations/mrt/push.ts:385

Gets a presigned URL to download a bundle archive.

The returned URL is valid for one hour.

Parameters ​

options ​

DownloadBundleOptions

Download options

auth ​

AuthStrategy

Authentication strategy (ApiKeyStrategy)

Returns ​

Promise<DownloadBundleResult>

Download URL result

Throws ​

Error if request fails

Example ​

typescript
import { ApiKeyStrategy } from '@salesforce/b2c-tooling-sdk/auth';
import { downloadBundle } from '@salesforce/b2c-tooling-sdk/operations/mrt';

const auth = new ApiKeyStrategy(process.env.MRT_API_KEY!, 'Authorization');

const result = await downloadBundle({
  projectSlug: 'my-storefront',
  bundleId: 12345
}, auth);

console.log(`Download URL: ${result.downloadUrl}`);

Released under the Apache-2.0 License.