@forge/bridge 5.3.0-next.0 → 5.3.0-next.1

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.3.0-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 8dfe9b9: Adds new subscribeGlobal and publishGlobal realtime bridge methods
8
+
3
9
  ## 5.3.0-next.0
4
10
 
5
11
  ### Minor Changes
@@ -4,5 +4,7 @@ export interface SubscriptionOptions {
4
4
  export declare const __realtime: {
5
5
  publish: (channel: string, payload: any) => Promise<void>;
6
6
  subscribe: (channel: string, callback: (payload?: any) => any, options?: SubscriptionOptions) => Promise<void>;
7
+ publishGlobal: (channel: string, payload: any) => Promise<void>;
8
+ subscribeGlobal: (channel: string, callback: (payload?: any) => any, options?: SubscriptionOptions) => Promise<void>;
7
9
  };
8
10
  //# 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;AAYD,eAAO,MAAM,UAAU;uBARG,MAAM,WAAW,GAAG,KAAG,QAAQ,IAAI,CAAC;yBAIlC,MAAM,uBAAuB,GAAG,KAAK,GAAG,YAAY,mBAAmB,KAAG,QAAQ,IAAI,CAAC;CAOlH,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;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"}
@@ -9,7 +9,15 @@ const publish = (channel, payload) => {
9
9
  const subscribe = (channel, callback, options) => {
10
10
  return callBridge('subscribeRealtimeChannel', { channelName: channel, onEvent: callback, options });
11
11
  };
12
+ const publishGlobal = (channel, payload) => {
13
+ return callBridge('publishRealtimeChannel', { channelName: channel, eventPayload: payload, isGlobal: true });
14
+ };
15
+ const subscribeGlobal = (channel, callback, options) => {
16
+ return callBridge('subscribeRealtimeChannel', { channelName: channel, onEvent: callback, options, isGlobal: true });
17
+ };
12
18
  exports.__realtime = {
13
19
  publish,
14
- subscribe
20
+ subscribe,
21
+ publishGlobal,
22
+ subscribeGlobal
15
23
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/bridge",
3
- "version": "5.3.0-next.0",
3
+ "version": "5.3.0-next.1",
4
4
  "description": "Forge bridge API for custom UI apps",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",