@openfin/fdc3-api 36.79.13 → 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
  /**
@@ -4466,6 +4475,32 @@ declare type CreateLayoutOptions = {
4466
4475
  container: HTMLElement;
4467
4476
  layoutName: string;
4468
4477
  layout: LayoutOptions;
4478
+ /**
4479
+ * @defaultValue 'default'
4480
+ *
4481
+ * Controls the View behavior for the given `layout` property. Note
4482
+ * that the selected behavior only applies to unnamed Views or
4483
+ * Views with the prefix `internal-generated-`. In all cases, if any
4484
+ * View in the `layout` does not already exist, it will be created
4485
+ * with a name that starts with `internal-generated-`.
4486
+ *
4487
+ * When set to `reparent`, Views prefixed with `internal-generated-` will
4488
+ * be reparented to the current Window and added to this new Layout.
4489
+ * Use this option when you need to transfer an existing Layout between Windows.
4490
+ *
4491
+ * When set to 'duplicate', Views prefixed with `internal-generated-` will
4492
+ * be duplicated with new generated names. Use this option when you need
4493
+ * to clone a Layout to any Window.
4494
+ *
4495
+ * When set to `default` or omitted, the Layout will attempt to re-use
4496
+ * existing Views only if they are attached to the current Window or
4497
+ * the Provider Window. Set to `default` or omit this option when creating
4498
+ * Layouts as part of implementing the LayoutManager::applyLayoutSnapshot
4499
+ * override. Note that during applyLayoutSnapshot, Views are created and
4500
+ * attached to the Provider while the Window is being created, so it's
4501
+ * important to not 'duplicate' Views in this workflow.
4502
+ */
4503
+ multiInstanceViewBehavior?: MultiInstanceViewBehavior;
4469
4504
  };
4470
4505
 
4471
4506
  /**
@@ -5176,8 +5211,14 @@ declare interface Environment {
5176
5211
  getRtcPeer(): RTCPeerConnection;
5177
5212
  getWsConstructor(): typeof WebSocket;
5178
5213
  whenReady(): Promise<void>;
5214
+ getInteropInfo(fin: OpenFin.Fin<OpenFin.EntityType>): Promise<InternalInteropBrokerOptions & {
5215
+ fdc3Version?: Fdc3Version;
5216
+ }>;
5217
+ readonly type: EnvironmentType;
5179
5218
  }
5180
5219
 
5220
+ declare type EnvironmentType = 'node' | 'openfin' | 'other';
5221
+
5181
5222
  declare type ErrorMiddleware = OpenFin.ErrorMiddleware;
5182
5223
 
5183
5224
  declare type ErrorMiddleware_2 = (topic: string, error: Error, id: ProviderIdentity_7 | ClientIdentity) => unknown;
@@ -7294,6 +7335,15 @@ declare class InterApplicationBus extends Base {
7294
7335
 
7295
7336
  declare type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
7296
7337
 
7338
+ declare type InternalFDC3Info = {
7339
+ providerVersion: string;
7340
+ provider: string;
7341
+ };
7342
+
7343
+ declare type InternalInteropBrokerOptions = OpenFin.InteropBrokerOptions & {
7344
+ fdc3Info: InternalFDC3Info;
7345
+ };
7346
+
7297
7347
  /**
7298
7348
  * Define whether to enable interop action logging.
7299
7349
  *
@@ -7422,6 +7472,7 @@ declare type InteropActionLoggingOption = {
7422
7472
  *
7423
7473
  */
7424
7474
  declare class InteropBroker extends Base {
7475
+ #private;
7425
7476
  private getProvider;
7426
7477
  private interopClients;
7427
7478
  private contextGroupsById;
@@ -9737,6 +9788,13 @@ declare type MonitorInfoChangedEvent = BaseEvent_9 & OpenFin.MonitorInfo & {
9737
9788
  type: 'monitor-info-changed';
9738
9789
  };
9739
9790
 
9791
+ /**
9792
+ * @experimental
9793
+ *
9794
+ * Used to control view behavior for Layout.create API
9795
+ */
9796
+ declare type MultiInstanceViewBehavior = 'reparent' | 'duplicate' | 'default';
9797
+
9740
9798
  /**
9741
9799
  * @interface
9742
9800
  */
@@ -10457,6 +10515,7 @@ declare namespace OpenFin {
10457
10515
  LayoutManagerOverride,
10458
10516
  LayoutManager,
10459
10517
  CreateLayoutOptions,
10518
+ MultiInstanceViewBehavior,
10460
10519
  PresetLayoutOptions_2 as PresetLayoutOptions,
10461
10520
  ResultBehavior,
10462
10521
  PopupBaseBehavior,
@@ -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
  /**
@@ -4466,6 +4475,32 @@ declare type CreateLayoutOptions = {
4466
4475
  container: HTMLElement;
4467
4476
  layoutName: string;
4468
4477
  layout: LayoutOptions;
4478
+ /**
4479
+ * @defaultValue 'default'
4480
+ *
4481
+ * Controls the View behavior for the given `layout` property. Note
4482
+ * that the selected behavior only applies to unnamed Views or
4483
+ * Views with the prefix `internal-generated-`. In all cases, if any
4484
+ * View in the `layout` does not already exist, it will be created
4485
+ * with a name that starts with `internal-generated-`.
4486
+ *
4487
+ * When set to `reparent`, Views prefixed with `internal-generated-` will
4488
+ * be reparented to the current Window and added to this new Layout.
4489
+ * Use this option when you need to transfer an existing Layout between Windows.
4490
+ *
4491
+ * When set to 'duplicate', Views prefixed with `internal-generated-` will
4492
+ * be duplicated with new generated names. Use this option when you need
4493
+ * to clone a Layout to any Window.
4494
+ *
4495
+ * When set to `default` or omitted, the Layout will attempt to re-use
4496
+ * existing Views only if they are attached to the current Window or
4497
+ * the Provider Window. Set to `default` or omit this option when creating
4498
+ * Layouts as part of implementing the LayoutManager::applyLayoutSnapshot
4499
+ * override. Note that during applyLayoutSnapshot, Views are created and
4500
+ * attached to the Provider while the Window is being created, so it's
4501
+ * important to not 'duplicate' Views in this workflow.
4502
+ */
4503
+ multiInstanceViewBehavior?: MultiInstanceViewBehavior;
4469
4504
  };
4470
4505
 
4471
4506
  /**
@@ -5176,8 +5211,14 @@ declare interface Environment {
5176
5211
  getRtcPeer(): RTCPeerConnection;
5177
5212
  getWsConstructor(): typeof WebSocket;
5178
5213
  whenReady(): Promise<void>;
5214
+ getInteropInfo(fin: OpenFin.Fin<OpenFin.EntityType>): Promise<InternalInteropBrokerOptions & {
5215
+ fdc3Version?: Fdc3Version;
5216
+ }>;
5217
+ readonly type: EnvironmentType;
5179
5218
  }
5180
5219
 
5220
+ declare type EnvironmentType = 'node' | 'openfin' | 'other';
5221
+
5181
5222
  declare type ErrorMiddleware = OpenFin.ErrorMiddleware;
5182
5223
 
5183
5224
  declare type ErrorMiddleware_2 = (topic: string, error: Error, id: ProviderIdentity_7 | ClientIdentity) => unknown;
@@ -7294,6 +7335,15 @@ declare class InterApplicationBus extends Base {
7294
7335
 
7295
7336
  declare type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
7296
7337
 
7338
+ declare type InternalFDC3Info = {
7339
+ providerVersion: string;
7340
+ provider: string;
7341
+ };
7342
+
7343
+ declare type InternalInteropBrokerOptions = OpenFin.InteropBrokerOptions & {
7344
+ fdc3Info: InternalFDC3Info;
7345
+ };
7346
+
7297
7347
  /**
7298
7348
  * Define whether to enable interop action logging.
7299
7349
  *
@@ -7422,6 +7472,7 @@ declare type InteropActionLoggingOption = {
7422
7472
  *
7423
7473
  */
7424
7474
  declare class InteropBroker extends Base {
7475
+ #private;
7425
7476
  private getProvider;
7426
7477
  private interopClients;
7427
7478
  private contextGroupsById;
@@ -9737,6 +9788,13 @@ declare type MonitorInfoChangedEvent = BaseEvent_9 & OpenFin.MonitorInfo & {
9737
9788
  type: 'monitor-info-changed';
9738
9789
  };
9739
9790
 
9791
+ /**
9792
+ * @experimental
9793
+ *
9794
+ * Used to control view behavior for Layout.create API
9795
+ */
9796
+ declare type MultiInstanceViewBehavior = 'reparent' | 'duplicate' | 'default';
9797
+
9740
9798
  /**
9741
9799
  * @interface
9742
9800
  */
@@ -10457,6 +10515,7 @@ declare namespace OpenFin {
10457
10515
  LayoutManagerOverride,
10458
10516
  LayoutManager,
10459
10517
  CreateLayoutOptions,
10518
+ MultiInstanceViewBehavior,
10460
10519
  PresetLayoutOptions_2 as PresetLayoutOptions,
10461
10520
  ResultBehavior,
10462
10521
  PopupBaseBehavior,
@@ -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
  /**
@@ -4466,6 +4475,32 @@ declare type CreateLayoutOptions = {
4466
4475
  container: HTMLElement;
4467
4476
  layoutName: string;
4468
4477
  layout: LayoutOptions;
4478
+ /**
4479
+ * @defaultValue 'default'
4480
+ *
4481
+ * Controls the View behavior for the given `layout` property. Note
4482
+ * that the selected behavior only applies to unnamed Views or
4483
+ * Views with the prefix `internal-generated-`. In all cases, if any
4484
+ * View in the `layout` does not already exist, it will be created
4485
+ * with a name that starts with `internal-generated-`.
4486
+ *
4487
+ * When set to `reparent`, Views prefixed with `internal-generated-` will
4488
+ * be reparented to the current Window and added to this new Layout.
4489
+ * Use this option when you need to transfer an existing Layout between Windows.
4490
+ *
4491
+ * When set to 'duplicate', Views prefixed with `internal-generated-` will
4492
+ * be duplicated with new generated names. Use this option when you need
4493
+ * to clone a Layout to any Window.
4494
+ *
4495
+ * When set to `default` or omitted, the Layout will attempt to re-use
4496
+ * existing Views only if they are attached to the current Window or
4497
+ * the Provider Window. Set to `default` or omit this option when creating
4498
+ * Layouts as part of implementing the LayoutManager::applyLayoutSnapshot
4499
+ * override. Note that during applyLayoutSnapshot, Views are created and
4500
+ * attached to the Provider while the Window is being created, so it's
4501
+ * important to not 'duplicate' Views in this workflow.
4502
+ */
4503
+ multiInstanceViewBehavior?: MultiInstanceViewBehavior;
4469
4504
  };
4470
4505
 
4471
4506
  /**
@@ -5176,8 +5211,14 @@ declare interface Environment {
5176
5211
  getRtcPeer(): RTCPeerConnection;
5177
5212
  getWsConstructor(): typeof WebSocket;
5178
5213
  whenReady(): Promise<void>;
5214
+ getInteropInfo(fin: OpenFin.Fin<OpenFin.EntityType>): Promise<InternalInteropBrokerOptions & {
5215
+ fdc3Version?: Fdc3Version;
5216
+ }>;
5217
+ readonly type: EnvironmentType;
5179
5218
  }
5180
5219
 
5220
+ declare type EnvironmentType = 'node' | 'openfin' | 'other';
5221
+
5181
5222
  declare type ErrorMiddleware = OpenFin.ErrorMiddleware;
5182
5223
 
5183
5224
  declare type ErrorMiddleware_2 = (topic: string, error: Error, id: ProviderIdentity_7 | ClientIdentity) => unknown;
@@ -7294,6 +7335,15 @@ declare class InterApplicationBus extends Base {
7294
7335
 
7295
7336
  declare type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
7296
7337
 
7338
+ declare type InternalFDC3Info = {
7339
+ providerVersion: string;
7340
+ provider: string;
7341
+ };
7342
+
7343
+ declare type InternalInteropBrokerOptions = OpenFin.InteropBrokerOptions & {
7344
+ fdc3Info: InternalFDC3Info;
7345
+ };
7346
+
7297
7347
  /**
7298
7348
  * Define whether to enable interop action logging.
7299
7349
  *
@@ -7422,6 +7472,7 @@ declare type InteropActionLoggingOption = {
7422
7472
  *
7423
7473
  */
7424
7474
  declare class InteropBroker extends Base {
7475
+ #private;
7425
7476
  private getProvider;
7426
7477
  private interopClients;
7427
7478
  private contextGroupsById;
@@ -9737,6 +9788,13 @@ declare type MonitorInfoChangedEvent = BaseEvent_9 & OpenFin.MonitorInfo & {
9737
9788
  type: 'monitor-info-changed';
9738
9789
  };
9739
9790
 
9791
+ /**
9792
+ * @experimental
9793
+ *
9794
+ * Used to control view behavior for Layout.create API
9795
+ */
9796
+ declare type MultiInstanceViewBehavior = 'reparent' | 'duplicate' | 'default';
9797
+
9740
9798
  /**
9741
9799
  * @interface
9742
9800
  */
@@ -10457,6 +10515,7 @@ declare namespace OpenFin {
10457
10515
  LayoutManagerOverride,
10458
10516
  LayoutManager,
10459
10517
  CreateLayoutOptions,
10518
+ MultiInstanceViewBehavior,
10460
10519
  PresetLayoutOptions_2 as PresetLayoutOptions,
10461
10520
  ResultBehavior,
10462
10521
  PopupBaseBehavior,
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
 
@@ -4509,6 +4530,32 @@ declare type CreateLayoutOptions = {
4509
4530
  container: HTMLElement;
4510
4531
  layoutName: string;
4511
4532
  layout: LayoutOptions;
4533
+ /**
4534
+ * @defaultValue 'default'
4535
+ *
4536
+ * Controls the View behavior for the given `layout` property. Note
4537
+ * that the selected behavior only applies to unnamed Views or
4538
+ * Views with the prefix `internal-generated-`. In all cases, if any
4539
+ * View in the `layout` does not already exist, it will be created
4540
+ * with a name that starts with `internal-generated-`.
4541
+ *
4542
+ * When set to `reparent`, Views prefixed with `internal-generated-` will
4543
+ * be reparented to the current Window and added to this new Layout.
4544
+ * Use this option when you need to transfer an existing Layout between Windows.
4545
+ *
4546
+ * When set to 'duplicate', Views prefixed with `internal-generated-` will
4547
+ * be duplicated with new generated names. Use this option when you need
4548
+ * to clone a Layout to any Window.
4549
+ *
4550
+ * When set to `default` or omitted, the Layout will attempt to re-use
4551
+ * existing Views only if they are attached to the current Window or
4552
+ * the Provider Window. Set to `default` or omit this option when creating
4553
+ * Layouts as part of implementing the LayoutManager::applyLayoutSnapshot
4554
+ * override. Note that during applyLayoutSnapshot, Views are created and
4555
+ * attached to the Provider while the Window is being created, so it's
4556
+ * important to not 'duplicate' Views in this workflow.
4557
+ */
4558
+ multiInstanceViewBehavior?: MultiInstanceViewBehavior;
4512
4559
  };
4513
4560
 
4514
4561
  /**
@@ -5224,8 +5271,14 @@ declare interface Environment {
5224
5271
  getRtcPeer(): RTCPeerConnection;
5225
5272
  getWsConstructor(): typeof WebSocket;
5226
5273
  whenReady(): Promise<void>;
5274
+ getInteropInfo(fin: OpenFin.Fin<OpenFin.EntityType>): Promise<InternalInteropBrokerOptions & {
5275
+ fdc3Version?: Fdc3Version;
5276
+ }>;
5277
+ readonly type: EnvironmentType;
5227
5278
  }
5228
5279
 
5280
+ declare type EnvironmentType = 'node' | 'openfin' | 'other';
5281
+
5229
5282
  declare type ErrorMiddleware = OpenFin.ErrorMiddleware;
5230
5283
 
5231
5284
  declare type ErrorMiddleware_2 = (topic: string, error: Error, id: ProviderIdentity_7 | ClientIdentity) => unknown;
@@ -7384,6 +7437,15 @@ declare class InterAppPayload {
7384
7437
 
7385
7438
  declare type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
7386
7439
 
7440
+ declare type InternalFDC3Info = {
7441
+ providerVersion: string;
7442
+ provider: string;
7443
+ };
7444
+
7445
+ declare type InternalInteropBrokerOptions = OpenFin.InteropBrokerOptions & {
7446
+ fdc3Info: InternalFDC3Info;
7447
+ };
7448
+
7387
7449
  /**
7388
7450
  * Define whether to enable interop action logging.
7389
7451
  *
@@ -7512,6 +7574,7 @@ declare type InteropActionLoggingOption = {
7512
7574
  *
7513
7575
  */
7514
7576
  declare class InteropBroker extends Base {
7577
+ #private;
7515
7578
  private getProvider;
7516
7579
  private interopClients;
7517
7580
  private contextGroupsById;
@@ -7523,7 +7586,7 @@ declare class InteropBroker extends Base {
7523
7586
  /**
7524
7587
  * @internal
7525
7588
  */
7526
- constructor(wire: Transport, getProvider: () => Promise<OpenFin.ChannelProvider>, options?: any);
7589
+ constructor(wire: Transport, getProvider: () => Promise<OpenFin.ChannelProvider>, options: InternalInteropBrokerOptions);
7527
7590
  static createClosedConstructor(...args: ConstructorParameters<typeof InteropBroker>): {
7528
7591
  new (): InteropBroker;
7529
7592
  };
@@ -10014,6 +10077,13 @@ declare type MonitorInfoChangedEvent = BaseEvent_9 & OpenFin.MonitorInfo & {
10014
10077
  type: 'monitor-info-changed';
10015
10078
  };
10016
10079
 
10080
+ /**
10081
+ * @experimental
10082
+ *
10083
+ * Used to control view behavior for Layout.create API
10084
+ */
10085
+ declare type MultiInstanceViewBehavior = 'reparent' | 'duplicate' | 'default';
10086
+
10017
10087
  /**
10018
10088
  * @interface
10019
10089
  */
@@ -10756,6 +10826,7 @@ declare namespace OpenFin {
10756
10826
  LayoutManagerOverride,
10757
10827
  LayoutManager,
10758
10828
  CreateLayoutOptions,
10829
+ MultiInstanceViewBehavior,
10759
10830
  PresetLayoutOptions_2 as PresetLayoutOptions,
10760
10831
  ResultBehavior,
10761
10832
  PopupBaseBehavior,
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.13",
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,