@openfin/core 29.72.13 → 29.72.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "29.72.13",
3
+ "version": "29.72.14",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./src/mock.js",
6
6
  "types": "./src/mock.d.ts",
package/src/api/base.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import { EventEmitter } from 'events';
2
3
  import Transport from '../transport/transport';
3
4
  import Fin from './fin';
@@ -11,6 +12,7 @@ export declare class Base {
11
12
  get me(): Identity;
12
13
  protected isNodeEnvironment: () => boolean;
13
14
  protected isOpenFinEnvironment: () => boolean;
15
+ protected isBrowserEnvironment: () => boolean;
14
16
  }
15
17
  export declare class EmitterBase<EventTypes extends BaseEventMap> extends Base {
16
18
  #private;
@@ -25,14 +27,14 @@ export declare class EmitterBase<EventTypes extends BaseEventMap> extends Base {
25
27
  listenerCount: (type: string | symbol) => number;
26
28
  protected registerEventListener: (eventType: Extract<keyof EventTypes, string> | string | symbol, options: OpenFin.SubscriptionOptions, applySubscription: (emitter: EventEmitter) => void, undoSubscription: (emitter: EventEmitter) => void) => Promise<void>;
27
29
  protected deregisterEventListener: (eventType: Extract<keyof EventTypes, string> | string | symbol, options?: OpenFin.SubscriptionOptions) => Promise<void | EventEmitter>;
28
- on: <E extends string | symbol | Extract<keyof EventTypes, string>>(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: OpenFin.SubscriptionOptions) => Promise<this>;
30
+ on<E extends Extract<keyof EventTypes, string> | string | symbol>(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: OpenFin.SubscriptionOptions): Promise<this>;
29
31
  addListener: <E extends string | symbol | Extract<keyof EventTypes, string>>(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: OpenFin.SubscriptionOptions) => Promise<this>;
30
- once: <E extends string | symbol | Extract<keyof EventTypes, string>>(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: OpenFin.SubscriptionOptions) => Promise<this>;
31
- prependListener: <E extends string | symbol | Extract<keyof EventTypes, string>>(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: OpenFin.SubscriptionOptions) => Promise<this>;
32
- prependOnceListener: <E extends string | symbol | Extract<keyof EventTypes, string>>(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: OpenFin.SubscriptionOptions) => Promise<this>;
33
- removeListener: <E extends string | symbol | Extract<keyof EventTypes, string>>(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: OpenFin.SubscriptionOptions) => Promise<this>;
34
- protected deregisterAllListeners: (eventType: Extract<keyof EventTypes, string> | string | symbol) => Promise<EventEmitter | void>;
35
- removeAllListeners: (eventType?: Extract<keyof EventTypes, string> | string | symbol) => Promise<this>;
32
+ once<E extends Extract<keyof EventTypes, string> | string | symbol>(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: OpenFin.SubscriptionOptions): Promise<this>;
33
+ prependListener<E extends Extract<keyof EventTypes, string> | string | symbol>(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: OpenFin.SubscriptionOptions): Promise<this>;
34
+ prependOnceListener<E extends Extract<keyof EventTypes, string> | string | symbol>(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: OpenFin.SubscriptionOptions): Promise<this>;
35
+ removeListener<E extends Extract<keyof EventTypes, string> | string | symbol>(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: OpenFin.SubscriptionOptions): Promise<this>;
36
+ protected deregisterAllListeners(eventType: Extract<keyof EventTypes, string> | string | symbol): Promise<EventEmitter | void>;
37
+ removeAllListeners(eventType?: Extract<keyof EventTypes, string> | string | symbol): Promise<this>;
36
38
  private deleteEmitterIfNothingRegistered;
37
39
  }
38
40
  export declare class Reply<TOPIC extends string, TYPE extends string | void> implements Identity {
package/src/api/base.js CHANGED
@@ -25,6 +25,9 @@ class Base {
25
25
  this.isOpenFinEnvironment = () => {
26
26
  return this.wire.environment.constructor.name === 'OpenFinEnvironment';
27
27
  };
28
+ this.isBrowserEnvironment = () => {
29
+ return this.wire.environment.constructor.name === 'BrowserEnvironment';
30
+ };
28
31
  this.wire = wire;
29
32
  }
30
33
  get fin() {
@@ -83,86 +86,86 @@ class EmitterBase extends Base {
83
86
  // This will only be reached if unsubscribe from event that does not exist but do not want to error here
84
87
  return Promise.resolve();
85
88
  };
86
- this.on = async (eventType, listener, options) => {
87
- await this.registerEventListener(eventType, options, (emitter) => {
88
- emitter.on(eventType, listener);
89
- }, (emitter) => {
90
- emitter.removeListener(eventType, listener);
91
- });
92
- return this;
93
- };
94
89
  this.addListener = this.on;
95
- this.once = async (eventType, listener, options) => {
96
- const deregister = () => this.deregisterEventListener(eventType);
97
- await this.registerEventListener(eventType, options, (emitter) => {
98
- emitter.once(eventType, deregister);
99
- emitter.once(eventType, listener);
100
- }, (emitter) => {
101
- emitter.removeListener(eventType, deregister);
102
- emitter.removeListener(eventType, listener);
103
- });
104
- return this;
105
- };
106
- this.prependListener = async (eventType, listener, options) => {
107
- await this.registerEventListener(eventType, options, (emitter) => {
108
- emitter.prependListener(eventType, listener);
109
- }, (emitter) => {
110
- emitter.removeListener(eventType, listener);
111
- });
112
- return this;
113
- };
114
- this.prependOnceListener = async (eventType, listener, options) => {
115
- const deregister = () => this.deregisterEventListener(eventType);
116
- await this.registerEventListener(eventType, options, (emitter) => {
117
- emitter.prependOnceListener(eventType, listener);
118
- emitter.once(eventType, deregister);
119
- }, (emitter) => {
120
- emitter.removeListener(eventType, listener);
121
- emitter.removeListener(eventType, deregister);
122
- });
123
- return this;
124
- };
125
- this.removeListener = async (eventType, listener, options) => {
126
- const emitter = await this.deregisterEventListener(eventType, options);
90
+ __classPrivateFieldSet(this, _emitterAccessor, [topic, ...additionalAccessors]);
91
+ this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
92
+ }
93
+ async on(eventType, listener, options) {
94
+ await this.registerEventListener(eventType, options, (emitter) => {
95
+ emitter.on(eventType, listener);
96
+ }, (emitter) => {
97
+ emitter.removeListener(eventType, listener);
98
+ });
99
+ return this;
100
+ }
101
+ async once(eventType, listener, options) {
102
+ const deregister = () => this.deregisterEventListener(eventType);
103
+ await this.registerEventListener(eventType, options, (emitter) => {
104
+ emitter.once(eventType, deregister);
105
+ emitter.once(eventType, listener);
106
+ }, (emitter) => {
107
+ emitter.removeListener(eventType, deregister);
108
+ emitter.removeListener(eventType, listener);
109
+ });
110
+ return this;
111
+ }
112
+ async prependListener(eventType, listener, options) {
113
+ await this.registerEventListener(eventType, options, (emitter) => {
114
+ emitter.prependListener(eventType, listener);
115
+ }, (emitter) => {
116
+ emitter.removeListener(eventType, listener);
117
+ });
118
+ return this;
119
+ }
120
+ async prependOnceListener(eventType, listener, options) {
121
+ const deregister = () => this.deregisterEventListener(eventType);
122
+ await this.registerEventListener(eventType, options, (emitter) => {
123
+ emitter.prependOnceListener(eventType, listener);
124
+ emitter.once(eventType, deregister);
125
+ }, (emitter) => {
126
+ emitter.removeListener(eventType, listener);
127
+ emitter.removeListener(eventType, deregister);
128
+ });
129
+ return this;
130
+ }
131
+ async removeListener(eventType, listener, options) {
132
+ const emitter = await this.deregisterEventListener(eventType, options);
133
+ if (emitter) {
134
+ emitter.removeListener(eventType, listener);
135
+ this.deleteEmitterIfNothingRegistered(emitter);
136
+ }
137
+ return this;
138
+ }
139
+ async deregisterAllListeners(eventType) {
140
+ const runtimeEvent = { ...this.identity, type: eventType, topic: this.topic };
141
+ if (this.hasEmitter()) {
142
+ const emitter = this.getOrCreateEmitter();
143
+ const refCount = emitter.listenerCount(runtimeEvent.type);
144
+ const unsubscribePromises = [];
145
+ for (let i = 0; i < refCount; i++) {
146
+ unsubscribePromises.push(this.wire.sendAction('unsubscribe-to-desktop-event', runtimeEvent).catch(() => null));
147
+ }
148
+ await Promise.all(unsubscribePromises);
149
+ return emitter;
150
+ }
151
+ return undefined;
152
+ }
153
+ async removeAllListeners(eventType) {
154
+ const removeByEvent = async (event) => {
155
+ const emitter = await this.deregisterAllListeners(event);
127
156
  if (emitter) {
128
- emitter.removeListener(eventType, listener);
157
+ emitter.removeAllListeners(event);
129
158
  this.deleteEmitterIfNothingRegistered(emitter);
130
159
  }
131
- return this;
132
- };
133
- this.deregisterAllListeners = async (eventType) => {
134
- const runtimeEvent = { ...this.identity, type: eventType, topic: this.topic };
135
- if (this.hasEmitter()) {
136
- const emitter = this.getOrCreateEmitter();
137
- const refCount = emitter.listenerCount(runtimeEvent.type);
138
- const unsubscribePromises = [];
139
- for (let i = 0; i < refCount; i++) {
140
- unsubscribePromises.push(this.wire.sendAction('unsubscribe-to-desktop-event', runtimeEvent).catch(() => null));
141
- }
142
- await Promise.all(unsubscribePromises);
143
- return emitter;
144
- }
145
- return undefined;
146
160
  };
147
- this.removeAllListeners = async (eventType) => {
148
- const removeByEvent = async (event) => {
149
- const emitter = await this.deregisterAllListeners(event);
150
- if (emitter) {
151
- emitter.removeAllListeners(event);
152
- this.deleteEmitterIfNothingRegistered(emitter);
153
- }
154
- };
155
- if (eventType) {
156
- await removeByEvent(eventType);
157
- }
158
- else if (this.hasEmitter()) {
159
- const events = this.getOrCreateEmitter().eventNames();
160
- await promises_1.promiseMap(events, removeByEvent);
161
- }
162
- return this;
163
- };
164
- __classPrivateFieldSet(this, _emitterAccessor, [topic, ...additionalAccessors]);
165
- this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
161
+ if (eventType) {
162
+ await removeByEvent(eventType);
163
+ }
164
+ else if (this.hasEmitter()) {
165
+ const events = this.getOrCreateEmitter().eventNames();
166
+ await promises_1.promiseMap(events, removeByEvent);
167
+ }
168
+ return this;
166
169
  }
167
170
  deleteEmitterIfNothingRegistered(emitter) {
168
171
  if (emitter.eventNames().length === 0) {
@@ -326,14 +326,58 @@ export declare class InteropBroker extends Base {
326
326
  * Responsible for resolving an fdc3.open call.
327
327
  * Must be overridden.
328
328
  * @param { Fdc3OpenOptions } fdc3OpenOptions fdc3.open options
329
- * @param { clientIdentity } clientIdentity Identity of the Client making the request.
329
+ * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
330
330
  */
331
331
  fdc3HandleOpen({ app, context }: {
332
- app: FDC3.TargetApp;
332
+ app: FDC3.TargetApp | FDC3v2.AppIdentifier;
333
333
  context: OpenFin.Context;
334
- }, clientIdentity: OpenFin.ClientIdentity): Promise<void>;
334
+ }, clientIdentity: OpenFin.ClientIdentity): Promise<void | FDC3v2.AppIdentifier>;
335
+ /**
336
+ * Responsible for resolving the fdc3.findInstances call.
337
+ * Must be overridden
338
+ * @param { AppIdentifier(2) } app AppIdentifier that was passed to fdc3.findInstances
339
+ * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
340
+ */
335
341
  fdc3HandleFindInstances(app: FDC3v2.AppIdentifier, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
342
+ /**
343
+ * Responsible for resolving the fdc3.getAppMetadata call.
344
+ * Must be overridden
345
+ * @param { AppIdentifier(2) } app AppIdentifier that was passed to fdc3.getAppMetadata
346
+ * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
347
+ */
336
348
  fdc3HandleGetAppMetadata(app: FDC3v2.AppIdentifier, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
349
+ /**
350
+ * This function is called by the Interop Broker whenever a Context handler would fire.
351
+ * For FDC3 2.0 you would need to override this function and add the contextMetadata as
352
+ * part of the Context object. Then would you need to call
353
+ * super.invokeContextHandler passing it this new Context object along with the clientIdentity and handlerId
354
+ * @param { ClientIdentity } clientIdentity
355
+ * @param { string } handlerId
356
+ * @param { Context } context
357
+ * @returns { Promise<void> }
358
+ * @tutorial interopBroker.invokeContextHandler
359
+ */
360
+ invokeContextHandler(clientIdentity: OpenFin.ClientIdentity, handlerId: string, context: OpenFin.Context): Promise<void>;
361
+ /**
362
+ * This function is called by the Interop Broker whenever an Intent handler would fire.
363
+ * For FDC3 2.0 you would need to override this function and add the contextMetadata as
364
+ * part of the Context object inside the Intent object. Then would you need to call
365
+ * super.invokeIntentHandler passing it this new Intent object along with the clientIdentity and handlerId
366
+ * @param { ClientIdentity } ClientIdentity
367
+ * @param { string } handlerId
368
+ * @param { Context } context
369
+ * @returns { Promise<void> }
370
+ * @tutorial interopBroker.invokeIntentHandler
371
+ */
372
+ invokeIntentHandler(clientIdentity: OpenFin.ClientIdentity, handlerId: string, intent: OpenFin.Intent): Promise<void>;
373
+ /**
374
+ * Responsible for resolving fdc3.getInfo for FDC3 2.0
375
+ * Would need to return the optionalFeatures and appMetadata for the {@link ImplementationMetadata ImplementationMetadata}.
376
+ * Must be overridden.
377
+ * @param clientIdentity
378
+ * @returns { Promise<ImplementationMetadata(2)> }
379
+ */
380
+ fdc3HandleGetInfo(clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
337
381
  decorateSnapshot(snapshot: OpenFin.Snapshot): OpenFin.Snapshot;
338
382
  applySnapshot(snapshot: OpenFin.Snapshot, options: OpenFin.ApplySnapshotOptions): void;
339
383
  updateExistingClients(contextGroupStates: OpenFin.ContextGroupStates): void;
@@ -344,7 +388,6 @@ export declare class InteropBroker extends Base {
344
388
  handlerId: string;
345
389
  }, clientIdentity: OpenFin.ClientIdentity): void;
346
390
  intentHandlerRegistered(payload: any, clientIdentity: OpenFin.ClientIdentity): Promise<void>;
347
- protected invokeContextHandler(clientIdentity: OpenFin.ClientIdentity, handlerId: string, context: OpenFin.Context): void;
348
391
  removeContextHandler({ handlerId }: {
349
392
  handlerId: string;
350
393
  }, clientIdentity: OpenFin.ClientIdentity): void;
@@ -549,7 +549,7 @@ class InteropBroker extends base_1.Base {
549
549
  const { clientIdentity, pendingIntents } = handlerInfo;
550
550
  try {
551
551
  const intentToSend = pendingIntents[pendingIntents.length - 1];
552
- await this.channel.dispatch(clientIdentity, handlerId, intentToSend);
552
+ await this.invokeIntentHandler(clientIdentity, handlerId, intentToSend);
553
553
  handlerInfo.pendingIntents = [];
554
554
  }
555
555
  catch (error) {
@@ -620,7 +620,7 @@ class InteropBroker extends base_1.Base {
620
620
  * Responsible for resolving an fdc3.open call.
621
621
  * Must be overridden.
622
622
  * @param { Fdc3OpenOptions } fdc3OpenOptions fdc3.open options
623
- * @param { clientIdentity } clientIdentity Identity of the Client making the request.
623
+ * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
624
624
  */
625
625
  // eslint-disable-next-line class-methods-use-this
626
626
  async fdc3HandleOpen({ app, context }, clientIdentity) {
@@ -628,17 +628,77 @@ class InteropBroker extends base_1.Base {
628
628
  console.warn(warning);
629
629
  throw new Error(utils_1.BROKER_ERRORS.fdc3Open);
630
630
  }
631
+ /**
632
+ * Responsible for resolving the fdc3.findInstances call.
633
+ * Must be overridden
634
+ * @param { AppIdentifier(2) } app AppIdentifier that was passed to fdc3.findInstances
635
+ * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
636
+ */
631
637
  // eslint-disable-next-line class-methods-use-this
632
638
  async fdc3HandleFindInstances(app, clientIdentity) {
633
639
  const warning = utils_1.generateOverrideWarning('fdc3.open', 'InteropBroker.fdc3HandleFindInstances', clientIdentity);
634
640
  console.warn(warning);
635
641
  throw new Error(utils_1.BROKER_ERRORS.fdc3FindInstances);
636
642
  }
643
+ /**
644
+ * Responsible for resolving the fdc3.getAppMetadata call.
645
+ * Must be overridden
646
+ * @param { AppIdentifier(2) } app AppIdentifier that was passed to fdc3.getAppMetadata
647
+ * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
648
+ */
637
649
  // eslint-disable-next-line class-methods-use-this
638
650
  async fdc3HandleGetAppMetadata(app, clientIdentity) {
639
651
  const warning = utils_1.generateOverrideWarning('fdc3.getAppMetadata', 'InteropBroker.fdc3HandleGetAppMetadata', clientIdentity);
640
652
  console.warn(warning);
641
- throw new Error(utils_1.BROKER_ERRORS.fdc3FindInstances);
653
+ throw new Error(utils_1.BROKER_ERRORS.fdc3GetAppMetadata);
654
+ }
655
+ /**
656
+ * This function is called by the Interop Broker whenever a Context handler would fire.
657
+ * For FDC3 2.0 you would need to override this function and add the contextMetadata as
658
+ * part of the Context object. Then would you need to call
659
+ * super.invokeContextHandler passing it this new Context object along with the clientIdentity and handlerId
660
+ * @param { ClientIdentity } clientIdentity
661
+ * @param { string } handlerId
662
+ * @param { Context } context
663
+ * @returns { Promise<void> }
664
+ * @tutorial interopBroker.invokeContextHandler
665
+ */
666
+ async invokeContextHandler(clientIdentity, handlerId, context) {
667
+ const provider = await this.getProvider();
668
+ try {
669
+ await provider.dispatch(clientIdentity, handlerId, context);
670
+ }
671
+ catch (error) {
672
+ console.error(`Error invoking context handler ${handlerId} for context type ${context.type} in client ${clientIdentity.uuid}/${clientIdentity.name}/${clientIdentity.endpointId}`, error);
673
+ }
674
+ }
675
+ /**
676
+ * This function is called by the Interop Broker whenever an Intent handler would fire.
677
+ * For FDC3 2.0 you would need to override this function and add the contextMetadata as
678
+ * part of the Context object inside the Intent object. Then would you need to call
679
+ * super.invokeIntentHandler passing it this new Intent object along with the clientIdentity and handlerId
680
+ * @param { ClientIdentity } ClientIdentity
681
+ * @param { string } handlerId
682
+ * @param { Context } context
683
+ * @returns { Promise<void> }
684
+ * @tutorial interopBroker.invokeIntentHandler
685
+ */
686
+ async invokeIntentHandler(clientIdentity, handlerId, intent) {
687
+ const provider = await this.getProvider();
688
+ await provider.dispatch(clientIdentity, handlerId, intent);
689
+ }
690
+ /**
691
+ * Responsible for resolving fdc3.getInfo for FDC3 2.0
692
+ * Would need to return the optionalFeatures and appMetadata for the {@link ImplementationMetadata ImplementationMetadata}.
693
+ * Must be overridden.
694
+ * @param clientIdentity
695
+ * @returns { Promise<ImplementationMetadata(2)> }
696
+ */
697
+ // eslint-disable-next-line class-methods-use-this
698
+ async fdc3HandleGetInfo(clientIdentity) {
699
+ const warning = utils_1.generateOverrideWarning('fdc3.getInfo', 'InteropBroker.fdc3GetInfo', clientIdentity);
700
+ console.warn(warning);
701
+ throw new Error(utils_1.BROKER_ERRORS.fdc3GetInfo);
642
702
  }
643
703
  /*
644
704
  Snapshot APIs
@@ -743,7 +803,7 @@ class InteropBroker extends base_1.Base {
743
803
  try {
744
804
  if (pendingIntents.length > 0) {
745
805
  const intentToSend = pendingIntents[pendingIntents.length - 1];
746
- await this.channel.dispatch(clientIdentity, handlerId, intentToSend);
806
+ await this.invokeIntentHandler(clientIdentity, handlerId, intentToSend);
747
807
  handlerInfo.pendingIntents = [];
748
808
  }
749
809
  }
@@ -752,14 +812,6 @@ class InteropBroker extends base_1.Base {
752
812
  }
753
813
  }
754
814
  }
755
- // Used to invoke a client's context handler
756
- invokeContextHandler(clientIdentity, handlerId, context) {
757
- this.getProvider().then((channel) => {
758
- channel.dispatch(clientIdentity, handlerId, context).catch((e) => {
759
- console.error(`Error invoking context handler ${handlerId} for context type ${context.type} in client ${clientIdentity.uuid}/${clientIdentity.name}/${clientIdentity.endpointId}`, e);
760
- });
761
- });
762
- }
763
815
  // Used to remove a context handler for a client
764
816
  removeContextHandler({ handlerId }, clientIdentity) {
765
817
  const clientState = this.getClientState(clientIdentity);
@@ -951,6 +1003,9 @@ class InteropBroker extends base_1.Base {
951
1003
  channel.register('fdc3v2FindIntentsByContext', this.handleInfoForIntentsByContext.bind(this));
952
1004
  channel.register('fdc3FindInstances', this.fdc3HandleFindInstances.bind(this));
953
1005
  channel.register('fdc3GetAppMetadata', this.fdc3HandleGetAppMetadata.bind(this));
1006
+ channel.register('fdc3v2GetInfo', async (payload, clientIdentity) => {
1007
+ return this.fdc3HandleGetInfo.bind(this)(clientIdentity);
1008
+ });
954
1009
  }
955
1010
  /**
956
1011
  * Can be used to completely prevent a connection. Return false to prevent connections. Allows all connections by default.
@@ -272,5 +272,5 @@ export declare class InteropClient extends Base {
272
272
  * @tutorial interop.onDisconnection
273
273
  */
274
274
  onDisconnection(listener: OpenFin.InteropClientOnDisconnectionListener): Promise<void>;
275
- static ferryFdc3Call(interopClient: OpenFin.InteropClient, action: string, payload: any): Promise<any>;
275
+ static ferryFdc3Call(interopClient: OpenFin.InteropClient, action: string, payload?: any): Promise<any>;
276
276
  }
@@ -453,7 +453,7 @@ class InteropClient extends base_1.Base {
453
453
  // used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
454
454
  static async ferryFdc3Call(interopClient, action, payload) {
455
455
  const client = await __classPrivateFieldGet(interopClient, _clientPromise);
456
- return client.dispatch(action, payload);
456
+ return client.dispatch(action, payload || null);
457
457
  }
458
458
  }
459
459
  exports.InteropClient = InteropClient;
@@ -51,12 +51,16 @@ import { Base } from '../../base';
51
51
  * @property { string } [providerVersion] The provider runtime version
52
52
  */
53
53
  /**
54
- * The FDC3 Client Library provides a set APIs to be used for FDC3 compliance,
54
+ * @class
55
+ * @alias fdc3
56
+ * @version 1.2
57
+ * @hideconstructor
58
+ * @desc The FDC3 Client Library provides a set APIs to be used for FDC3 compliance,
55
59
  * while using our Interop API under the hood. In order to use this set of APIs
56
60
  * you will need to set up your own {@link InteropBroker InteropBroker} or use a Platform application, which does the setup for you. Refer to our documentation on
57
61
  * our {@link https://developers.openfin.co/of-docs/docs/enable-color-linking Interop API}.
58
62
  *
59
- * We currently support APIs based on FDC3 1.2. To enable the FDC3 APIs in a {@link Window Window} or {@link View View}, add the fdc3InteropApi
63
+ * To enable the FDC3 APIs in a {@link Window Window} or {@link View View}, add the fdc3InteropApi
60
64
  * property to its options:
61
65
  *
62
66
  * ```js
@@ -83,10 +87,6 @@ import { Base } from '../../base';
83
87
  * window.addEventListener('fdc3Ready', fdc3Action);
84
88
  * }
85
89
  * ```
86
- *
87
- * @class
88
- * @alias Fdc3
89
- * @hideconstructor
90
90
  */
91
91
  export default class Fdc3Module extends Base implements FDC3.DesktopAgent {
92
92
  /**
@@ -56,12 +56,16 @@ const InteropClient_1 = require("../InteropClient");
56
56
  * @property { string } [providerVersion] The provider runtime version
57
57
  */
58
58
  /**
59
- * The FDC3 Client Library provides a set APIs to be used for FDC3 compliance,
59
+ * @class
60
+ * @alias fdc3
61
+ * @version 1.2
62
+ * @hideconstructor
63
+ * @desc The FDC3 Client Library provides a set APIs to be used for FDC3 compliance,
60
64
  * while using our Interop API under the hood. In order to use this set of APIs
61
65
  * you will need to set up your own {@link InteropBroker InteropBroker} or use a Platform application, which does the setup for you. Refer to our documentation on
62
66
  * our {@link https://developers.openfin.co/of-docs/docs/enable-color-linking Interop API}.
63
67
  *
64
- * We currently support APIs based on FDC3 1.2. To enable the FDC3 APIs in a {@link Window Window} or {@link View View}, add the fdc3InteropApi
68
+ * To enable the FDC3 APIs in a {@link Window Window} or {@link View View}, add the fdc3InteropApi
65
69
  * property to its options:
66
70
  *
67
71
  * ```js
@@ -88,10 +92,6 @@ const InteropClient_1 = require("../InteropClient");
88
92
  * window.addEventListener('fdc3Ready', fdc3Action);
89
93
  * }
90
94
  * ```
91
- *
92
- * @class
93
- * @alias Fdc3
94
- * @hideconstructor
95
95
  */
96
96
  class Fdc3Module extends base_1.Base {
97
97
  /**