@forge/bridge
Advanced tools
Comparing version 1.0.1-next.0 to 1.1.0-next.1
# @forge/bridge | ||
## 1.1.0-next.1 | ||
### Minor Changes | ||
- 83c2eec: New view.close() method for closing modals | ||
## 1.0.1-next.0 | ||
@@ -4,0 +10,0 @@ |
@@ -11,2 +11,5 @@ declare type InvokePayload = { | ||
export declare const requestConfluence: (fetchUrl: string, fetchOptions?: RequestInit | undefined) => Promise<ProductResponse>; | ||
export declare const view: { | ||
close: () => Promise<void>; | ||
}; | ||
declare const _default: { | ||
@@ -16,4 +19,7 @@ invoke: <T = InvokeResponse>(functionKey: string, payload?: InvokePayload | undefined) => Promise<T>; | ||
requestConfluence: (fetchUrl: string, fetchOptions?: RequestInit | undefined) => Promise<ProductResponse>; | ||
view: { | ||
close: () => Promise<void>; | ||
}; | ||
}; | ||
export default _default; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.requestConfluence = exports.requestJira = exports.invoke = void 0; | ||
exports.view = exports.requestConfluence = exports.requestJira = exports.invoke = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -34,6 +34,30 @@ var errors_1 = require("./errors"); | ||
}; | ||
var close = function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () { | ||
var success, e_1; | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
_a.trys.push([0, 2, , 3]); | ||
return [4, callBridge('close')]; | ||
case 1: | ||
success = _a.sent(); | ||
if (success === false) { | ||
throw new errors_1.BridgeAPIError("this resource's view is not closable."); | ||
} | ||
return [3, 3]; | ||
case 2: | ||
e_1 = _a.sent(); | ||
throw new errors_1.BridgeAPIError("this resource's view is not closable."); | ||
case 3: return [2]; | ||
} | ||
}); | ||
}); }; | ||
exports.view = { | ||
close: close | ||
}; | ||
exports.default = { | ||
invoke: exports.invoke, | ||
requestJira: exports.requestJira, | ||
requestConfluence: exports.requestConfluence | ||
requestConfluence: exports.requestConfluence, | ||
view: exports.view | ||
}; |
{ | ||
"name": "@forge/bridge", | ||
"version": "1.0.1-next.0", | ||
"version": "1.1.0-next.1", | ||
"description": "Forge bridge API for custom UI apps", | ||
@@ -5,0 +5,0 @@ "author": "Atlassian", |
Sorry, the diff of this file is not supported yet
7427
105