@forge/bridge 5.4.0-next.0 → 5.4.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,21 @@
1
1
  # @forge/bridge
2
2
 
3
+ ## 5.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 58d0e97: Update realtime module to be public.
8
+
9
+ ### Patch Changes
10
+
11
+ - 32da8c1: Update realtime bridge methods to accept new token variable
12
+
13
+ ## 5.4.0-next.1
14
+
15
+ ### Patch Changes
16
+
17
+ - 32da8c1: Update realtime bridge methods to accept new token variable
18
+
3
19
  ## 5.4.0-next.0
4
20
 
5
21
  ### Minor Changes
@@ -1,13 +1,17 @@
1
1
  export interface SubscriptionOptions {
2
2
  replay?: number;
3
+ token?: string;
4
+ }
5
+ export interface PublishOptions {
6
+ token?: string;
3
7
  }
4
8
  interface Subscription {
5
9
  unsubscribe: () => Promise<void>;
6
10
  }
7
11
  export declare const realtime: {
8
- publish: (channel: string, payload: any) => Promise<void>;
12
+ publish: (channel: string, payload: any, options?: PublishOptions) => Promise<void>;
9
13
  subscribe: (channel: string, callback: (payload?: any) => any, options?: SubscriptionOptions) => Promise<Subscription>;
10
- publishGlobal: (channel: string, payload: any) => Promise<void>;
14
+ publishGlobal: (channel: string, payload: any, options?: PublishOptions) => Promise<void>;
11
15
  subscribeGlobal: (channel: string, callback: (payload?: any) => any, options?: SubscriptionOptions) => Promise<Subscription>;
12
16
  };
13
17
  export {};
@@ -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;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
+ {"version":3,"file":"realtime.d.ts","sourceRoot":"","sources":["../../src/realtime/realtime.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,YAAY;IACpB,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC;AAiCD,eAAO,MAAM,QAAQ;uBA7BK,MAAM,WAAW,GAAG,YAAY,cAAc,KAAG,QAAQ,IAAI,CAAC;yBAK7E,MAAM,uBACM,GAAG,KAAK,GAAG,YACtB,mBAAmB,KAC5B,QAAQ,YAAY,CAAC;6BAIQ,MAAM,WAAW,GAAG,YAAY,cAAc,KAAG,QAAQ,IAAI,CAAC;+BAKnF,MAAM,uBACM,GAAG,KAAK,GAAG,YACtB,mBAAmB,KAC5B,QAAQ,YAAY,CAAC;CAcvB,CAAC"}
@@ -3,17 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.realtime = void 0;
4
4
  const bridge_1 = require("../bridge");
5
5
  const callBridge = (0, bridge_1.getCallBridge)();
6
- const publish = (channel, payload) => {
7
- return callBridge('publishRealtimeChannel', { channelName: channel, eventPayload: payload });
6
+ const publish = (channel, payload, options) => {
7
+ return callBridge('publishRealtimeChannel', { channelName: channel, eventPayload: payload, options });
8
8
  };
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 });
12
+ const publishGlobal = (channel, payload, options) => {
13
+ return callBridge('publishRealtimeChannel', { channelName: channel, eventPayload: payload, options, isGlobal: true });
14
14
  };
15
15
  const subscribeGlobal = (channel, callback, options) => {
16
- return callBridge('subscribeRealtimeChannel', { channelName: channel, onEvent: callback, options, isGlobal: true });
16
+ return callBridge('subscribeRealtimeChannel', {
17
+ channelName: channel,
18
+ onEvent: callback,
19
+ options,
20
+ isGlobal: true
21
+ });
17
22
  };
18
23
  exports.realtime = {
19
24
  publish,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/bridge",
3
- "version": "5.4.0-next.0",
3
+ "version": "5.4.0",
4
4
  "description": "Forge bridge API for custom UI apps",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",