@forge/bridge 5.3.0 → 5.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
+ ## 5.4.0-next.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 58d0e97: Update realtime module to be public.
8
+
3
9
  ## 5.3.0
4
10
 
5
11
  ### Minor Changes
@@ -1,10 +1,14 @@
1
1
  export interface SubscriptionOptions {
2
2
  replay?: number;
3
3
  }
4
- export declare const __realtime: {
4
+ interface Subscription {
5
+ unsubscribe: () => Promise<void>;
6
+ }
7
+ export declare const realtime: {
5
8
  publish: (channel: string, payload: any) => Promise<void>;
6
- subscribe: (channel: string, callback: (payload?: any) => any, options?: SubscriptionOptions) => Promise<void>;
9
+ subscribe: (channel: string, callback: (payload?: any) => any, options?: SubscriptionOptions) => Promise<Subscription>;
7
10
  publishGlobal: (channel: string, payload: any) => Promise<void>;
8
- subscribeGlobal: (channel: string, callback: (payload?: any) => any, options?: SubscriptionOptions) => Promise<void>;
11
+ subscribeGlobal: (channel: string, callback: (payload?: any) => any, options?: SubscriptionOptions) => Promise<Subscription>;
9
12
  };
13
+ export {};
10
14
  //# sourceMappingURL=realtime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"realtime.d.ts","sourceRoot":"","sources":["../../src/realtime/realtime.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAwBD,eAAO,MAAM,UAAU;uBApBG,MAAM,WAAW,GAAG,KAAG,QAAQ,IAAI,CAAC;yBAIlC,MAAM,uBAAuB,GAAG,KAAK,GAAG,YAAY,mBAAmB,KAAG,QAAQ,IAAI,CAAC;6BAInF,MAAM,WAAW,GAAG,KAAG,QAAQ,IAAI,CAAC;+BAKzD,MAAM,uBACM,GAAG,KAAK,GAAG,YACtB,mBAAmB,KAC5B,QAAQ,IAAI,CAAC;CASf,CAAC"}
1
+ {"version":3,"file":"realtime.d.ts","sourceRoot":"","sources":["../../src/realtime/realtime.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,YAAY;IACpB,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC;AA4BD,eAAO,MAAM,QAAQ;uBAxBK,MAAM,WAAW,GAAG,KAAG,QAAQ,IAAI,CAAC;yBAKnD,MAAM,uBACM,GAAG,KAAK,GAAG,YACtB,mBAAmB,KAC5B,QAAQ,YAAY,CAAC;6BAIQ,MAAM,WAAW,GAAG,KAAG,QAAQ,IAAI,CAAC;+BAKzD,MAAM,uBACM,GAAG,KAAK,GAAG,YACtB,mBAAmB,KAC5B,QAAQ,YAAY,CAAC;CASvB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.__realtime = void 0;
3
+ exports.realtime = void 0;
4
4
  const bridge_1 = require("../bridge");
5
5
  const callBridge = (0, bridge_1.getCallBridge)();
6
6
  const publish = (channel, payload) => {
@@ -15,7 +15,7 @@ const publishGlobal = (channel, payload) => {
15
15
  const subscribeGlobal = (channel, callback, options) => {
16
16
  return callBridge('subscribeRealtimeChannel', { channelName: channel, onEvent: callback, options, isGlobal: true });
17
17
  };
18
- exports.__realtime = {
18
+ exports.realtime = {
19
19
  publish,
20
20
  subscribe,
21
21
  publishGlobal,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/bridge",
3
- "version": "5.3.0",
3
+ "version": "5.4.0-next.0",
4
4
  "description": "Forge bridge API for custom UI apps",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",