@supabase/storage-js 2.116.0-canary.2 → 2.116.0-canary.3

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/dist/index.cjs CHANGED
@@ -1004,6 +1004,7 @@ var StorageFileApi = class extends BaseApiClient {
1004
1004
  * @param options.download triggers the file as a download if set to true. Set this parameter as the name of the file if you want to trigger the download with a different filename.
1005
1005
  * @param options.transform Transform the asset before serving it to the client.
1006
1006
  * @param options.cacheNonce Append a cache nonce parameter to the URL to invalidate the cache.
1007
+ * @param options.versionId Create a signed URL for a specific object version rather than the current one.
1007
1008
  * @returns Promise with response containing signed URL or error
1008
1009
  *
1009
1010
  * @example Create Signed URL
@@ -1058,7 +1059,7 @@ var StorageFileApi = class extends BaseApiClient {
1058
1059
  return _this8.handleOperation(async () => {
1059
1060
  let _path = _this8._getFinalPath(path);
1060
1061
  const hasTransform = typeof (options === null || options === void 0 ? void 0 : options.transform) === "object" && options.transform !== null && Object.keys(options.transform).length > 0;
1061
- let data = await post(_this8.fetch, `${_this8.url}/object/sign/${_path}`, _objectSpread2({ expiresIn }, hasTransform ? { transform: options.transform } : {}), { headers: _this8.headers });
1062
+ let data = await post(_this8.fetch, `${_this8.url}/object/sign/${_path}`, _objectSpread2(_objectSpread2({ expiresIn }, hasTransform ? { transform: options.transform } : {}), (options === null || options === void 0 ? void 0 : options.versionId) != null ? { versionId: options.versionId } : {}), { headers: _this8.headers });
1062
1063
  const query = new URLSearchParams();
1063
1064
  if (options === null || options === void 0 ? void 0 : options.download) query.set("download", options.download === true ? "" : options.download);
1064
1065
  if ((options === null || options === void 0 ? void 0 : options.cacheNonce) != null) query.set("cacheNonce", String(options.cacheNonce));
@@ -1288,6 +1289,7 @@ var StorageFileApi = class extends BaseApiClient {
1288
1289
  * @param options.download Triggers the file as a download if set to true. Set this parameter as the name of the file if you want to trigger the download with a different filename.
1289
1290
  * @param options.transform Transform the asset before serving it to the client.
1290
1291
  * @param options.cacheNonce Append a cache nonce parameter to the URL to invalidate the cache.
1292
+ * @param options.versionId Return the URL for a specific object version rather than the current one.
1291
1293
  * @returns Object with public URL
1292
1294
  *
1293
1295
  * @example Returns the URL for an asset in a public bucket
@@ -1343,6 +1345,7 @@ var StorageFileApi = class extends BaseApiClient {
1343
1345
  if (options === null || options === void 0 ? void 0 : options.download) query.set("download", options.download === true ? "" : options.download);
1344
1346
  if (options === null || options === void 0 ? void 0 : options.transform) this.applyTransformOptsToQuery(query, options.transform);
1345
1347
  if ((options === null || options === void 0 ? void 0 : options.cacheNonce) != null) query.set("cacheNonce", String(options.cacheNonce));
1348
+ if ((options === null || options === void 0 ? void 0 : options.versionId) != null) query.set("versionId", String(options.versionId));
1346
1349
  const queryString = query.toString();
1347
1350
  const renderPath = typeof (options === null || options === void 0 ? void 0 : options.transform) === "object" && options.transform !== null && Object.keys(options.transform).length > 0 ? "render/image" : "object";
1348
1351
  return { data: { publicUrl: encodeURI(`${this.url}/${renderPath}/public/${_path}`) + (queryString ? `?${queryString}` : "") } };
@@ -1629,7 +1632,7 @@ var StorageFileApi = class extends BaseApiClient {
1629
1632
 
1630
1633
  //#endregion
1631
1634
  //#region src/lib/version.ts
1632
- const version = "2.116.0-canary.2";
1635
+ const version = "2.116.0-canary.3";
1633
1636
 
1634
1637
  //#endregion
1635
1638
  //#region src/lib/constants.ts