@openfin/core 30.73.18 → 30.73.19

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.
Files changed (88) hide show
  1. package/OpenFin.d.ts +1 -1765
  2. package/fdc3.js +2 -0
  3. package/fdc3.ts +264 -0
  4. package/fin.d.ts +3 -4
  5. package/package.json +1 -1
  6. package/src/GlobalOpenFin.d.ts +4 -0
  7. package/src/OpenFin.d.ts +1404 -0
  8. package/src/OpenFin.js +2 -0
  9. package/src/api/application/Factory.d.ts +1 -0
  10. package/src/api/application/Instance.d.ts +1 -0
  11. package/src/api/base.d.ts +1 -0
  12. package/src/api/clipboard/index.d.ts +1 -0
  13. package/src/api/events/application.d.ts +3 -2
  14. package/src/api/events/channel.d.ts +1 -1
  15. package/src/api/events/externalApplication.d.ts +1 -1
  16. package/src/api/events/globalHotkey.d.ts +2 -1
  17. package/src/api/events/system.d.ts +2 -1
  18. package/src/api/events/view.d.ts +3 -2
  19. package/src/api/events/webcontents.d.ts +1 -0
  20. package/src/api/events/window.d.ts +4 -3
  21. package/src/api/external-application/Factory.d.ts +1 -0
  22. package/src/api/external-application/Instance.d.ts +1 -0
  23. package/src/api/fin.d.ts +1 -0
  24. package/src/api/frame/Factory.d.ts +1 -0
  25. package/src/api/frame/Instance.d.ts +1 -0
  26. package/src/api/global-hotkey/index.d.ts +1 -0
  27. package/src/api/interappbus/channel/channel.d.ts +1 -0
  28. package/src/api/interappbus/channel/client.d.ts +1 -0
  29. package/src/api/interappbus/channel/connection-manager.d.ts +1 -0
  30. package/src/api/interappbus/channel/connection-manager.js +6 -2
  31. package/src/api/interappbus/channel/index.d.ts +1 -0
  32. package/src/api/interappbus/channel/index.js +4 -3
  33. package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +1 -0
  34. package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +1 -1
  35. package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +1 -0
  36. package/src/api/interappbus/channel/protocols/rtc/endpoint.js +1 -1
  37. package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +0 -1
  38. package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +1 -0
  39. package/src/api/interappbus/channel/protocols/strategy.d.ts +1 -0
  40. package/src/api/interappbus/channel/provider.d.ts +1 -0
  41. package/src/api/interop/Factory.d.ts +1 -0
  42. package/src/api/interop/InteropBroker.d.ts +6 -2
  43. package/src/api/interop/InteropBroker.js +23 -12
  44. package/src/api/interop/InteropClient.d.ts +1 -0
  45. package/src/api/interop/SessionContextGroupBroker.d.ts +1 -0
  46. package/src/api/interop/SessionContextGroupClient.d.ts +1 -0
  47. package/src/api/interop/fdc3/PrivateChannelClient.d.ts +2 -0
  48. package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +1 -0
  49. package/src/api/interop/fdc3/fdc3-1.2.d.ts +2 -0
  50. package/src/api/interop/fdc3/fdc3-1.2.js +1 -1
  51. package/src/api/interop/fdc3/fdc3-2.0.d.ts +3 -0
  52. package/src/api/interop/fdc3/fdc3-2.0.js +6 -13
  53. package/src/api/interop/fdc3/utils.d.ts +2 -0
  54. package/src/api/interop/utils.d.ts +1 -0
  55. package/src/api/me.d.ts +1 -0
  56. package/src/api/platform/Factory.d.ts +1 -0
  57. package/src/api/platform/Instance.d.ts +1 -0
  58. package/src/api/platform/common-utils.d.ts +1 -0
  59. package/src/api/platform/layout/Factory.d.ts +1 -0
  60. package/src/api/platform/layout/Instance.d.ts +1 -0
  61. package/src/api/platform/layout/Instance.js +0 -1
  62. package/src/api/platform/layout/controllers/tab-drag-controller.d.ts +1 -0
  63. package/src/api/platform/layout/shapes.d.ts +1 -0
  64. package/src/api/platform/layout/utils/bounds-observer.d.ts +1 -1
  65. package/src/api/platform/layout/utils/view-overlay.d.ts +1 -0
  66. package/src/api/snapshot-source/Factory.d.ts +1 -0
  67. package/src/api/snapshot-source/Factory.js +1 -1
  68. package/src/api/snapshot-source/Instance.d.ts +1 -0
  69. package/src/api/snapshot-source/utils.d.ts +1 -0
  70. package/src/api/system/index.d.ts +2 -1
  71. package/src/api/system/index.js +1 -1
  72. package/src/api/view/Factory.d.ts +1 -0
  73. package/src/api/view/Instance.d.ts +1 -0
  74. package/src/api/webcontents/main.d.ts +1 -0
  75. package/src/api/window/Factory.d.ts +1 -0
  76. package/src/api/window/Instance.d.ts +2 -1
  77. package/src/api/window/Instance.js +1 -1
  78. package/src/browser.d.ts +1 -0
  79. package/src/environment/browser.d.ts +1 -0
  80. package/src/environment/environment.d.ts +1 -0
  81. package/src/environment/node-env.d.ts +1 -0
  82. package/src/environment/openfin-env.d.ts +1 -0
  83. package/src/mock.d.ts +1 -1
  84. package/src/mock.js +3 -1
  85. package/src/shapes/WebOptions.d.ts +1 -0
  86. package/src/shapes/WindowOptions.d.ts +1 -0
  87. package/src/shapes/protocol.d.ts +1 -0
  88. package/src/transport/transport.d.ts +2 -1
package/src/OpenFin.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import { Base } from '../base';
2
3
  /**
3
4
  * @typedef {object} ApplicationOptions
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import { EmitterBase } from '../base';
2
3
  import Transport from '../../transport/transport';
3
4
  /**
package/src/api/base.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { EventEmitter } from 'events';
3
+ import * as OpenFin from '../OpenFin';
3
4
  import Transport from '../transport/transport';
4
5
  import Fin from './fin';
5
6
  import { BaseEventMap } from './events/base';
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import { Base } from '../base';
2
3
  /**
3
4
  * WriteRequestType interface
@@ -1,5 +1,6 @@
1
- import { WindowEvent, BaseEventMap, ApplicationEvent } from './base';
2
- import { WindowAlertRequestedEvent, WindowAuthRequestedEvent, WindowEndLoadEvent, PropagatedWindowEvents, WindowPerformanceReport } from './window';
1
+ import * as OpenFin from '../../OpenFin';
2
+ import { ApplicationEvent, BaseEventMap, WindowEvent } from './base';
3
+ import { PropagatedWindowEvents, WindowAlertRequestedEvent, WindowAuthRequestedEvent, WindowEndLoadEvent, WindowPerformanceReport } from './window';
3
4
  import { PropagatedViewEvents } from './view';
4
5
  export interface CrashedEvent {
5
6
  reason: 'normal-termination' | 'abnormal-termination' | 'killed' | 'crashed' | 'still-running' | 'launch-failed' | 'out-of-memory' | 'integrity-failure';
@@ -1,4 +1,4 @@
1
- import { BaseEventMap, ApplicationEvent } from './base';
1
+ import { ApplicationEvent, BaseEventMap } from './base';
2
2
  export interface ChannelEvent<Type> extends ApplicationEvent<'channel', Type> {
3
3
  channelName: string;
4
4
  channelId: string;
@@ -1,4 +1,4 @@
1
- import { RuntimeEvent, BaseEventMap } from './base';
1
+ import { BaseEventMap, RuntimeEvent } from './base';
2
2
  export interface ExternalApplicationEvents extends BaseEventMap {
3
3
  connected: RuntimeEvent<'externalapplication', 'connected'>;
4
4
  disconnected: RuntimeEvent<'externalapplication', 'disconnected'>;
@@ -1,4 +1,5 @@
1
- import { RuntimeEvent, BaseEventMap } from './base';
1
+ import * as OpenFin from '../../OpenFin';
2
+ import { BaseEventMap, RuntimeEvent } from './base';
2
3
  import Identity = OpenFin.Identity;
3
4
  export interface GlobalHotkeyEvent<Type> extends RuntimeEvent<'global-hotkey', Type> {
4
5
  identity: Identity;
@@ -1,4 +1,5 @@
1
- import { BaseEvent, ApplicationEvent, BaseEventMap } from './base';
1
+ import * as OpenFin from '../../OpenFin';
2
+ import { ApplicationEvent, BaseEvent, BaseEventMap } from './base';
2
3
  import { PropagatedWindowEvents } from './window';
3
4
  import { PropagatedApplicationEvents } from './application';
4
5
  import { PropagatedViewEvents } from './view';
@@ -1,5 +1,6 @@
1
- import { WebContentsEventMapping, WindowResourceLoadFailedEvent, WindowResourceResponseReceivedEvent, CertificateSelectionShownEvent } from './webcontents';
2
- import { WindowEvent, BaseEventMap } from './base';
1
+ import * as OpenFin from '../../OpenFin';
2
+ import { CertificateSelectionShownEvent, WebContentsEventMapping, WindowResourceLoadFailedEvent, WindowResourceResponseReceivedEvent } from './webcontents';
3
+ import { BaseEventMap, WindowEvent } from './base';
3
4
  import { WindowNavigationRejectedEvent } from './window';
4
5
  import { CrashedEvent } from './application';
5
6
  export interface ViewEventMapping<Topic = string, Type = string> extends WebContentsEventMapping {
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import { BaseEventMap, WindowEvent } from './base';
2
3
  import { CrashedEvent } from './application';
3
4
  import { WindowNavigationRejectedEvent } from './window';
@@ -1,7 +1,8 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import { CrashedEvent } from './application';
2
- import { WindowEvent, BaseEventMap } from './base';
3
- import { WebContentsEventMapping, WindowResourceLoadFailedEvent, WindowResourceResponseReceivedEvent, CertificateSelectionShownEvent } from './webcontents';
4
- import { PropagatedViewEventMapping, InputEvent } from './view';
3
+ import { BaseEventMap, WindowEvent } from './base';
4
+ import { CertificateSelectionShownEvent, WebContentsEventMapping, WindowResourceLoadFailedEvent, WindowResourceResponseReceivedEvent } from './webcontents';
5
+ import { InputEvent, PropagatedViewEventMapping } from './view';
5
6
  export interface WindowAlertRequestedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
6
7
  message: string;
7
8
  url: string;
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import { Base } from '../base';
2
3
  /**
3
4
  * @lends ExternalApplication
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import { EmitterBase } from '../base';
2
3
  import Transport from '../../transport/transport';
3
4
  /**
package/src/api/fin.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { EventEmitter } from 'events';
3
+ import * as OpenFin from '../OpenFin';
3
4
  import Transport from '../transport/transport';
4
5
  import System from './system/index';
5
6
  import _WindowModule from './window/index';
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import { Base } from '../base';
2
3
  /**
3
4
  * @lends Frame
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import { EmitterBase } from '../base';
2
3
  import Transport from '../../transport/transport';
3
4
  import FrameEvents = OpenFin.FrameEvents;
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import { EmitterBase } from '../base';
2
3
  import Transport from '../../transport/transport';
3
4
  import GlobalHotkeyEvents = OpenFin.GlobalHotkeyEvents;
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../../OpenFin';
1
2
  import Transport from '../../../transport/transport';
2
3
  import ProviderIdentity = OpenFin.ProviderIdentity;
3
4
  import ChannelMiddleware = OpenFin.ChannelMiddleware;
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../../OpenFin';
1
2
  import { ChannelBase } from './channel';
2
3
  import Transport from '../../../transport/transport';
3
4
  import { AnyStrategy } from './protocols/strategy-types';
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../../OpenFin';
1
2
  import { ChannelMessage } from '.';
2
3
  import Transport from '../../../transport/transport';
3
4
  import { Base } from '../../base';
@@ -44,7 +44,7 @@ class ConnectionManager extends base_1.Base {
44
44
  wire.registerMessageHandler(this.onmessage.bind(this));
45
45
  }
46
46
  static getProtocolOptionsFromStrings(protocols) {
47
- return protocols.map(protocol => {
47
+ return protocols.map((protocol) => {
48
48
  switch (protocol) {
49
49
  case 'rtc':
50
50
  return strategy_2.RTCInfo;
@@ -85,7 +85,11 @@ class ConnectionManager extends base_1.Base {
85
85
  }
86
86
  const channel = new provider_1.ChannelProvider(providerIdentity, this.wire, strategy);
87
87
  const key = providerIdentity.channelId;
88
- this.providerMap.set(key, { provider: channel, strategy, supportedProtocols: ConnectionManager.getProtocolOptionsFromStrings(protocols) });
88
+ this.providerMap.set(key, {
89
+ provider: channel,
90
+ strategy,
91
+ supportedProtocols: ConnectionManager.getProtocolOptionsFromStrings(protocols)
92
+ });
89
93
  provider_1.ChannelProvider.setProviderRemoval(channel, this.removeChannelFromProviderMap.bind(this));
90
94
  return channel;
91
95
  }
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../../OpenFin';
1
2
  import ChannelClient from './client';
2
3
  import { ChannelProvider } from './provider';
3
4
  import { EmitterBase } from '../../base';
@@ -57,11 +57,12 @@ class Channel extends base_1.EmitterBase {
57
57
  let connectionUrl;
58
58
  const entityType = this.wire.environment.getCurrentEntityType();
59
59
  if (entityType === 'iframe') {
60
- const frame = fin.Frame.getCurrentSync();
61
- connectionUrl = (await frame.getInfo()).url;
60
+ // @ts-expect-error
61
+ // TODO: type this correctly (frame types are broken)
62
+ const frame = (await this.fin.me.getInfo()).url;
62
63
  }
63
64
  else if (entityType === 'window' || entityType === 'view') {
64
- connectionUrl = (await fin.me.getInfo()).url;
65
+ connectionUrl = (await this.fin.me.getInfo()).url;
65
66
  }
66
67
  const res = await this.wire.sendAction('connect-to-channel', {
67
68
  channelName,
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../../../../OpenFin';
1
2
  import Transport from '../../../../../transport/transport';
2
3
  import { MessageReceiver } from './message-receiver';
3
4
  import { ChannelStrategy, EndpointPayload } from '../strategy';
@@ -1,4 +1,4 @@
1
- import { MessagingProtocols, ExternalClientOffer, ProtocolOffer, LocalSupportedProtocol } from '.';
1
+ import { ExternalClientOffer, LocalSupportedProtocol, MessagingProtocols, ProtocolOffer } from '.';
2
2
  export declare class ProtocolManager {
3
3
  private ProtocolsInPreferenceOrder;
4
4
  DefaultClientProtocols: ['classic'];
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../../../../OpenFin';
1
2
  import ProviderIdentity = OpenFin.ProviderIdentity;
2
3
  export interface RTCEndpointChannels {
3
4
  request: RTCDataChannel;
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- /* eslint-disable @typescript-eslint/no-unused-vars */
3
2
  var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
4
3
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
5
4
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
@@ -14,6 +13,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
14
13
  var _RTCEndpoint_processAction, _RTCEndpoint_disconnectListener;
15
14
  Object.defineProperty(exports, "__esModule", { value: true });
16
15
  exports.RTCEndpoint = void 0;
16
+ /* eslint-disable @typescript-eslint/no-unused-vars */
17
17
  const errors_1 = require("../../../../../util/errors");
18
18
  /*
19
19
  This handles sending RTC messages between RTC connections over the request and response data channels.
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- /* eslint-disable class-methods-use-this */
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.RTCICEManager = void 0;
5
4
  const base_1 = require("../../../../base");
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../../../../OpenFin';
1
2
  import { ChannelStrategy } from '../strategy';
2
3
  import { RTCPacket } from './endpoint';
3
4
  import { LocalSupportedProtocol } from '..';
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../../../OpenFin';
1
2
  import ProviderIdentity = OpenFin.ProviderIdentity;
2
3
  export interface ChannelStrategy<T extends unknown> {
3
4
  onEndpointDisconnect(endpointId: string, listener: () => void): void;
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../../OpenFin';
1
2
  import { ChannelBase } from './channel';
2
3
  import Transport from '../../../transport/transport';
3
4
  import { AnyStrategy } from './protocols/strategy-types';
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import { Base } from '../base';
2
3
  import { InteropBroker } from './InteropBroker';
3
4
  import { InteropClient } from './InteropClient';
@@ -1,3 +1,5 @@
1
+ import { FDC3, FDC3v2 } from '../../../fdc3';
2
+ import * as OpenFin from '../../OpenFin';
1
3
  import { Base } from '../base';
2
4
  import type Transport from '../../transport/transport';
3
5
  import Identity = OpenFin.Identity;
@@ -404,7 +406,9 @@ export declare class InteropBroker extends Base {
404
406
  * @param clientIdentity
405
407
  * @returns { Promise<ImplementationMetadata(2)> }
406
408
  */
407
- fdc3HandleGetInfo(clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
409
+ fdc3HandleGetInfo(payload: {
410
+ fdc3Version: string;
411
+ }, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
408
412
  /**
409
413
  * Returns an array of info for each Interop Client connected to the Interop Broker.
410
414
  *
@@ -443,7 +447,7 @@ export declare class InteropBroker extends Base {
443
447
  private static hasEndpointId;
444
448
  static isContextTypeCompatible(contextType: string, registeredContextType: string | undefined): boolean;
445
449
  private setContextGroupMap;
446
- private static setCurrentContextGroupInClientOptions;
450
+ private setCurrentContextGroupInClientOptions;
447
451
  private setupChannelProvider;
448
452
  private wireChannel;
449
453
  /**
@@ -400,7 +400,7 @@ class InteropBroker extends base_1.Base {
400
400
  const oldContextGroupId = clientSubscriptionState.contextGroupId;
401
401
  if (oldContextGroupId !== contextGroupId) {
402
402
  clientSubscriptionState.contextGroupId = contextGroupId;
403
- await InteropBroker.setCurrentContextGroupInClientOptions(clientIdentity, contextGroupId);
403
+ await this.setCurrentContextGroupInClientOptions(clientIdentity, contextGroupId);
404
404
  const contextGroupMap = this.contextGroupsById.get(contextGroupId);
405
405
  for (const [, handlerInfo] of clientSubscriptionState.contextHandlers) {
406
406
  const { contextType, handlerId } = handlerInfo;
@@ -479,7 +479,7 @@ class InteropBroker extends base_1.Base {
479
479
  if (clientState) {
480
480
  clientState.contextGroupId = undefined;
481
481
  }
482
- await InteropBroker.setCurrentContextGroupInClientOptions(clientIdentity, null);
482
+ await this.setCurrentContextGroupInClientOptions(clientIdentity, null);
483
483
  }
484
484
  // Used by platform windows to know what client groups the provider has declared. Also used internally to access context groups. Overrideable so that the platform developer can modify it.
485
485
  /**
@@ -724,10 +724,21 @@ class InteropBroker extends base_1.Base {
724
724
  * @returns { Promise<ImplementationMetadata(2)> }
725
725
  */
726
726
  // eslint-disable-next-line class-methods-use-this
727
- async fdc3HandleGetInfo(clientIdentity) {
728
- const warning = (0, utils_1.generateOverrideWarning)('fdc3.getInfo', 'InteropBroker.fdc3GetInfo', clientIdentity);
729
- console.warn(warning);
730
- throw new Error(utils_1.BROKER_ERRORS.fdc3GetInfo);
727
+ async fdc3HandleGetInfo(payload, clientIdentity) {
728
+ const { fdc3Version } = payload;
729
+ return {
730
+ fdc3Version,
731
+ provider: 'OpenFin',
732
+ providerVersion: await this.fin.System.getVersion(),
733
+ optionalFeatures: {
734
+ OriginatingAppMetadata: false,
735
+ UserChannelMembershipAPIs: true
736
+ },
737
+ appMetadata: {
738
+ appId: '',
739
+ instanceId: ''
740
+ }
741
+ };
731
742
  }
732
743
  /**
733
744
  * Returns an array of info for each Interop Client connected to the Interop Broker.
@@ -949,14 +960,14 @@ class InteropBroker extends base_1.Base {
949
960
  this.contextGroupsById.set(contextGroupInfo.id, new Map());
950
961
  }
951
962
  }
952
- static async setCurrentContextGroupInClientOptions(clientIdentity, contextGroupId) {
953
- const entityInfo = await fin.System.getEntityInfo(clientIdentity.uuid, clientIdentity.name);
963
+ async setCurrentContextGroupInClientOptions(clientIdentity, contextGroupId) {
964
+ const entityInfo = await this.fin.System.getEntityInfo(clientIdentity.uuid, clientIdentity.name);
954
965
  let entity;
955
966
  if (entityInfo.entityType === 'view') {
956
- entity = await fin.View.wrap(clientIdentity);
967
+ entity = await this.fin.View.wrap(clientIdentity);
957
968
  }
958
969
  else if (entityInfo.entityType === 'window') {
959
- entity = await fin.Window.wrap(clientIdentity);
970
+ entity = await this.fin.Window.wrap(clientIdentity);
960
971
  }
961
972
  if (entity) {
962
973
  await entity.updateOptions({
@@ -1002,7 +1013,7 @@ class InteropBroker extends base_1.Base {
1002
1013
  channel.onDisconnection((clientIdentity) => {
1003
1014
  this.interopClients.delete(clientIdentity.endpointId);
1004
1015
  const targetInfo = this.intentClientMap.get(clientIdentity.name);
1005
- if (targetInfo && clientIdentity.uuid === fin.me.identity.uuid) {
1016
+ if (targetInfo && clientIdentity.uuid === this.fin.me.uuid) {
1006
1017
  targetInfo.forEach((handler) => {
1007
1018
  handler.isReady = false;
1008
1019
  });
@@ -1053,7 +1064,7 @@ class InteropBroker extends base_1.Base {
1053
1064
  channel.register('fdc3FindInstances', this.fdc3HandleFindInstances.bind(this));
1054
1065
  channel.register('fdc3GetAppMetadata', this.fdc3HandleGetAppMetadata.bind(this));
1055
1066
  channel.register('fdc3v2GetInfo', async (payload, clientIdentity) => {
1056
- return this.fdc3HandleGetInfo.bind(this)(clientIdentity);
1067
+ return this.fdc3HandleGetInfo.bind(this)(payload, clientIdentity);
1057
1068
  });
1058
1069
  }
1059
1070
  /**
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import Transport from '../../transport/transport';
2
3
  import { Base } from '../base';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import type { ChannelProvider } from '../interappbus/channel/provider';
2
3
  export default class SessionContextGroupBroker {
3
4
  id: string;
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import Transport from '../../transport/transport';
2
3
  import { Base } from '../base';
3
4
  export default class SessionContextGroupClient extends Base {
@@ -1,3 +1,5 @@
1
+ import { FDC3v2 } from '../../../../fdc3';
2
+ import * as OpenFin from '../../../OpenFin';
1
3
  declare type HandlerId = string;
2
4
  export declare class PrivateChannelClient {
3
5
  id: string;
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../../OpenFin';
1
2
  import { ChannelProvider } from '../../interappbus/channel/provider';
2
3
  declare type HandlerId = string;
3
4
  export declare class PrivateChannelProvider {
@@ -1,3 +1,5 @@
1
+ import { FDC3 } from '../../../../fdc3';
2
+ import * as OpenFin from '../../../OpenFin';
1
3
  import { Base } from '../../base';
2
4
  /**
3
5
  * @typedef { object } Listener
@@ -351,7 +351,7 @@ class Fdc3Module extends base_1.Base {
351
351
  // we do not want to expose this error, just continue if this analytics-only call fails
352
352
  });
353
353
  try {
354
- return await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3Open', { app, context });
354
+ return await InteropClient_1.InteropClient.ferryFdc3Call(this.fin.me.interop, 'fdc3Open', { app, context });
355
355
  }
356
356
  catch (error) {
357
357
  const errorToThrow = error.message === utils_2.BROKER_ERRORS.fdc3Open ? 'ResolverUnavailable' : error;
@@ -1,3 +1,5 @@
1
+ import { FDC3, FDC3v2 } from '../../../../fdc3';
2
+ import * as OpenFin from '../../../OpenFin';
1
3
  import { Base } from '../../base';
2
4
  import Transport from '../../../transport/transport';
3
5
  /**
@@ -290,6 +292,7 @@ export default class Fdc3Module2 extends Base implements FDC3v2.DesktopAgent {
290
292
  leaveCurrentChannel(): Promise<void>;
291
293
  /**
292
294
  * Retrieves information about the FDC3 implementation, including the supported version of the FDC3 specification, the name of the provider of the implementation, its own version number, details of whether optional API features are implemented and the metadata of the calling application according to the desktop agent.
295
+ * fdc3HandleGetInfo must be overridden in the InteropBroker so that the ImplementationMetadata will have the appMetadata info.
293
296
  * @returns { Promise<ImplementationMetadata(2)> }
294
297
  * @tutorial fdc3v2.getInfo
295
298
  */
@@ -188,7 +188,7 @@ class Fdc3Module2 extends base_1.Base {
188
188
  // we do not want to expose this error, just continue if this analytics-only call fails
189
189
  });
190
190
  try {
191
- return await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3FindInstances', app);
191
+ return await InteropClient_1.InteropClient.ferryFdc3Call(this.fin.me.interop, 'fdc3FindInstances', app);
192
192
  }
193
193
  catch (error) {
194
194
  const errorToThrow = error.message === utils_1.BROKER_ERRORS.fdc3FindInstances ? 'ResolverUnavailable' : error;
@@ -206,7 +206,7 @@ class Fdc3Module2 extends base_1.Base {
206
206
  // we do not want to expose this error, just continue if this analytics-only call fails
207
207
  });
208
208
  try {
209
- return await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3GetAppMetadata', app);
209
+ return await InteropClient_1.InteropClient.ferryFdc3Call(this.fin.me.interop, 'fdc3GetAppMetadata', app);
210
210
  }
211
211
  catch (error) {
212
212
  const errorToThrow = error.message === utils_1.BROKER_ERRORS.fdc3GetAppMetadata ? 'ResolverUnavailable' : error;
@@ -285,7 +285,7 @@ class Fdc3Module2 extends base_1.Base {
285
285
  });
286
286
  const payload = resultType ? { context, metadata: { resultType } } : context;
287
287
  try {
288
- return await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3v2FindIntentsByContext', payload);
288
+ return await InteropClient_1.InteropClient.ferryFdc3Call(this.fin.me.interop, 'fdc3v2FindIntentsByContext', payload);
289
289
  }
290
290
  catch (error) {
291
291
  const errorToThrow = error.message === utils_1.BROKER_ERRORS.getInfoForIntentsByContext ? 'ResolverUnavailable' : error;
@@ -362,7 +362,7 @@ class Fdc3Module2 extends base_1.Base {
362
362
  const intentResolutionResultId = (intentMetadata === null || intentMetadata === void 0 ? void 0 : intentMetadata.intentResolutionResultId) || (metadata === null || metadata === void 0 ? void 0 : metadata.intentResolutionResultId);
363
363
  if (intentResolutionResultId) {
364
364
  // Send whatever the result is.
365
- fin.InterApplicationBus.publish(intentResolutionResultId, intentResult);
365
+ this.fin.InterApplicationBus.publish(intentResolutionResultId, intentResult);
366
366
  }
367
367
  if (intentResult instanceof Error) {
368
368
  throw new Error(intentResult.message);
@@ -455,19 +455,12 @@ class Fdc3Module2 extends base_1.Base {
455
455
  }
456
456
  /**
457
457
  * Retrieves information about the FDC3 implementation, including the supported version of the FDC3 specification, the name of the provider of the implementation, its own version number, details of whether optional API features are implemented and the metadata of the calling application according to the desktop agent.
458
+ * fdc3HandleGetInfo must be overridden in the InteropBroker so that the ImplementationMetadata will have the appMetadata info.
458
459
  * @returns { Promise<ImplementationMetadata(2)> }
459
460
  * @tutorial fdc3v2.getInfo
460
461
  */
461
462
  async getInfo() {
462
- try {
463
- const result = await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3v2GetInfo', {});
464
- const partialInfo = this.fdc3Module.getInfo();
465
- return { ...partialInfo, ...result };
466
- }
467
- catch (error) {
468
- const errorToThrow = error.message === utils_1.BROKER_ERRORS.fdc3GetInfo ? 'ResolverUnavailable' : error;
469
- throw new Error(errorToThrow);
470
- }
463
+ return InteropClient_1.InteropClient.ferryFdc3Call(this.fin.me.interop, 'fdc3v2GetInfo', { fdc3Version: '2.0' });
471
464
  }
472
465
  }
473
466
  exports.default = Fdc3Module2;
@@ -1,3 +1,5 @@
1
+ import { FDC3, FDC3v2 } from '../../../../fdc3';
2
+ import * as OpenFin from '../../../OpenFin';
1
3
  import { PrivateChannelClient } from './PrivateChannelClient';
2
4
  interface UnsupportedChannelApis {
3
5
  addContextListener(): Error;
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  export declare const generateId: () => string;
2
3
  export declare const wrapInTryCatch: <T>(f: (...args: any[]) => T, prefix?: string) => (...args: any[]) => T;
3
4
  export declare const wrapContextHandler: (handler: OpenFin.ContextHandler, handlerId: string) => (context: OpenFin.Context) => Promise<void>;
package/src/api/me.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../OpenFin';
1
2
  import type Transport from '../transport/transport';
2
3
  import type { InteropClient } from './interop';
3
4
  export declare const environmentUnsupportedMessage = "You are not running in OpenFin.";
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import { Base } from '../base';
2
3
  import { Channel } from '../interappbus/channel/index';
3
4
  import Transport from '../../transport/transport';
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import { View } from '../view';
2
3
  import { EmitterBase } from '../base';
3
4
  import { Channel } from '../interappbus/channel/index';
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import LayoutPresetType = OpenFin.LayoutPresetType;
2
3
  export declare function isValidPresetType(type: LayoutPresetType): type is LayoutPresetType;
3
4
  declare const _default: {
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../../OpenFin';
1
2
  import { Layout } from './Instance';
2
3
  import { Base } from '../../base';
3
4
  import InitLayoutOptions = OpenFin.InitLayoutOptions;
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../../OpenFin';
1
2
  import Transport from '../../../transport/transport';
2
3
  import { Base } from '../../base';
3
4
  import Identity = OpenFin.Identity;
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- /* eslint-disable no-undef, import/prefer-default-export */
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.Layout = void 0;
5
4
  const validate_1 = require("../../../util/validate");
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../../../OpenFin';
1
2
  import { ViewOverlay } from '../utils/view-overlay';
2
3
  import { View } from '../../../view';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../../OpenFin';
1
2
  import LayoutPresetType = OpenFin.LayoutPresetType;
2
3
  export interface InitLayoutOptions {
3
4
  containerId?: string;
@@ -16,4 +16,4 @@ export declare const isDomRectEqual: (a: DOMRect, b: DOMRect) => boolean;
16
16
  * @returns Function which disposes the observers when invoked.
17
17
  * @ignore
18
18
  */
19
- export declare const observeBounds: (element: Element, onChange: (bounds: DOMRect) => void) => () => void;
19
+ export declare const observeBounds: (element: Element, onChange: (bounds: DOMRect) => void) => (() => void);
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../../../OpenFin';
1
2
  import Transport from '../../../../transport/transport';
2
3
  /**
3
4
  * Api client allowing an empty electron BrowserView to be rendered
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import { Base } from '../base';
2
3
  import { SnapshotSource } from './Instance';
3
4
  /**
@@ -28,7 +28,7 @@ class SnapshotSourceModule extends base_1.Base {
28
28
  typeof provider.applySnapshot !== 'function') {
29
29
  throw new Error('you must pass in a valid SnapshotProvider');
30
30
  }
31
- const channel = await this.fin.InterApplicationBus.Channel.create((0, utils_1.getSnapshotSourceChannelName)(fin.me.identity));
31
+ const channel = await this.fin.InterApplicationBus.Channel.create((0, utils_1.getSnapshotSourceChannelName)(this.fin.me));
32
32
  channel.register('get-snapshot', async () => {
33
33
  const snapshot = await provider.getSnapshot();
34
34
  return { snapshot };
@@ -1,3 +1,4 @@
1
+ import * as OpenFin from '../../OpenFin';
1
2
  import { Base } from '../base';
2
3
  import Transport from '../../transport/transport';
3
4
  /**