@openfin/fdc3-api 36.79.15 → 36.79.17

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.
@@ -88,12 +88,21 @@ declare type Api = {
88
88
  iframe?: {
89
89
  /**
90
90
  * Inject OpenFin API into cross-origin iframes
91
+ *
92
+ * @defaultValue false
91
93
  */
92
94
  crossOriginInjection?: boolean;
93
95
  /**
94
96
  * Inject OpenFin API into same-origin iframes
97
+ *
98
+ * @defaultValue true
95
99
  */
96
100
  sameOriginInjection?: boolean;
101
+ /**
102
+ * @deprecated Shared names should not be used; support is provided purely for back-compat reasons.
103
+ *
104
+ * When `true`, iframes will have the same name as their parent WebContents.
105
+ */
97
106
  enableDeprecatedSharedName?: boolean;
98
107
  };
99
108
  /**
@@ -1668,9 +1677,9 @@ declare class Base {
1668
1677
  * on the context in which the devtools panel was opened.
1669
1678
  */
1670
1679
  get me(): Identity;
1671
- protected isNodeEnvironment: () => boolean;
1672
- protected isOpenFinEnvironment: () => boolean;
1673
- protected isBrowserEnvironment: () => boolean;
1680
+ /* Excluded from this release type: isNodeEnvironment */
1681
+ /* Excluded from this release type: isOpenFinEnvironment */
1682
+ /* Excluded from this release type: isBrowserEnvironment */
1674
1683
  }
1675
1684
 
1676
1685
  /**
@@ -5202,8 +5211,14 @@ declare interface Environment {
5202
5211
  getRtcPeer(): RTCPeerConnection;
5203
5212
  getWsConstructor(): typeof WebSocket;
5204
5213
  whenReady(): Promise<void>;
5214
+ getInteropInfo(fin: OpenFin.Fin<OpenFin.EntityType>): Promise<InternalInteropBrokerOptions & {
5215
+ fdc3Version?: Fdc3Version;
5216
+ }>;
5217
+ readonly type: EnvironmentType;
5205
5218
  }
5206
5219
 
5220
+ declare type EnvironmentType = 'node' | 'openfin' | 'other';
5221
+
5207
5222
  declare type ErrorMiddleware = OpenFin.ErrorMiddleware;
5208
5223
 
5209
5224
  declare type ErrorMiddleware_2 = (topic: string, error: Error, id: ProviderIdentity_7 | ClientIdentity) => unknown;
@@ -7320,6 +7335,15 @@ declare class InterApplicationBus extends Base {
7320
7335
 
7321
7336
  declare type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
7322
7337
 
7338
+ declare type InternalFDC3Info = {
7339
+ providerVersion: string;
7340
+ provider: string;
7341
+ };
7342
+
7343
+ declare type InternalInteropBrokerOptions = OpenFin.InteropBrokerOptions & {
7344
+ fdc3Info: InternalFDC3Info;
7345
+ };
7346
+
7323
7347
  /**
7324
7348
  * Define whether to enable interop action logging.
7325
7349
  *
@@ -7448,6 +7472,7 @@ declare type InteropActionLoggingOption = {
7448
7472
  *
7449
7473
  */
7450
7474
  declare class InteropBroker extends Base {
7475
+ #private;
7451
7476
  private getProvider;
7452
7477
  private interopClients;
7453
7478
  private contextGroupsById;
@@ -88,12 +88,21 @@ declare type Api = {
88
88
  iframe?: {
89
89
  /**
90
90
  * Inject OpenFin API into cross-origin iframes
91
+ *
92
+ * @defaultValue false
91
93
  */
92
94
  crossOriginInjection?: boolean;
93
95
  /**
94
96
  * Inject OpenFin API into same-origin iframes
97
+ *
98
+ * @defaultValue true
95
99
  */
96
100
  sameOriginInjection?: boolean;
101
+ /**
102
+ * @deprecated Shared names should not be used; support is provided purely for back-compat reasons.
103
+ *
104
+ * When `true`, iframes will have the same name as their parent WebContents.
105
+ */
97
106
  enableDeprecatedSharedName?: boolean;
98
107
  };
99
108
  /**
@@ -1668,9 +1677,9 @@ declare class Base {
1668
1677
  * on the context in which the devtools panel was opened.
1669
1678
  */
1670
1679
  get me(): Identity;
1671
- protected isNodeEnvironment: () => boolean;
1672
- protected isOpenFinEnvironment: () => boolean;
1673
- protected isBrowserEnvironment: () => boolean;
1680
+ /* Excluded from this release type: isNodeEnvironment */
1681
+ /* Excluded from this release type: isOpenFinEnvironment */
1682
+ /* Excluded from this release type: isBrowserEnvironment */
1674
1683
  }
1675
1684
 
1676
1685
  /**
@@ -5202,8 +5211,14 @@ declare interface Environment {
5202
5211
  getRtcPeer(): RTCPeerConnection;
5203
5212
  getWsConstructor(): typeof WebSocket;
5204
5213
  whenReady(): Promise<void>;
5214
+ getInteropInfo(fin: OpenFin.Fin<OpenFin.EntityType>): Promise<InternalInteropBrokerOptions & {
5215
+ fdc3Version?: Fdc3Version;
5216
+ }>;
5217
+ readonly type: EnvironmentType;
5205
5218
  }
5206
5219
 
5220
+ declare type EnvironmentType = 'node' | 'openfin' | 'other';
5221
+
5207
5222
  declare type ErrorMiddleware = OpenFin.ErrorMiddleware;
5208
5223
 
5209
5224
  declare type ErrorMiddleware_2 = (topic: string, error: Error, id: ProviderIdentity_7 | ClientIdentity) => unknown;
@@ -7320,6 +7335,15 @@ declare class InterApplicationBus extends Base {
7320
7335
 
7321
7336
  declare type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
7322
7337
 
7338
+ declare type InternalFDC3Info = {
7339
+ providerVersion: string;
7340
+ provider: string;
7341
+ };
7342
+
7343
+ declare type InternalInteropBrokerOptions = OpenFin.InteropBrokerOptions & {
7344
+ fdc3Info: InternalFDC3Info;
7345
+ };
7346
+
7323
7347
  /**
7324
7348
  * Define whether to enable interop action logging.
7325
7349
  *
@@ -7448,6 +7472,7 @@ declare type InteropActionLoggingOption = {
7448
7472
  *
7449
7473
  */
7450
7474
  declare class InteropBroker extends Base {
7475
+ #private;
7451
7476
  private getProvider;
7452
7477
  private interopClients;
7453
7478
  private contextGroupsById;
@@ -88,12 +88,21 @@ declare type Api = {
88
88
  iframe?: {
89
89
  /**
90
90
  * Inject OpenFin API into cross-origin iframes
91
+ *
92
+ * @defaultValue false
91
93
  */
92
94
  crossOriginInjection?: boolean;
93
95
  /**
94
96
  * Inject OpenFin API into same-origin iframes
97
+ *
98
+ * @defaultValue true
95
99
  */
96
100
  sameOriginInjection?: boolean;
101
+ /**
102
+ * @deprecated Shared names should not be used; support is provided purely for back-compat reasons.
103
+ *
104
+ * When `true`, iframes will have the same name as their parent WebContents.
105
+ */
97
106
  enableDeprecatedSharedName?: boolean;
98
107
  };
99
108
  /**
@@ -1668,9 +1677,9 @@ declare class Base {
1668
1677
  * on the context in which the devtools panel was opened.
1669
1678
  */
1670
1679
  get me(): Identity;
1671
- protected isNodeEnvironment: () => boolean;
1672
- protected isOpenFinEnvironment: () => boolean;
1673
- protected isBrowserEnvironment: () => boolean;
1680
+ /* Excluded from this release type: isNodeEnvironment */
1681
+ /* Excluded from this release type: isOpenFinEnvironment */
1682
+ /* Excluded from this release type: isBrowserEnvironment */
1674
1683
  }
1675
1684
 
1676
1685
  /**
@@ -5202,8 +5211,14 @@ declare interface Environment {
5202
5211
  getRtcPeer(): RTCPeerConnection;
5203
5212
  getWsConstructor(): typeof WebSocket;
5204
5213
  whenReady(): Promise<void>;
5214
+ getInteropInfo(fin: OpenFin.Fin<OpenFin.EntityType>): Promise<InternalInteropBrokerOptions & {
5215
+ fdc3Version?: Fdc3Version;
5216
+ }>;
5217
+ readonly type: EnvironmentType;
5205
5218
  }
5206
5219
 
5220
+ declare type EnvironmentType = 'node' | 'openfin' | 'other';
5221
+
5207
5222
  declare type ErrorMiddleware = OpenFin.ErrorMiddleware;
5208
5223
 
5209
5224
  declare type ErrorMiddleware_2 = (topic: string, error: Error, id: ProviderIdentity_7 | ClientIdentity) => unknown;
@@ -7320,6 +7335,15 @@ declare class InterApplicationBus extends Base {
7320
7335
 
7321
7336
  declare type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
7322
7337
 
7338
+ declare type InternalFDC3Info = {
7339
+ providerVersion: string;
7340
+ provider: string;
7341
+ };
7342
+
7343
+ declare type InternalInteropBrokerOptions = OpenFin.InteropBrokerOptions & {
7344
+ fdc3Info: InternalFDC3Info;
7345
+ };
7346
+
7323
7347
  /**
7324
7348
  * Define whether to enable interop action logging.
7325
7349
  *
@@ -7448,6 +7472,7 @@ declare type InteropActionLoggingOption = {
7448
7472
  *
7449
7473
  */
7450
7474
  declare class InteropBroker extends Base {
7475
+ #private;
7451
7476
  private getProvider;
7452
7477
  private interopClients;
7453
7478
  private contextGroupsById;
package/out/fdc3-api.d.ts CHANGED
@@ -88,12 +88,21 @@ declare type Api = {
88
88
  iframe?: {
89
89
  /**
90
90
  * Inject OpenFin API into cross-origin iframes
91
+ *
92
+ * @defaultValue false
91
93
  */
92
94
  crossOriginInjection?: boolean;
93
95
  /**
94
96
  * Inject OpenFin API into same-origin iframes
97
+ *
98
+ * @defaultValue true
95
99
  */
96
100
  sameOriginInjection?: boolean;
101
+ /**
102
+ * @deprecated Shared names should not be used; support is provided purely for back-compat reasons.
103
+ *
104
+ * When `true`, iframes will have the same name as their parent WebContents.
105
+ */
97
106
  enableDeprecatedSharedName?: boolean;
98
107
  };
99
108
  /**
@@ -1688,8 +1697,20 @@ declare class Base {
1688
1697
  * on the context in which the devtools panel was opened.
1689
1698
  */
1690
1699
  get me(): Identity;
1700
+ /**
1701
+ * @internal
1702
+ * @deprecated
1703
+ */
1691
1704
  protected isNodeEnvironment: () => boolean;
1705
+ /**
1706
+ * @internal
1707
+ * @deprecated
1708
+ */
1692
1709
  protected isOpenFinEnvironment: () => boolean;
1710
+ /**
1711
+ * @internal
1712
+ * @deprecated
1713
+ */
1693
1714
  protected isBrowserEnvironment: () => boolean;
1694
1715
  }
1695
1716
 
@@ -5250,8 +5271,14 @@ declare interface Environment {
5250
5271
  getRtcPeer(): RTCPeerConnection;
5251
5272
  getWsConstructor(): typeof WebSocket;
5252
5273
  whenReady(): Promise<void>;
5274
+ getInteropInfo(fin: OpenFin.Fin<OpenFin.EntityType>): Promise<InternalInteropBrokerOptions & {
5275
+ fdc3Version?: Fdc3Version;
5276
+ }>;
5277
+ readonly type: EnvironmentType;
5253
5278
  }
5254
5279
 
5280
+ declare type EnvironmentType = 'node' | 'openfin' | 'other';
5281
+
5255
5282
  declare type ErrorMiddleware = OpenFin.ErrorMiddleware;
5256
5283
 
5257
5284
  declare type ErrorMiddleware_2 = (topic: string, error: Error, id: ProviderIdentity_7 | ClientIdentity) => unknown;
@@ -7410,6 +7437,15 @@ declare class InterAppPayload {
7410
7437
 
7411
7438
  declare type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
7412
7439
 
7440
+ declare type InternalFDC3Info = {
7441
+ providerVersion: string;
7442
+ provider: string;
7443
+ };
7444
+
7445
+ declare type InternalInteropBrokerOptions = OpenFin.InteropBrokerOptions & {
7446
+ fdc3Info: InternalFDC3Info;
7447
+ };
7448
+
7413
7449
  /**
7414
7450
  * Define whether to enable interop action logging.
7415
7451
  *
@@ -7538,6 +7574,7 @@ declare type InteropActionLoggingOption = {
7538
7574
  *
7539
7575
  */
7540
7576
  declare class InteropBroker extends Base {
7577
+ #private;
7541
7578
  private getProvider;
7542
7579
  private interopClients;
7543
7580
  private contextGroupsById;
@@ -7549,7 +7586,7 @@ declare class InteropBroker extends Base {
7549
7586
  /**
7550
7587
  * @internal
7551
7588
  */
7552
- constructor(wire: Transport, getProvider: () => Promise<OpenFin.ChannelProvider>, options?: any);
7589
+ constructor(wire: Transport, getProvider: () => Promise<OpenFin.ChannelProvider>, options: InternalInteropBrokerOptions);
7553
7590
  static createClosedConstructor(...args: ConstructorParameters<typeof InteropBroker>): {
7554
7591
  new (): InteropBroker;
7555
7592
  };
package/out/fdc3-api.js CHANGED
@@ -57,14 +57,26 @@ class Base {
57
57
  * @internal
58
58
  */
59
59
  constructor(wire) {
60
+ /**
61
+ * @internal
62
+ * @deprecated
63
+ */
60
64
  this.isNodeEnvironment = () => {
61
- return this.wire.environment.constructor.name === 'NodeEnvironment';
65
+ return this.wire.environment.type === 'node';
62
66
  };
67
+ /**
68
+ * @internal
69
+ * @deprecated
70
+ */
63
71
  this.isOpenFinEnvironment = () => {
64
- return this.wire.environment.constructor.name === 'OpenFinEnvironment';
72
+ return this.wire.environment.type === 'openfin';
65
73
  };
74
+ /**
75
+ * @internal
76
+ * @deprecated
77
+ */
66
78
  this.isBrowserEnvironment = () => {
67
- return this.wire.environment.constructor.name === 'BrowserEnvironment';
79
+ return this.wire.environment.type === 'other';
68
80
  };
69
81
  this.wire = wire;
70
82
  }
@@ -622,12 +634,12 @@ PrivateChannelClient$1.PrivateChannelClient = PrivateChannelClient;
622
634
  const getIntentResolution = async (interopModule, context, app, intent) => {
623
635
  // Generate an ID to make a session context group with. We will pass that ID to the Broker.
624
636
  // The broker will then setContext on that session context group later with our Intent Result,
625
- const guid = (0, utils_1.generateId)();
637
+ const guid = (0, utils_1.generateId)(); // TODO make this undefined in web
626
638
  // Promise we'll use in getResult
627
- const getResultPromise = new Promise((resolve) => {
639
+ const getResultPromise = new Promise((resolve, reject) => {
628
640
  fin.InterApplicationBus.subscribe({ uuid: '*' }, guid, (intentResult) => {
629
641
  resolve(intentResult);
630
- });
642
+ }).catch(() => reject(new Error('getResult is not supported in this environment')));
631
643
  });
632
644
  // Adding the intentResolutionResultId to the intentObj. Because fireIntent only accepts a single arg, we have to slap it in here.
633
645
  const metadata = app ? { target: app, intentResolutionResultId: guid } : { intentResolutionResultId: guid };
@@ -1526,7 +1538,7 @@ class Fdc3Module extends base_1$1.Base {
1526
1538
  const { metadata } = context;
1527
1539
  const intentResolutionResultId = intentMetadata?.intentResolutionResultId || metadata?.intentResolutionResultId;
1528
1540
  if (intentResolutionResultId) {
1529
- this.fin.InterApplicationBus.publish(intentResolutionResultId, null);
1541
+ this.fin.InterApplicationBus.publish(intentResolutionResultId, null).catch(() => null);
1530
1542
  }
1531
1543
  handler(raisedIntent.context);
1532
1544
  };
@@ -2017,7 +2029,7 @@ class Fdc3Module2 extends base_1.Base {
2017
2029
  intentResultToSend = { error: true };
2018
2030
  }
2019
2031
  if (intentResolutionResultId) {
2020
- this.fin.InterApplicationBus.publish(intentResolutionResultId, intentResultToSend);
2032
+ this.fin.InterApplicationBus.publish(intentResolutionResultId, intentResultToSend).catch(() => null);
2021
2033
  }
2022
2034
  if (intentResult instanceof Error) {
2023
2035
  throw new Error(intentResult.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/fdc3-api",
3
- "version": "36.79.15",
3
+ "version": "36.79.17",
4
4
  "description": "OpenFin fdc3 module utilities and types.",
5
5
  "license": "SEE LICENSE IN LICENSE.MD",
6
6
  "private": false,