@junobuild/core 0.0.53 → 0.0.54
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 type { AssetKey, Storage } from '@junobuild/storage';
|
|
1
|
+
import type { Asset, AssetKey, Storage } from '@junobuild/storage';
|
|
2
2
|
import type { AssetNoContent } from '../../declarations/satellite/satellite.did';
|
|
3
3
|
import type { ListParams } from '../types/list.types';
|
|
4
4
|
import type { SatelliteOptions } from '../types/satellite.types';
|
|
@@ -84,3 +84,19 @@ export declare const getManyAssets: ({ satellite, ...rest }: {
|
|
|
84
84
|
} & Pick<AssetKey, 'fullPath'>)[];
|
|
85
85
|
satellite?: SatelliteOptions;
|
|
86
86
|
}) => Promise<(AssetNoContent | undefined)[]>;
|
|
87
|
+
/**
|
|
88
|
+
* Generates a download URL for a given asset.
|
|
89
|
+
*
|
|
90
|
+
* @param {Object} params - The parameters for generating the download URL.
|
|
91
|
+
* @param {Object} params.assetKey - The key details of the asset.
|
|
92
|
+
* @param {string} params.assetKey.fullPath - The full path of the asset.
|
|
93
|
+
* @param {string} params.assetKey.token - The access token for the asset.
|
|
94
|
+
* @param {SatelliteOptions} [params.satellite] - The satellite options (required only in NodeJS environment).
|
|
95
|
+
*
|
|
96
|
+
* @returns {string} The generated download URL.
|
|
97
|
+
*/
|
|
98
|
+
export declare const downloadUrl: ({ assetKey: { fullPath, token }, satellite: satelliteOptions }: {
|
|
99
|
+
assetKey: Pick<Asset, 'fullPath' | 'token'>;
|
|
100
|
+
} & {
|
|
101
|
+
satellite?: SatelliteOptions;
|
|
102
|
+
}) => string;
|