@forge/bridge 2.3.0 → 2.4.0-next.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @forge/bridge
2
2
 
3
+ ## 2.4.0-next.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 14cd9b02: Add a new view.refresh() method
8
+
3
9
  ## 2.3.0
4
10
 
5
11
  ### Minor Changes
@@ -0,0 +1,2 @@
1
+ export declare const refresh: (payload?: any) => Promise<void>;
2
+ //# sourceMappingURL=refresh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refresh.d.ts","sourceRoot":"","sources":["../../src/view/refresh.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO,aAAoB,GAAG,kBAK1C,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.refresh = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const bridge_1 = require("../bridge");
6
+ const errors_1 = require("../errors");
7
+ const callBridge = bridge_1.getCallBridge();
8
+ exports.refresh = (payload) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
9
+ const success = yield callBridge('refresh', payload);
10
+ if (success === false) {
11
+ throw new errors_1.BridgeAPIError("this resource's view is not refreshable.");
12
+ }
13
+ });
@@ -1,6 +1,7 @@
1
1
  export declare const view: {
2
2
  submit: (payload?: any) => Promise<void>;
3
3
  close: (payload?: any) => Promise<void>;
4
+ refresh: (payload?: any) => Promise<void>;
4
5
  createHistory: () => Promise<import("history").History<unknown>>;
5
6
  getContext: () => Promise<import("../types").FullContext>;
6
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/view/view.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI;;;;;CAKhB,CAAC"}
1
+ {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/view/view.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,IAAI;;;;;;CAMhB,CAAC"}
package/out/view/view.js CHANGED
@@ -3,11 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.view = void 0;
4
4
  const submit_1 = require("./submit");
5
5
  const close_1 = require("./close");
6
+ const refresh_1 = require("./refresh");
6
7
  const createHistory_1 = require("./createHistory");
7
8
  const getContext_1 = require("./getContext");
8
9
  exports.view = {
9
10
  submit: submit_1.submit,
10
11
  close: close_1.close,
12
+ refresh: refresh_1.refresh,
11
13
  createHistory: createHistory_1.createHistory,
12
14
  getContext: getContext_1.getContext
13
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/bridge",
3
- "version": "2.3.0",
3
+ "version": "2.4.0-next.0",
4
4
  "description": "Forge bridge API for custom UI apps",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",