@junobuild/core-standalone 3.2.0-next-2025-11-29 → 3.2.0-next-2025-12-01

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.
@@ -25,6 +25,10 @@ export declare const deleteFilteredAssets: ({ collection, filter, ...rest }: {
25
25
  collection: string;
26
26
  filter: ListParams;
27
27
  } & ActorUpdateParams) => Promise<void>;
28
+ export declare const setAssetToken: ({ collection, fullPath, token, ...rest }: {
29
+ collection: string;
30
+ token: string | null;
31
+ } & ActorUpdateParams & Pick<AssetKey, "fullPath">) => Promise<void>;
28
32
  export declare const getAsset: ({ collection, fullPath, ...rest }: {
29
33
  collection: string;
30
34
  } & ActorReadParams & Pick<AssetKey, "fullPath">) => Promise<SatelliteDid.AssetNoContent | undefined>;
@@ -1,5 +1,5 @@
1
1
  import type { SatelliteDid } from '@junobuild/ic-client/actor';
2
- import type { Asset, AssetKey, Storage } from '@junobuild/storage';
2
+ import type { AssetKey, Storage } from '@junobuild/storage';
3
3
  import type { ReadOptions } from '../../core/types/call-options';
4
4
  import type { ListParams } from '../../core/types/list';
5
5
  import type { SatelliteOptions } from '../../core/types/satellite';
@@ -69,6 +69,21 @@ export declare const deleteAsset: ({ collection, fullPath, satellite }: {
69
69
  collection: string;
70
70
  satellite?: SatelliteOptions;
71
71
  } & Pick<AssetKey, "fullPath">) => Promise<void>;
72
+ /**
73
+ * Set an access token for an asset of the storage.
74
+ *
75
+ * @param {Object} params - The parameters for setting the access token.
76
+ * @param {string} params.collection - The name of the collection.
77
+ * @param {string} params.fullPath - The full path of the asset.
78
+ * @param {string | null} params.token - The access token. Providing undined removes any existing protection and makes the asset accessible without access token.
79
+ * @param {SatelliteOptions} [params.satellite] - Options to specify a satellite in a NodeJS environment only. In browser environments, the satellite configuration is inherited from the initialization through `initSatellite()`.
80
+ * @returns {Promise<void>} A promise that resolves when the access token has been set to the asset.
81
+ */
82
+ export declare const setAssetToken: ({ collection, fullPath, token, satellite }: {
83
+ collection: string;
84
+ token: string | null;
85
+ satellite?: SatelliteOptions;
86
+ } & Pick<AssetKey, "fullPath">) => Promise<void>;
72
87
  /**
73
88
  * Deletes multiple assets from the storage.
74
89
  *
@@ -156,7 +171,7 @@ export declare const getManyAssets: ({ satellite, options, ...rest }: {
156
171
  * @returns {string} A full URL pointing to the asset.
157
172
  */
158
173
  export declare const downloadUrl: ({ assetKey: { fullPath, token }, satellite: satelliteOptions }: {
159
- assetKey: Pick<Asset, "fullPath" | "token">;
174
+ assetKey: Pick<AssetKey, "fullPath" | "token">;
160
175
  } & {
161
176
  satellite?: SatelliteOptions;
162
177
  }) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/core-standalone",
3
- "version": "3.2.0-next-2025-11-29",
3
+ "version": "3.2.0-next-2025-12-01",
4
4
  "description": "JavaScript core client for Juno with all dependencies bundled — no peer dependencies",
5
5
  "author": "David Dal Busco (https://daviddalbusco.com)",
6
6
  "license": "MIT",