@forge/bridge 5.11.0-next.3-experimental-cb1ecce → 5.11.0-next.4-experimental-3c69930

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,20 +1,28 @@
1
1
  # @forge/bridge
2
2
 
3
- ## 5.11.0-next.3-experimental-cb1ecce
3
+ ## 5.11.0-next.4-experimental-3c69930
4
4
 
5
5
  ### Minor Changes
6
6
 
7
7
  - f058dd8: Expose Permissions API in @forge/bridge for Custom UI apps
8
+ - 140f500: Add view.onClose bridge method
8
9
 
9
10
  ### Patch Changes
10
11
 
12
+ - 28b4837: Updating types for configurable egress and remotes to match final state of API
11
13
  - Updated dependencies [6b7a4ef]
12
14
  - Updated dependencies [dfa2aa6]
13
15
  - Updated dependencies [e21f32f]
14
16
  - Updated dependencies [545ecc1]
15
17
  - Updated dependencies [eadb4a6]
16
18
  - Updated dependencies [8db2311]
17
- - @forge/manifest@12.0.0-next.3-experimental-cb1ecce
19
+ - @forge/manifest@12.0.0-next.3-experimental-3c69930
20
+
21
+ ## 5.11.0-next.4
22
+
23
+ ### Minor Changes
24
+
25
+ - 140f500: Add view.onClose bridge method
18
26
 
19
27
  ## 5.11.0-next.3
20
28
 
@@ -1,15 +1,15 @@
1
- import { EgressDeleteGroupPayload, EgressDeleteDomainPayload, EgressGetPayload, EgressSetPayload, RemoteGetPayload, RemoteSetPayload, EgressGetResponse, EgressSetResponse, RemoteSetResponse, Remote, EgressResult } from './types';
1
+ import { EgressDeleteGroupPayload, EgressDeleteDomainPayload, EgressGetPayload, EgressSetPayload, RemoteGetPayload, RemoteSetPayload, EgressGetResponse, EgressSetResponse, Remote, EgressResult, RemoteGetResponse } from './types';
2
2
  export declare const permissions: {
3
3
  egress: {
4
4
  get: (payload: EgressGetPayload) => Promise<EgressGetResponse>;
5
5
  set: (payload: EgressSetPayload) => Promise<EgressSetResponse>;
6
- deleteDomain: (payload: EgressDeleteDomainPayload) => Promise<boolean>;
7
- deleteGroup: (payload: EgressDeleteGroupPayload) => Promise<boolean>;
6
+ deleteDomain: (payload: EgressDeleteDomainPayload) => Promise<void>;
7
+ deleteGroup: (payload: EgressDeleteGroupPayload) => Promise<void>;
8
8
  };
9
9
  remote: {
10
- get: (payload: RemoteGetPayload) => Promise<import("./types").RemoteGetResponse>;
11
- set: (payload: RemoteSetPayload) => Promise<RemoteSetResponse>;
10
+ get: (payload: RemoteGetPayload) => Promise<RemoteGetResponse>;
11
+ set: (payload: RemoteSetPayload) => Promise<void>;
12
12
  };
13
13
  };
14
- export { EgressDeleteGroupPayload, EgressDeleteDomainPayload, EgressGetPayload, EgressSetPayload, RemoteGetPayload, RemoteSetPayload, EgressGetResponse, EgressSetResponse, RemoteSetResponse, Remote, EgressResult };
14
+ export { EgressDeleteGroupPayload, EgressDeleteDomainPayload, EgressGetPayload, EgressSetPayload, RemoteGetPayload, RemoteSetPayload, EgressGetResponse, EgressSetResponse, Remote, EgressResult };
15
15
  //# sourceMappingURL=permissions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/permissions/permissions.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,MAAM,EACN,YAAY,EACb,MAAM,SAAS,CAAC;AA4BjB,eAAO,MAAM,WAAW;;uBAxBU,gBAAgB;uBAIhB,gBAAgB;gCAIP,yBAAyB;+BAI1B,wBAAwB;;;uBAIhC,gBAAgB;uBAIhB,gBAAgB;;CAejD,CAAC;AAEF,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,MAAM,EACN,YAAY,EACb,CAAC"}
1
+ {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/permissions/permissions.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,MAAM,EACN,YAAY,EACZ,iBAAiB,EAClB,MAAM,SAAS,CAAC;AA4BjB,eAAO,MAAM,WAAW;;uBAxBU,gBAAgB,KAAG,QAAQ,iBAAiB,CAAC;uBAI7C,gBAAgB,KAAG,QAAQ,iBAAiB,CAAC;gCAIpC,yBAAyB,KAAG,QAAQ,IAAI,CAAC;+BAI1C,wBAAwB,KAAG,QAAQ,IAAI,CAAC;;;uBAIhD,gBAAgB,KAAG,QAAQ,iBAAiB,CAAC;uBAI7C,gBAAgB,KAAG,QAAQ,IAAI,CAAC;;CAejE,CAAC;AAEF,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,MAAM,EACN,YAAY,EACb,CAAC"}
@@ -5,12 +5,12 @@ export declare type EgressGetPayload = {
5
5
  nextPageToken?: string;
6
6
  };
7
7
  export declare type EgressSetPayload = {
8
- groups: {
8
+ egresses: {
9
9
  key: string;
10
10
  description: string;
11
11
  configured: {
12
12
  domain: string;
13
- type: EgressType;
13
+ type: EgressType[];
14
14
  }[];
15
15
  }[];
16
16
  };
@@ -33,9 +33,12 @@ export declare type Remote = {
33
33
  endpoint: string | null;
34
34
  };
35
35
  };
36
- export declare type RemoteSetPayload = Remote;
36
+ export declare type RemoteSetPayload = {
37
+ remotes: Remote[];
38
+ };
37
39
  export declare type RemoteGetResponse = {
38
40
  results: Remote[];
41
+ lastEvaluatedKey?: string;
39
42
  };
40
43
  export declare type EgressResult = {
41
44
  configured: {
@@ -46,13 +49,10 @@ export declare type EgressResult = {
46
49
  key: string;
47
50
  };
48
51
  export declare type EgressGetResponse = {
49
- lastEvaluatedKey: string;
52
+ lastEvaluatedKey?: string;
50
53
  results: EgressResult[];
51
54
  };
52
55
  export declare type EgressSetResponse = {
53
56
  results: EgressResult[];
54
57
  };
55
- export declare type RemoteSetResponse = {
56
- remotes: Remote[];
57
- };
58
58
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/permissions/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,MAAM,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;QACZ,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE;YACV,MAAM,EAAE,MAAM,CAAC;YACf,IAAI,EAAE,UAAU,CAAC;SAClB,EAAE,CAAC;KACL,EAAE,CAAC;CACL,CAAC;AAEF,oBAAY,wBAAwB,GAAG;IACrC,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,oBAAY,yBAAyB,GAAG;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,oBAAY,MAAM,GAAG;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE;QACV,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;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E,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,oBAAY,MAAM,GAAG;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE;QACV,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB,CAAC;CACH,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,UAAU,EAAE;QACV,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,CAAC,UAAU,CAAC,CAAC;KACpB,EAAE,CAAC;IACJ,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const onClose: (payload: () => Promise<void>) => Promise<void>;
2
+ //# sourceMappingURL=onClose.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onClose.d.ts","sourceRoot":"","sources":["../../src/view/onClose.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO,YAAmB,MAAM,QAAQ,IAAI,CAAC,kBASzD,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.onClose = void 0;
4
+ const bridge_1 = require("../bridge");
5
+ const errors_1 = require("../errors");
6
+ const callBridge = (0, bridge_1.getCallBridge)();
7
+ const onClose = async (payload) => {
8
+ try {
9
+ const success = await callBridge('onClose', payload);
10
+ if (success === false) {
11
+ throw new errors_1.BridgeAPIError('`onClose` call has failed.');
12
+ }
13
+ }
14
+ catch (e) {
15
+ throw new errors_1.BridgeAPIError("`onClose` failed because this resource's view is not closable.");
16
+ }
17
+ };
18
+ exports.onClose = onClose;
@@ -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
+ onClose: (payload: () => Promise<void>) => Promise<void>;
4
5
  open: () => Promise<void>;
5
6
  refresh: (payload?: any) => Promise<void>;
6
7
  createHistory: () => Promise<import("history").History>;
@@ -1 +1 @@
1
- {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/view/view.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;CAWhB,CAAC"}
1
+ {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/view/view.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;CAYhB,CAAC"}
package/out/view/view.js CHANGED
@@ -11,9 +11,11 @@ const changeWindowTitle_1 = require("./changeWindowTitle");
11
11
  const theme_1 = require("./theme");
12
12
  const emitReadyEvent_1 = require("./emitReadyEvent");
13
13
  const adf_renderer_1 = require("./adf-renderer");
14
+ const onClose_1 = require("./onClose");
14
15
  exports.view = {
15
16
  submit: submit_1.submit,
16
17
  close: close_1.close,
18
+ onClose: onClose_1.onClose,
17
19
  open: open_1.open,
18
20
  refresh: refresh_1.refresh,
19
21
  createHistory: createHistory_1.createHistory,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/bridge",
3
- "version": "5.11.0-next.3-experimental-cb1ecce",
3
+ "version": "5.11.0-next.4-experimental-3c69930",
4
4
  "description": "Forge bridge API for custom UI apps",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
@@ -20,7 +20,7 @@
20
20
  "@forge/resolver": "1.7.1",
21
21
  "@statsig/js-client": "3.18.2",
22
22
  "@types/history": "^4.7.11",
23
- "@forge/manifest": "12.0.0-next.3-experimental-cb1ecce",
23
+ "@forge/manifest": "12.0.0-next.3-experimental-3c69930",
24
24
  "@types/iframe-resizer": "^3.5.8",
25
25
  "iframe-resizer": "^4.4.5",
26
26
  "uuid": "^9.0.1"