npm package diff
Package: @forge/bridge
Versions: 5.7.0-next.8-experimental-ab371ba - 5.7.0-next.10
Added: package/out/object-store/delete.js
Added: package/out/object-store/getMetadata.js
Added: package/out/object-store/delete.d.ts.map
Added: package/out/object-store/getMetadata.d.ts.map
Added: package/out/object-store/delete.d.ts
Added: package/out/object-store/getMetadata.d.ts
Modified: package/out/object-store/download.js
Index: package/out/object-store/download.js
===================================================================
--- package/out/object-store/download.js
+++ package/out/object-store/download.js
@@ -2,46 +2,46 @@
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.download = void 0;
 const invoke_1 = require("../invoke");
 const errors_1 = require("../errors");
-const download = async ({ filterAndGenerateDownloadUrls, objectKeys }) => {
-    if (!(filterAndGenerateDownloadUrls === null || filterAndGenerateDownloadUrls === void 0 ? void 0 : filterAndGenerateDownloadUrls.function)) {
-        throw new errors_1.BridgeAPIError('filterAndGenerateDownloadUrls.function is required');
+const download = async ({ functionKey, keys }) => {
+    if (!functionKey || functionKey.length === 0) {
+        throw new errors_1.BridgeAPIError('functionKey is required to filter and generate download URLs');
     }
-    if (!Array.isArray(objectKeys) || objectKeys.length === 0) {
-        throw new errors_1.BridgeAPIError('objectKeys array is required and must not be empty');
+    if (!Array.isArray(keys) || keys.length === 0) {
+        throw new errors_1.BridgeAPIError('keys array is required and must not be empty');
     }
-    const downloadUrlsToObjectKeys = (await (0, invoke_1.invoke)(filterAndGenerateDownloadUrls.function, {
-        objectKeys
+    const downloadUrlsTokeys = (await (0, invoke_1.invoke)(functionKey, {
+        keys
     }));
-    if (!downloadUrlsToObjectKeys || typeof downloadUrlsToObjectKeys !== 'object') {
-        throw new errors_1.BridgeAPIError('Invalid response from filterAndGenerateDownloadUrls function');
+    if (!downloadUrlsTokeys || typeof downloadUrlsTokeys !== 'object') {
+        throw new errors_1.BridgeAPIError('Invalid response from functionKey');
     }
-    const downloadPromises = Object.entries(downloadUrlsToObjectKeys).map(async ([downloadUrl, key]) => {
+    const downloadPromises = Object.entries(downloadUrlsTokeys).map(async ([downloadUrl, key]) => {
         try {
             const response = await fetch(downloadUrl, {
                 method: 'GET'
             });
             if (!response.ok) {
                 return {
                     success: false,
-                    objectKey: key,
+                    key: key,
                     status: response.status,
                     error: `Download failed with status ${response.status}`
                 };
             }
             const blob = await response.blob();
             return {
                 success: true,
-                objectKey: key,
+                key: key,
                 blob,
                 status: response.status
             };
         }
         catch (error) {
             return {
                 success: false,
-                objectKey: key,
+                key: key,
                 status: 503,
                 error: error instanceof Error ? error.message : 'Download failed'
             };
         }Modified: package/out/object-store/upload.js
Index: package/out/object-store/upload.js
===================================================================
--- package/out/object-store/upload.js
+++ package/out/object-store/upload.js
@@ -15,21 +15,21 @@
         checksum,
         checksumType
     };
 };
-const upload = async ({ filterAndGenerateUrls, objects }) => {
-    if (!(filterAndGenerateUrls === null || filterAndGenerateUrls === void 0 ? void 0 : filterAndGenerateUrls.function)) {
-        throw new errors_1.BridgeAPIError('filterAndGenerateUrls.function is required');
+const upload = async ({ functionKey, objects }) => {
+    if (!functionKey || functionKey.length === 0) {
+        throw new errors_1.BridgeAPIError('functionKey is required to filter and generate presigned URLs');
     }
     if (!Array.isArray(objects) || objects.length === 0) {
         throw new errors_1.BridgeAPIError('objects array is required and must not be empty');
     }
     const allObjectMetadata = await Promise.all(objects.map((obj) => getObjectMetadata(obj)));
-    const presignedURLsToObjectMetadata = (await (0, invoke_1.invoke)(filterAndGenerateUrls.function, {
+    const presignedURLsToObjectMetadata = (await (0, invoke_1.invoke)(functionKey, {
         allObjectMetadata
     }));
     if (!presignedURLsToObjectMetadata || typeof presignedURLsToObjectMetadata !== 'object') {
-        throw new errors_1.BridgeAPIError('Invalid response from filterAndGenerateUrls function');
+        throw new errors_1.BridgeAPIError('Invalid response from functionKey');
     }
     const checksumToBlobMap = new Map();
     objects.forEach((blob, index) => {
         const metadata = allObjectMetadata[index];
@@ -40,9 +40,9 @@
         const object = checksumToBlobMap.get(checksum);
         if (!object) {
             return {
                 success: false,
-                objectKey: key,
+                key: key,
                 error: `Blob not found for checksum ${checksum}`
             };
         }
         try {
@@ -55,17 +55,17 @@
                 }
             });
             return {
                 success: response.ok,
-                objectKey: key,
+                key: key,
                 status: response.status,
                 error: response.ok ? undefined : `Upload failed with status ${response.status}`
             };
         }
         catch (error) {
             return {
                 success: false,
-                objectKey: key,
+                key: key,
                 status: 503,
                 error: error instanceof Error ? error.message : 'Upload failed'
             };
         }Modified: package/package.json
Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
 {
   "name": "@forge/bridge",
-  "version": "5.7.0-next.8-experimental-ab371ba",
+  "version": "5.7.0-next.10",
   "description": "Forge bridge API for custom UI apps",
   "author": "Atlassian",
   "license": "SEE LICENSE IN LICENSE.txt",
   "main": "out/index.js",
@@ -14,12 +14,12 @@
   },
   "dependencies": {
     "@atlaskit/tokens": "^1.58.0",
     "@forge/i18n": "0.0.7",
-    "@forge/resolver": "1.7.1-next.0-experimental-ab371ba",
+    "@forge/resolver": "1.7.1-next.0",
     "@statsig/js-client": "3.18.2",
     "@types/history": "^4.7.11",
-    "@forge/manifest": "10.8.0-next.5-experimental-ab371ba"
+    "@forge/manifest": "10.8.0-next.5"
   },
   "devDependencies": {
     "history": "5.3.0",
     "isomorphic-fetch": "^3.0.0",Modified: package/out/object-store/download.d.ts.map
Index: package/out/object-store/download.d.ts.map
===================================================================
--- package/out/object-store/download.d.ts.map
+++ package/out/object-store/download.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/object-store/download.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAsB,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAUzF,eAAO,MAAM,QAAQ;mCAIY,qBAAqB;gBACxC,MAAM,EAAE;MAClB,QAAQ,cAAc,EAAE,CAqD3B,CAAC"}
\ No newline at end of file
+{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/object-store/download.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,SAAS,CAAC;AAUlE,eAAO,MAAM,QAAQ;iBAIN,MAAM;UACb,MAAM,EAAE;MACZ,QAAQ,cAAc,EAAE,CAqD3B,CAAC"}
\ No newline at end of fileModified: package/out/object-store/types.d.ts.map
Index: package/out/object-store/types.d.ts.map
===================================================================
--- package/out/object-store/types.d.ts.map
+++ package/out/object-store/types.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/object-store/types.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oBAAY,qBAAqB,GAAG;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,YAAY,GAAG,cAAc,GAAG;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC;CAC7B,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC"}
\ No newline at end of file
+{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/object-store/types.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oBAAY,YAAY,GAAG,cAAc,GAAG;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC;CAC7B,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAE3D,oBAAY,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
\ No newline at end of fileModified: package/out/object-store/upload.d.ts.map
Index: package/out/object-store/upload.d.ts.map
===================================================================
--- package/out/object-store/upload.d.ts.map
+++ package/out/object-store/upload.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/object-store/upload.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAuC,qBAAqB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA8BxG,eAAO,MAAM,MAAM;2BAIM,qBAAqB;aACnC,IAAI,EAAE;MACb,QAAQ,YAAY,EAAE,CAkEzB,CAAC"}
\ No newline at end of file
+{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/object-store/upload.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAuC,YAAY,EAAE,MAAM,SAAS,CAAC;AA8BjF,eAAO,MAAM,MAAM;iBAIJ,MAAM;aACV,IAAI,EAAE;MACb,QAAQ,YAAY,EAAE,CAkEzB,CAAC"}
\ No newline at end of fileModified: package/CHANGELOG.md
Index: package/CHANGELOG.md
===================================================================
--- package/CHANGELOG.md
+++ package/CHANGELOG.md
@@ -1,26 +1,17 @@
 # @forge/bridge
 
-## 5.7.0-next.8-experimental-ab371ba
+## 5.7.0-next.10
 
-### Minor Changes
+### Patch Changes
 
-- be6eab0: Add OS upload bridge method
-- 6e14850: Added FOS download bridge method
+- eda5e4f: Adds new bridge method objectStore.delete
 
+## 5.7.0-next.9
+
 ### Patch Changes
 
-- 94243f1: Split development and contribution guidelines
-- d9e48cd: minor update to tsconfig
-- Updated dependencies [b3792e4]
-- Updated dependencies [fae0e71]
-- Updated dependencies [0ea6722]
-- Updated dependencies [4718346]
-- Updated dependencies [94243f1]
-- Updated dependencies [0ef937d]
-- Updated dependencies [dcd46a4]
-  - @forge/[email protected]
-  - @forge/[email protected]
+- a03c9c5: Adds new bridge method objectStore.getMetadata
 
 ## 5.7.0-next.8
 
 ### Minor ChangesModified: package/out/object-store/download.d.ts
Index: package/out/object-store/download.d.ts
===================================================================
--- package/out/object-store/download.d.ts
+++ package/out/object-store/download.d.ts
@@ -1,6 +1,6 @@
-import type { DownloadResult, FilterAndGenerateUrls } from './types';
-export declare const download: ({ filterAndGenerateDownloadUrls, objectKeys }: {
-    filterAndGenerateDownloadUrls: FilterAndGenerateUrls;
-    objectKeys: string[];
+import type { DownloadResult } from './types';
+export declare const download: ({ functionKey, keys }: {
+    functionKey: string;
+    keys: string[];
 }) => Promise<DownloadResult[]>;
 //# sourceMappingURL=download.d.ts.map
\ No newline at end of fileModified: package/out/object-store/types.d.ts
Index: package/out/object-store/types.d.ts
===================================================================
--- package/out/object-store/types.d.ts
+++ package/out/object-store/types.d.ts
@@ -2,25 +2,22 @@
     length: number;
     checksum: string;
     checksumType: string;
 };
-export declare type FilterAndGenerateUrls = {
-    function: string;
-};
 export declare type FileMetadata = ObjectMetadata & {
     key: string;
     ttlSeconds?: number;
     overwrite?: boolean;
 };
 export declare type UploadResult = {
     success: boolean;
-    objectKey: string;
+    key: string;
     status?: number;
     error?: string;
 };
 export declare type DownloadResult = {
     success: boolean;
-    objectKey: string;
+    key: string;
     blob?: Blob;
     status?: number;
     error?: string;
 };
@@ -29,5 +26,13 @@
 };
 export declare type DownloadURLMapping = {
     [url: string]: string;
 };
+export declare type GetMetadataResult = {
+    key: string;
+    checksum?: string;
+    size?: number;
+    createdAt?: string;
+    currentVersion?: string;
+    error?: string;
+};
 //# sourceMappingURL=types.d.ts.map
\ No newline at end of fileModified: package/out/object-store/upload.d.ts
Index: package/out/object-store/upload.d.ts
===================================================================
--- package/out/object-store/upload.d.ts
+++ package/out/object-store/upload.d.ts
@@ -1,6 +1,6 @@
-import type { FilterAndGenerateUrls, UploadResult } from './types';
-export declare const upload: ({ filterAndGenerateUrls, objects }: {
-    filterAndGenerateUrls: FilterAndGenerateUrls;
+import type { UploadResult } from './types';
+export declare const upload: ({ functionKey, objects }: {
+    functionKey: string;
     objects: Blob[];
 }) => Promise<UploadResult[]>;
 //# sourceMappingURL=upload.d.ts.map
\ No newline at end of file