@openfin/core 35.78.1 → 35.78.4

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/out/mock.d.ts CHANGED
@@ -43,6 +43,8 @@ declare type Accelerator = {
43
43
  };
44
44
 
45
45
  /**
46
+ * Options to use when adding a view to a {@link TabStack}.
47
+ *
46
48
  * @interface
47
49
  */
48
50
  declare type AddViewOptions = CreateViewTarget & {
@@ -64,7 +66,7 @@ declare type AddViewToStackOptions = {
64
66
  * Generated when an alert is fired and suppressed due to the customWindowAlert flag being true.
65
67
  * @interface
66
68
  */
67
- declare type AlertRequestedEvent = BaseWindowEvent & {
69
+ declare type AlertRequestedEvent = BaseEvent_5 & {
68
70
  type: 'alert-requested';
69
71
  message: string;
70
72
  url: string;
@@ -94,6 +96,10 @@ declare type Api = {
94
96
  sameOriginInjection?: boolean;
95
97
  enableDeprecatedSharedName?: boolean;
96
98
  };
99
+ /**
100
+ * Prevent fin API injection. If true `fin` won't be available in this context.
101
+ */
102
+ preventInjection?: boolean;
97
103
  };
98
104
 
99
105
  declare type ApiCall<Request, Response> = {
@@ -105,6 +111,15 @@ declare type ApiClient<T extends Record<any, any>> = {
105
111
  [key in keyof PickOfType<T, Function>]: (...args: Parameters<T[key]>) => ReturnType<T[key]> extends Promise<any> ? ReturnType<T[key]> : Promise<ReturnType<T[key]>>;
106
112
  };
107
113
 
114
+ /**
115
+ * Generated when a new Platform's API becomes responsive.
116
+ * @interface
117
+ */
118
+ declare type ApiReadyEvent = BaseEvent & {
119
+ topic: 'application';
120
+ type: 'platform-api-ready';
121
+ };
122
+
108
123
  /**
109
124
  * @interface
110
125
  */
@@ -184,100 +199,6 @@ declare class Application extends EmitterBase<OpenFin_2.ApplicationEvent> {
184
199
  */
185
200
  constructor(wire: Transport, identity: OpenFin_2.ApplicationIdentity);
186
201
  private windowListFromIdentityList;
187
- /**
188
- * Adds a listener to the end of the listeners array for the specified event.
189
- * @param eventType - The type of the event.
190
- * @param listener - Called whenever an event of the specified type occurs.
191
- * @param options - Option to support event timestamps.
192
- *
193
- * @function addListener
194
- * @memberof Application
195
- * @instance
196
- * @tutorial Application.EventEmitter
197
- */
198
- /**
199
- * Adds a listener to the end of the listeners array for the specified event.
200
- * @param eventType - The type of the event.
201
- * @param listener - Called whenever an event of the specified type occurs.
202
- * @param options - Option to support event timestamps.
203
- *
204
- * @function on
205
- * @memberof Application
206
- * @instance
207
- * @tutorial Application.EventEmitter
208
- */
209
- /**
210
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
211
- * @param eventType - The type of the event.
212
- * @param listener - The callback function.
213
- * @param options - Option to support event timestamps.
214
- *
215
- * @function once
216
- * @memberof Application
217
- * @instance
218
- * @tutorial Application.EventEmitter
219
- */
220
- /**
221
- * Adds a listener to the beginning of the listeners array for the specified event.
222
- * @param eventType - The type of the event.
223
- * @param listener - The callback function.
224
- * @param options - Option to support event timestamps.
225
- *
226
- * @function prependListener
227
- * @memberof Application
228
- * @instance
229
- * @tutorial Application.EventEmitter
230
- */
231
- /**
232
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
233
- * The listener is added to the beginning of the listeners array.
234
- * @param eventType - The type of the event.
235
- * @param listener - The callback function.
236
- * @param options - Option to support event timestamps.
237
- *
238
- * @function prependOnceListener
239
- * @memberof Application
240
- * @instance
241
- * @tutorial Application.EventEmitter
242
- */
243
- /**
244
- * Remove a listener from the listener array for the specified event.
245
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
246
- * @param eventType - The type of the event.
247
- * @param listener - The callback function.
248
- * @param options - Option to support event timestamps.
249
- *
250
- * @function removeListener
251
- * @memberof Application
252
- * @instance
253
- * @tutorial Application.EventEmitter
254
- */
255
- /**
256
- * Removes all listeners, or those of the specified event.
257
- * @param eventType - The type of the event.
258
- *
259
- * @function removeAllListeners
260
- * @memberof Application
261
- * @instance
262
- * @tutorial Application.EventEmitter
263
- */
264
- /**
265
- * JumpListCategory interface
266
- * @typedef { object } JumpListCategory@typedef { object } JumpListCategory
267
- * @property { string } name The display title for the category. If omitted, items in this category will be placed into the standard 'Tasks' category. There can be only one such category, and it will always be displayed at the bottom of the JumpList.
268
- * @property { JumpListItem[] } items Array of JumpListItem objects
269
- */
270
- /**
271
- * @PORTED
272
- * JumpListItem interface
273
- * @typedef { object } JumpListItem@typedef { object } JumpListItem
274
- * @property { string } type One of the following: "task" or "separator". Defaults to task.
275
- * @property { string } title The text to be displayed for the JumpList Item. Should only be set if type is "task".
276
- * @property { string } description Description of the task (displayed in a tooltip). Should only be set if type is "task".
277
- * @property { string } deepLink Deep link to a manifest, i.e: fins://path.to/manifest.json?$$param1=value1. See {@link https://developers.openfin.co/docs/deep-linking deep-linking} for more information.
278
- * @property { string } iconPath The absolute path to an icon to be displayed for the item, which can be an arbitrary resource file that contains an icon (e.g. .ico, .exe, .dll).
279
- * @property { number } iconIndex The index of the icon in the resource file. If a resource file contains multiple icons this value can be used to specify the zero-based index of the icon that should be displayed for this task. If a resource file contains only one icon, this property should be set to zero.
280
- */
281
202
  /**
282
203
  * Determines if the application is currently running.
283
204
  *
@@ -862,19 +783,15 @@ declare class Application extends EmitterBase<OpenFin_2.ApplicationEvent> {
862
783
  }
863
784
 
864
785
  /**
865
- * Generated when an application has authenticated and is connected.
866
- * @interface
786
+ * @deprecated Renamed to {@link ConnectedEvent}.
867
787
  */
868
- declare type ApplicationConnectedEvent = IdentityEvent & {
869
- topic: 'application';
870
- type: 'connected';
871
- };
788
+ declare type ApplicationConnectedEvent = ConnectedEvent_2;
872
789
 
873
790
  /**
874
791
  * Generated when an application is created.
875
792
  * @interface
876
793
  */
877
- declare type ApplicationCreatedEvent = BaseSystemEvent & IdentityEvent & {
794
+ declare type ApplicationCreatedEvent = BaseEvent_8 & BaseEvents.IdentityEvent & {
878
795
  type: 'application-created';
879
796
  };
880
797
 
@@ -898,17 +815,15 @@ declare type ApplicationCreationOptions = Partial<ApplicationOptions> & {
898
815
  };
899
816
 
900
817
  /**
901
- * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by an {@link Application}. Events are
902
- * discriminated by {@link ApplicationEvent.type | their type}. Event payloads unique to `Application` can be found
903
- * under the {@link OpenFin.ApplicationEvents} namespace (payloads inherited from propagated events are defined in the namespace
904
- * from which they propagate).
818
+ * @deprecated Renamed to {@link Event}.
905
819
  */
906
- declare type ApplicationEvent = PropagatedViewEvent<'application'> | PropagatedWindowEvent<'application'> | ApplicationWindowEvent | ApplicationSourcedEvent;
820
+ declare type ApplicationEvent = Event_3;
907
821
 
908
822
  declare type ApplicationEvent_2 = Events.ApplicationEvents.ApplicationEvent;
909
823
 
910
824
  declare namespace ApplicationEvents {
911
825
  export {
826
+ BaseEvent_3 as BaseEvent,
912
827
  BaseApplicationEvent,
913
828
  CrashedEvent,
914
829
  FileDownloadLocationChangedEvent,
@@ -922,6 +837,7 @@ declare namespace ApplicationEvents {
922
837
  WindowStartLoadEvent,
923
838
  ApplicationWindowEvent,
924
839
  ClosedEvent,
840
+ ConnectedEvent_2 as ConnectedEvent,
925
841
  ApplicationConnectedEvent,
926
842
  InitializedEvent,
927
843
  ManifestChangedEvent,
@@ -929,19 +845,24 @@ declare namespace ApplicationEvents {
929
845
  RespondingEvent,
930
846
  StartedEvent,
931
847
  ApplicationSourcedEvent,
848
+ ApplicationSourcedEventType,
849
+ Event_3 as Event,
932
850
  ApplicationEvent,
851
+ EventType_3 as EventType,
933
852
  ApplicationEventType,
853
+ PropagatedEvent_4 as PropagatedEvent,
934
854
  PropagatedApplicationEvent,
855
+ PropagatedEventType_3 as PropagatedEventType,
935
856
  PropagatedApplicationEventType,
936
- Payload_2 as Payload,
937
- ByType
857
+ Payload_4 as Payload,
858
+ ByType_3 as ByType
938
859
  }
939
860
  }
940
861
 
941
862
  /**
942
- * Union of possible `type` values for a {@link OpenFin.ApplicationEvents.ApplicationEvent}.
863
+ * @deprecated Renamed to {@link EventType}.
943
864
  */
944
- declare type ApplicationEventType = ApplicationEvent['type'];
865
+ declare type ApplicationEventType = EventType_3;
945
866
 
946
867
  declare type ApplicationIdentity = OpenFin_2.ApplicationIdentity;
947
868
 
@@ -1294,9 +1215,13 @@ declare type ApplicationPermissions = {
1294
1215
  * A union of all events that emit natively on the `Application` topic, i.e. excluding those that propagate
1295
1216
  * from {@link OpenFin.ViewEvents} or {@link OpenFin.WindowEvents}. Due to details in propagation prefixing rules,
1296
1217
  * does not include {@link ApplicationWindowEvent Application events that are tied to Windows but do not propagate from them}.
1297
- *
1298
1218
  */
1299
- declare type ApplicationSourcedEvent = ClosedEvent | ApplicationConnectedEvent | CrashedEvent | InitializedEvent | ManifestChangedEvent | NotRespondingEvent | RespondingEvent | RunRequestedEvent_2 | StartedEvent | TrayIconClickedEvent | FileDownloadLocationChangedEvent;
1219
+ declare type ApplicationSourcedEvent = ClosedEvent | ConnectedEvent_2 | CrashedEvent | InitializedEvent | ManifestChangedEvent | NotRespondingEvent | RespondingEvent | RunRequestedEvent_2 | StartedEvent | TrayIconClickedEvent | FileDownloadLocationChangedEvent;
1220
+
1221
+ /**
1222
+ * Union of possible type values for an {@link ApplicationSourcedEvent}.
1223
+ */
1224
+ declare type ApplicationSourcedEventType = ApplicationSourcedEvent['type'];
1300
1225
 
1301
1226
  declare type ApplicationState = OpenFin_2.ApplicationState;
1302
1227
 
@@ -1612,7 +1537,7 @@ declare interface AuthorizationPayload {
1612
1537
  * ```
1613
1538
  * @interface
1614
1539
  */
1615
- declare type AuthRequestedEvent = BaseWindowEvent & {
1540
+ declare type AuthRequestedEvent = BaseEvent_5 & {
1616
1541
  type: 'auth-requested';
1617
1542
  authInfo: {
1618
1543
  host: string;
@@ -1680,21 +1605,9 @@ declare class Base {
1680
1605
  }
1681
1606
 
1682
1607
  /**
1683
- * Base type for events emitting on the `application` topic
1684
- * @interface
1685
- */
1686
- declare type BaseApplicationEvent = NamedEvent & {
1687
- topic: `application`;
1688
- };
1689
-
1690
- /**
1691
- * A base Channel event.
1692
- * @interface
1608
+ * @deprecated Renamed to {@link BaseEvent}.
1693
1609
  */
1694
- declare type BaseChannelEvent = NamedEvent & {
1695
- channelName: string;
1696
- channelId: string;
1697
- };
1610
+ declare type BaseApplicationEvent = BaseEvent_3;
1698
1611
 
1699
1612
  /**
1700
1613
  * @interface
@@ -1763,10 +1676,70 @@ declare type BaseEvent = {
1763
1676
  type: string;
1764
1677
  };
1765
1678
 
1766
- declare type BaseEvent_2 = Events.BaseEvents.BaseEvent;
1679
+ /**
1680
+ * A base Channel event.
1681
+ * @interface
1682
+ */
1683
+ declare type BaseEvent_2 = NamedEvent & {
1684
+ channelName: string;
1685
+ channelId: string;
1686
+ };
1687
+
1688
+ /**
1689
+ * Base type for events emitting on the `application` topic
1690
+ * @interface
1691
+ */
1692
+ declare type BaseEvent_3 = BaseEvents.NamedEvent & {
1693
+ topic: `application`;
1694
+ };
1695
+
1696
+ /**
1697
+ * Base type for events emitting on the `view` topic
1698
+ * @interface
1699
+ */
1700
+ declare type BaseEvent_4 = BaseEvents.NamedEvent & {
1701
+ topic: 'view';
1702
+ target: OpenFin_2.Identity;
1703
+ };
1704
+
1705
+ /**
1706
+ * Base type for events emitting on the `window` topic
1707
+ * @interface
1708
+ */
1709
+ declare type BaseEvent_5 = BaseEvents.NamedEvent & {
1710
+ topic: 'window';
1711
+ };
1712
+
1713
+ /**
1714
+ * Base type for events emitting on the `externalapplication` topic
1715
+ * @interface
1716
+ */
1717
+ declare type BaseEvent_6 = BaseEvents.BaseEvent & {
1718
+ topic: 'externalapplication';
1719
+ };
1720
+
1721
+ /**
1722
+ * The base frame event.
1723
+ * @interface
1724
+ */
1725
+ declare type BaseEvent_7 = NamedEvent & {
1726
+ entityType: 'iframe';
1727
+ frameName: string;
1728
+ };
1729
+
1730
+ /**
1731
+ * Base type for events emitting on the `system` topic
1732
+ * @interface
1733
+ */
1734
+ declare type BaseEvent_8 = BaseEvents.BaseEvent & {
1735
+ topic: 'system';
1736
+ };
1737
+
1738
+ declare type BaseEvent_9 = Events.BaseEvents.BaseEvent;
1767
1739
 
1768
1740
  declare namespace BaseEvents {
1769
1741
  export {
1742
+ NotCloseRequested,
1770
1743
  PropagatedEventType,
1771
1744
  PropagatedEvent,
1772
1745
  EventHandler,
@@ -1777,21 +1750,14 @@ declare namespace BaseEvents {
1777
1750
  }
1778
1751
 
1779
1752
  /**
1780
- * Base type for events emitting on the `externalapplication` topic
1781
- * @interface
1753
+ * @deprecated Renamed to {@link BaseEvent}.
1782
1754
  */
1783
- declare type BaseExternalApplicationEvent = BaseEvent & {
1784
- topic: 'externalapplication';
1785
- };
1755
+ declare type BaseExternalApplicationEvent = BaseEvent_6;
1786
1756
 
1787
1757
  /**
1788
- * The base frame event.
1789
- * @interface
1758
+ * @deprecated Renamed to {@link BaseEvent}.
1790
1759
  */
1791
- declare type BaseFrameEvent = NamedEvent & {
1792
- entityType: 'iframe';
1793
- frameName: string;
1794
- };
1760
+ declare type BaseFrameEvent = BaseEvent_7;
1795
1761
 
1796
1762
  declare type BaseLoadFailedEvent = NamedEvent & {
1797
1763
  errorCode: number;
@@ -1800,35 +1766,20 @@ declare type BaseLoadFailedEvent = NamedEvent & {
1800
1766
  isMainFrame: boolean;
1801
1767
  };
1802
1768
 
1803
- /**
1804
- * Base type for events emitting on the `system` topic
1805
- * @interface
1806
- */
1807
- declare type BaseSystemEvent = BaseEvent & {
1808
- topic: 'system';
1809
- };
1810
-
1811
1769
  declare type BaseUrlEvent = NamedEvent & {
1812
1770
  type: 'url-changed';
1813
1771
  url: string;
1814
1772
  };
1815
1773
 
1816
1774
  /**
1817
- * Base type for events emitting on the `view` topic
1818
- * @interface
1775
+ * @deprecated Renamed to {@link BaseEvent}.
1819
1776
  */
1820
- declare type BaseViewEvent = NamedEvent & {
1821
- topic: 'view';
1822
- target: OpenFin_2.Identity;
1823
- };
1777
+ declare type BaseViewEvent = BaseEvent_4;
1824
1778
 
1825
1779
  /**
1826
- * Base type for events emitting on the `window` topic
1827
- * @interface
1780
+ * @deprecated Renamed to {@link BaseEvent}.
1828
1781
  */
1829
- declare type BaseWindowEvent = NamedEvent & {
1830
- topic: 'window';
1831
- };
1782
+ declare type BaseWindowEvent = BaseEvent_5;
1832
1783
 
1833
1784
  /**
1834
1785
  * User decision of whether a Window or specific View should close when trying to prevent an unload.
@@ -1895,7 +1846,7 @@ declare type BoundsChangedEvent = BoundsChangeEvent & {
1895
1846
  * A general bounds change event without event type.
1896
1847
  * @interface
1897
1848
  */
1898
- declare type BoundsChangeEvent = BaseWindowEvent & {
1849
+ declare type BoundsChangeEvent = BaseEvent_5 & {
1899
1850
  changeType: 0 | 1 | 2;
1900
1851
  deferred: boolean;
1901
1852
  height: number;
@@ -1967,76 +1918,76 @@ declare interface BrowserWindow {
1967
1918
  }
1968
1919
 
1969
1920
  /**
1970
- * Extracts a single event type matching the given key from the {@link ApplicationEvent} union.
1921
+ * Extracts a single event type matching the given key from the View {@link Event} union.
1971
1922
  *
1972
1923
  * Alias for {@link Payload}, which may read better in source.
1973
1924
  *
1974
1925
  * @typeParam Type String key specifying the event to extract
1975
1926
  */
1976
- declare type ByType<Type extends ApplicationEventType> = Payload_2<Type>;
1927
+ declare type ByType<Type extends EventType> = Payload_2<Type>;
1977
1928
 
1978
1929
  /**
1979
- * Extracts a single event type matching the given key from the {@link ExternalApplicationEvent} union.
1930
+ * Extracts a single event type matching the given key from the Window {@link Event} union.
1980
1931
  *
1981
1932
  * Alias for {@link Payload}, which may read better in source.
1982
1933
  *
1983
1934
  * @typeParam Type String key specifying the event to extract
1984
1935
  */
1985
- declare type ByType_2<Type extends ExternalApplicationEventType> = Payload_3<Type>;
1936
+ declare type ByType_2<Type extends EventType_2> = Payload_3<Type>;
1986
1937
 
1987
1938
  /**
1988
- * Extracts a single event type matching the given key from the {@link FrameEvent} union.
1939
+ * Extracts a single event type matching the given key from the Application {@link Event} union.
1989
1940
  *
1990
1941
  * Alias for {@link Payload}, which may read better in source.
1991
1942
  *
1992
1943
  * @typeParam Type String key specifying the event to extract
1993
1944
  */
1994
- declare type ByType_3<Type extends FrameEventType> = Payload_4<Type>;
1945
+ declare type ByType_3<Type extends EventType_3> = Payload_4<Type>;
1995
1946
 
1996
1947
  /**
1997
- * Extracts a single event type matching the given key from the {@link GlobalHotkeyEvent} union.
1948
+ * Extracts a single event type matching the given key from the ExternalApplication {@link Event} union.
1998
1949
  *
1999
1950
  * Alias for {@link Payload}, which may read better in source.
2000
1951
  *
2001
1952
  * @typeParam Type String key specifying the event to extract
2002
1953
  */
2003
- declare type ByType_4<Type extends GlobalHotkeyEventType> = Payload_5<Type>;
1954
+ declare type ByType_4<Type extends EventType_4> = Payload_5<Type>;
2004
1955
 
2005
1956
  /**
2006
- * Extracts a single event type matching the given key from the {@link PlatformEvent} union.
1957
+ * Extracts a single event type matching the given key from the Frame {@link Event} union.
2007
1958
  *
2008
1959
  * Alias for {@link Payload}, which may read better in source.
2009
1960
  *
2010
1961
  * @typeParam Type String key specifying the event to extract
2011
1962
  */
2012
- declare type ByType_5<Type extends PlatformEventType> = Payload_6<Type>;
1963
+ declare type ByType_5<Type extends EventType_5> = Payload_6<Type>;
2013
1964
 
2014
1965
  /**
2015
- * Extracts a single event type matching the given key from the {@link SystemEvent} union.
1966
+ * Extracts a single event type matching the given key from the GlobalHotkey {@link Event} union.
2016
1967
  *
2017
1968
  * Alias for {@link Payload}, which may read better in source.
2018
1969
  *
2019
1970
  * @typeParam Type String key specifying the event to extract
2020
1971
  */
2021
- declare type ByType_6<Type extends SystemEventType> = Payload_7<Type>;
1972
+ declare type ByType_6<Type extends EventType_6> = Payload_7<Type>;
2022
1973
 
2023
1974
  /**
2024
- * Extracts a single event type matching the given key from the {@link ViewEvent} union.
1975
+ * Extracts a single event type matching the given key from the Platform {@link Event} union.
2025
1976
  *
2026
1977
  * Alias for {@link Payload}, which may read better in source.
2027
1978
  *
2028
1979
  * @typeParam Type String key specifying the event to extract
2029
1980
  */
2030
- declare type ByType_7<Type extends ViewEventType> = Payload_8<Type>;
1981
+ declare type ByType_7<Type extends EventType_7> = Payload_8<Type>;
2031
1982
 
2032
1983
  /**
2033
- * Extracts a single event type matching the given key from the {@link WindowEvent} union.
1984
+ * Extracts a single event type matching the given key from the System {@link Event} union.
2034
1985
  *
2035
1986
  * Alias for {@link Payload}, which may read better in source.
2036
1987
  *
2037
1988
  * @typeParam Type String key specifying the event to extract
2038
1989
  */
2039
- declare type ByType_8<Type extends WindowEventType> = Payload_9<Type>;
1990
+ declare type ByType_8<Type extends EventType_8> = Payload_9<Type>;
2040
1991
 
2041
1992
  /**
2042
1993
  * Configuration for page capture.
@@ -2719,14 +2670,6 @@ declare type ChannelClientConnectionListener = (identity: ClientIdentity, connec
2719
2670
 
2720
2671
  declare type ChannelClientDisconnectionListener = (identity: ClientIdentity) => any;
2721
2672
 
2722
- /**
2723
- * Generated when a Channel client is connected.
2724
- * @interface
2725
- */
2726
- declare type ChannelConnectedEvent = BaseChannelEvent & {
2727
- type: 'connected';
2728
- };
2729
-
2730
2673
  /**
2731
2674
  * Options provided on a client connection to a channel.
2732
2675
  *
@@ -2758,21 +2701,9 @@ declare type ChannelCreateOptions = {
2758
2701
  };
2759
2702
 
2760
2703
  /**
2761
- * Generated when a Channel client has disconnected.
2762
- * @interface
2763
- */
2764
- declare type ChannelDisconnectedEvent = BaseChannelEvent & {
2765
- type: 'disconnected';
2766
- };
2767
-
2768
- /**
2769
- * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Channel}. Events are
2770
- * discriminated by {@link ChannelEvent.type | their type}. Event payloads unique to `Channel` can be found
2771
- * under the {@link OpenFin.ChannelEvents} namespace.
2704
+ * @deprecated Renamed to {@link Event}.
2772
2705
  */
2773
- declare type ChannelEvent = {
2774
- topic: 'channel';
2775
- } & (ChannelConnectedEvent | ChannelDisconnectedEvent);
2706
+ declare type ChannelEvent = Event_2;
2776
2707
 
2777
2708
  declare type ChannelMiddleware = OpenFin_2.ChannelMiddleware;
2778
2709
 
@@ -3129,20 +3060,6 @@ declare type ClientInfo = Omit<ClientIdentity, 'isLocalEndpointId'> & {
3129
3060
  connectionUrl: string;
3130
3061
  };
3131
3062
 
3132
- /**
3133
- * @PORTED
3134
- * WriteRequestType interface
3135
- * @typedef { object } WriteRequestType@typedef { object } WriteRequestType
3136
- * @property { string } data Data to be written
3137
- * @property { string } [type] Clipboard Type
3138
- */
3139
- /**
3140
- * @PORTED
3141
- * OpenFin.WriteAnyClipboardRequest interface
3142
- * @typedef { object } OpenFin.WriteAnyClipboardRequest@typedef { object } OpenFin.WriteAnyClipboardRequest
3143
- * @property { string } data Data to be written
3144
- * @property { OpenFin.ClipboardSelectionType } [type] Clipboard Type defaults to 'clipboard', use 'selection' for linux
3145
- */
3146
3063
  /**
3147
3064
  * The Clipboard API allows reading and writing to the clipboard in multiple formats.
3148
3065
  *
@@ -3310,11 +3227,19 @@ declare type ClipboardSelectionType = 'clipboard' | 'selection';
3310
3227
  * Generated when an application is closed.
3311
3228
  * @interface
3312
3229
  */
3313
- declare type ClosedEvent = IdentityEvent & {
3230
+ declare type ClosedEvent = BaseEvents.IdentityEvent & {
3314
3231
  topic: 'application';
3315
3232
  type: 'closed';
3316
3233
  };
3317
3234
 
3235
+ /**
3236
+ * Generated when a window has closed.
3237
+ * @interface
3238
+ */
3239
+ declare type ClosedEvent_2 = BaseEvent_5 & {
3240
+ type: 'closed';
3241
+ };
3242
+
3318
3243
  /**
3319
3244
  * @interface
3320
3245
  */
@@ -3322,6 +3247,15 @@ declare type ClosedMenuResult = {
3322
3247
  result: 'closed';
3323
3248
  };
3324
3249
 
3250
+ /**
3251
+ * Generated when a window has been prevented from closing.
3252
+ * @remarks A window will be prevented from closing by default, either through the API or by a user when ‘close-requested’ has been subscribed to and the Window.close(force) flag is false.
3253
+ * @interface
3254
+ */
3255
+ declare type CloseRequestedEvent = BaseEvent_5 & {
3256
+ type: 'close-requested';
3257
+ };
3258
+
3325
3259
  /**
3326
3260
  * @interface
3327
3261
  */
@@ -3368,62 +3302,19 @@ declare interface CloseWindowPayload {
3368
3302
  };
3369
3303
  }
3370
3304
 
3305
+ /**
3306
+ * Generated when a window has initiated the closing routine.
3307
+ * @interface
3308
+ */
3309
+ declare type ClosingEvent = BaseEvent_5 & {
3310
+ type: 'closing';
3311
+ };
3312
+
3371
3313
  /**
3372
3314
  * A ColumnOrRow is used to manage the state of Column and Rows within an OpenFin Layout.
3373
3315
  */
3374
3316
  declare class ColumnOrRow extends LayoutNode {
3375
3317
  #private;
3376
- /**
3377
- * Determines if this {@link ColumnOrRow} is the top level content item in the current layout.
3378
- * @function isRoot
3379
- * @memberof ColumnOrRow
3380
- * @instance
3381
- * @tutorial ColumnOrRow.isRoot
3382
- * @returns Resolves true if this TabStack is the top level content item, or false if it is not.
3383
- */
3384
- /**
3385
- * Determines if this {@link ColumnOrRow} exists.
3386
- * @function exists
3387
- * @instance
3388
- * @memberof ColumnOrRow
3389
- * @tutorial ColumnOrRow.exists
3390
- * @returns Resolves true if the TabStack exists, or false if it has been destroyed.
3391
- */
3392
- /**
3393
- * Retrieves the parent {@link ColumnOrRow} of this {@link ColumnOrRow}, if one exists.
3394
- * @function getParent
3395
- * @instance
3396
- * @memberof ColumnOrRow
3397
- * @tutorial ColumnOrRow.getParent
3398
- * @returns Promise resolving with the {@link ColumnOrRow} that contains this item, or undefined if
3399
- * this {@link ColumnOrRow}does not exist or is the root content item.
3400
- */
3401
- /**
3402
- * Returns all the adjacent stacks that share an edge with the given {@link ColumnOrRow}.
3403
- * @function getAdjacentStacks
3404
- * @instance
3405
- * @memberof ColumnOrRow
3406
- * @param {LayoutPosition} edge - Edge to check for any adjacent stacks.
3407
- *
3408
- * @tutorial ColumnOrRow.getAdjacentStacks
3409
- */
3410
- /**
3411
- * Given a list of view creation options or references and a layout position, creates a {@link TabStack} adjacent to the given {@link ColumnOrRow}
3412
- *
3413
- * Known Issue: If the number of views to add overflows the tab-container, the added views will be set as active
3414
- * during each render, and then placed at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
3415
- * This means the views you pass to createAdjacentStack() may not render in the order given by the array.
3416
- * Until fixed, this problem can be avoided only if your window is wide enough to fit creating all the views in the tabstack.
3417
- *
3418
- * @function createAdjacentStack
3419
- * @instance
3420
- * @memberof ColumnOrRow
3421
- * @param views - List of identities or view creation options of the views to include in the stack
3422
- * @param options - Creation options.
3423
- * @returns The created TabStack
3424
- * @tutorial ColumnOrRow.createAdjacentStack
3425
- * @experimental
3426
- */
3427
3318
  /**
3428
3319
  * @internal
3429
3320
  */
@@ -3501,6 +3392,39 @@ declare type ConfigWithUuid = BaseConfig & {
3501
3392
  uuid: string;
3502
3393
  };
3503
3394
 
3395
+ /**
3396
+ * Generated when a Channel client is connected.
3397
+ * @interface
3398
+ */
3399
+ declare type ConnectedEvent = BaseEvent_2 & {
3400
+ type: 'connected';
3401
+ };
3402
+
3403
+ /**
3404
+ * Generated when an application has authenticated and is connected.
3405
+ * @interface
3406
+ */
3407
+ declare type ConnectedEvent_2 = BaseEvents.IdentityEvent & {
3408
+ topic: 'application';
3409
+ type: 'connected';
3410
+ };
3411
+
3412
+ /**
3413
+ * Generated when an external application has authenticated and is connected.
3414
+ * @interface
3415
+ */
3416
+ declare type ConnectedEvent_3 = BaseExternalApplicationEvent & {
3417
+ type: 'connected';
3418
+ };
3419
+
3420
+ /**
3421
+ * Generated when a frame is connected.
3422
+ * @interface
3423
+ */
3424
+ declare type ConnectedEvent_4 = BaseFrameEvent & {
3425
+ type: 'connected';
3426
+ };
3427
+
3504
3428
  declare type Constructor<T = {}> = new () => T;
3505
3429
 
3506
3430
  declare type ConstructorOverride<T> = (Base: Constructor<T>) => Constructor<T>;
@@ -3511,6 +3435,10 @@ declare type ConstructorOverride<T> = (Base: Constructor<T>) => Constructor<T>;
3511
3435
  * @interface
3512
3436
  */
3513
3437
  declare type ConstViewOptions = {
3438
+ /**
3439
+ * Configurations for API injection.
3440
+ */
3441
+ api: Api;
3514
3442
  /**
3515
3443
  * The name of the view.
3516
3444
  */
@@ -3659,7 +3587,7 @@ declare type ConstWindowOptions = {
3659
3587
  /**
3660
3588
  * @defaultValue true
3661
3589
  *
3662
- * Toggling off would keep the Window alive even if all its Views were closed.
3590
+ * Setting this to false would keep the Window alive even if all its Views were closed.
3663
3591
  * This is meant for advanced users and should be used with caution.
3664
3592
  * Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
3665
3593
  * Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
@@ -3669,7 +3597,8 @@ declare type ConstWindowOptions = {
3669
3597
  /**
3670
3598
  * @defaultValue 'all'
3671
3599
  *
3672
- * Determines which views prevent close if `closeOnLastViewRemoved` is set to true. Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3600
+ * When `closeOnLastViewRemoved` is set to true, determines which views prevent closing the window.
3601
+ + * Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3673
3602
  * **NOTE:** - This option is ignored in non-Platforms apps.
3674
3603
  */
3675
3604
  viewsPreventingClose: 'all' | 'layout';
@@ -4242,7 +4171,7 @@ declare type Context_3 = {
4242
4171
  * Generated when a window's context is updated via {@link Platform#setWindowContext Platform.setWindowContext}. Only available on windows in a Platform.
4243
4172
  * @interface
4244
4173
  */
4245
- declare type ContextChangedEvent = BaseWindowEvent & {
4174
+ declare type ContextChangedEvent = BaseEvent_5 & {
4246
4175
  type: 'context-changed';
4247
4176
  context: any;
4248
4177
  };
@@ -4394,7 +4323,7 @@ declare type CpuInfo = {
4394
4323
  * Generated when an application has crashed.
4395
4324
  * @interface
4396
4325
  */
4397
- declare type CrashedEvent = IdentityEvent & {
4326
+ declare type CrashedEvent = BaseEvents.IdentityEvent & {
4398
4327
  topic: 'application';
4399
4328
  type: 'crashed';
4400
4329
  reason: 'normal-termination' | 'abnormal-termination' | 'killed' | 'crashed' | 'still-running' | 'launch-failed' | 'out-of-memory' | 'integrity-failure';
@@ -4445,7 +4374,7 @@ declare type CrashReporterState = CrashReporterOptions & {
4445
4374
  * Generated when a View is created.
4446
4375
  * @interface
4447
4376
  */
4448
- declare type CreatedEvent = BaseViewEvent & {
4377
+ declare type CreatedEvent = BaseEvent_4 & {
4449
4378
  type: 'created';
4450
4379
  };
4451
4380
 
@@ -4476,7 +4405,7 @@ declare type CreateViewPayload = {
4476
4405
  /**
4477
4406
  * @interface
4478
4407
  */
4479
- declare type CreateViewTarget = LayoutIdentity & {
4408
+ declare type CreateViewTarget = (Identity_5 | LayoutIdentity) & {
4480
4409
  /**
4481
4410
  * If specified, view creation will not attach to a window and caller must
4482
4411
  * insert the view into the layout explicitly
@@ -4604,7 +4533,7 @@ declare interface DesktopAgent_2 {
4604
4533
  * Generated when the desktop icon is clicked while it's already running.
4605
4534
  * @interface
4606
4535
  */
4607
- declare type DesktopIconClickedEvent = BaseSystemEvent & {
4536
+ declare type DesktopIconClickedEvent = BaseEvent_8 & {
4608
4537
  type: 'desktop-icon-clicked';
4609
4538
  };
4610
4539
 
@@ -4612,10 +4541,18 @@ declare type DesktopIconClickedEvent = BaseSystemEvent & {
4612
4541
  * Generated when a View is destroyed.
4613
4542
  * @interface
4614
4543
  */
4615
- declare type DestroyedEvent = BaseViewEvent & {
4544
+ declare type DestroyedEvent = BaseEvent_4 & {
4616
4545
  type: 'destroyed';
4617
4546
  };
4618
4547
 
4548
+ /**
4549
+ * @interface
4550
+ */
4551
+ declare type DeviceInfo = {
4552
+ vendorId: string | number;
4553
+ productId: string | number;
4554
+ };
4555
+
4619
4556
  /**
4620
4557
  * Generated when a page's theme color changes. This is usually due to encountering a meta tag.
4621
4558
  * @interface
@@ -4713,19 +4650,43 @@ declare type DisabledMovementBoundsChangingEvent = BoundsChangeEvent & {
4713
4650
  };
4714
4651
 
4715
4652
  /**
4716
- * A system channel will be global enough to have a presence across many apps. This gives us some hints
4717
- * to render them in a standard way. It is assumed it may have other properties too, but if it has these,
4718
- * this is their meaning.
4653
+ * Generated when a Channel client has disconnected.
4654
+ * @interface
4719
4655
  */
4720
- declare interface DisplayMetadata {
4721
- /**
4722
- * A user-readable name for this channel, e.g: `"Red"`
4723
- */
4724
- readonly name?: string;
4725
- /**
4726
- * The color that should be associated within this channel when displaying this channel in a UI, e.g: `0xFF0000`.
4727
- */
4728
- readonly color?: string;
4656
+ declare type DisconnectedEvent = BaseEvent_2 & {
4657
+ type: 'disconnected';
4658
+ };
4659
+
4660
+ /**
4661
+ * Generated when an external application has disconnected.
4662
+ * @interface
4663
+ */
4664
+ declare type DisconnectedEvent_2 = BaseExternalApplicationEvent & {
4665
+ type: 'disconnected';
4666
+ };
4667
+
4668
+ /**
4669
+ * Generated when a frame has disconnected.
4670
+ * @interface
4671
+ */
4672
+ declare type DisconnectedEvent_3 = BaseFrameEvent & {
4673
+ type: 'disconnected';
4674
+ };
4675
+
4676
+ /**
4677
+ * A system channel will be global enough to have a presence across many apps. This gives us some hints
4678
+ * to render them in a standard way. It is assumed it may have other properties too, but if it has these,
4679
+ * this is their meaning.
4680
+ */
4681
+ declare interface DisplayMetadata {
4682
+ /**
4683
+ * A user-readable name for this channel, e.g: `"Red"`
4684
+ */
4685
+ readonly name?: string;
4686
+ /**
4687
+ * The color that should be associated within this channel when displaying this channel in a UI, e.g: `0xFF0000`.
4688
+ */
4689
+ readonly color?: string;
4729
4690
  /**
4730
4691
  * A URL of an image that can be used to display this channel
4731
4692
  */
@@ -4833,7 +4794,7 @@ declare type DownloadShelfOptions = {
4833
4794
  */
4834
4795
  size?: number;
4835
4796
  /**
4836
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4797
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4837
4798
  * if absent.
4838
4799
  */
4839
4800
  color?: string;
@@ -4845,7 +4806,7 @@ declare type DownloadShelfOptions = {
4845
4806
  *
4846
4807
  * @interface
4847
4808
  */
4848
- declare type DownloadShelfVisibilityChangedEvent = BaseWindowEvent & {
4809
+ declare type DownloadShelfVisibilityChangedEvent = BaseEvent_5 & {
4849
4810
  type: 'download-shelf-visibility-changed';
4850
4811
  /**
4851
4812
  * True if the download shelf was just opened; false if it was just closed.
@@ -4875,7 +4836,7 @@ declare interface DragSource {}
4875
4836
  * Generated when a window has been embedded.
4876
4837
  * @interface
4877
4838
  */
4878
- declare type EmbeddedEvent = BaseWindowEvent & {
4839
+ declare type EmbeddedEvent = BaseEvent_5 & {
4879
4840
  type: 'embedded';
4880
4841
  };
4881
4842
 
@@ -4979,7 +4940,7 @@ declare class EmitterMap {
4979
4940
  * Generated when a window ends loading.
4980
4941
  * @interface
4981
4942
  */
4982
- declare type EndLoadEvent = BaseWindowEvent & {
4943
+ declare type EndLoadEvent = BaseEvent_5 & {
4983
4944
  type: 'end-load';
4984
4945
  documentName: string;
4985
4946
  isMain: boolean;
@@ -5057,9 +5018,10 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
5057
5018
  } : never;
5058
5019
 
5059
5020
  declare interface Environment {
5060
- initLayout(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
5021
+ initLayoutManager(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
5061
5022
  createLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, options: OpenFin_2.CreateLayoutOptions): Promise<void>;
5062
5023
  destroyLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<void>;
5024
+ resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
5063
5025
  initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
5064
5026
  observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
5065
5027
  writeToken(path: string, token: string): Promise<string>;
@@ -5096,6 +5058,88 @@ declare type ErrorPlainObject = {
5096
5058
  toString(): string;
5097
5059
  };
5098
5060
 
5061
+ /**
5062
+ * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Platform}. Events are
5063
+ * discriminated by {@link Event.type | their type}. Event payloads unique to `Platform` can be found
5064
+ * under the {@link OpenFin.PlatformEvents} namespace.
5065
+ */
5066
+ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotAppliedEvent;
5067
+
5068
+ /**
5069
+ * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link System}. Events are
5070
+ * discriminated by {@link SystemEvent.type | their type}. Event payloads unique to `System` can be found
5071
+ * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
5072
+ * from which they propagate).
5073
+ */
5074
+ declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent;
5075
+
5076
+ /**
5077
+ * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Channel}. Events are
5078
+ * discriminated by {@link Event.type | their type}. Event payloads unique to `Channel` can be found
5079
+ * under the {@link OpenFin.ChannelEvents} namespace.
5080
+ */
5081
+ declare type Event_2 = {
5082
+ topic: 'channel';
5083
+ } & (ConnectedEvent | DisconnectedEvent);
5084
+
5085
+ /**
5086
+ * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by an {@link Application}. Events are
5087
+ * discriminated by {@link Event.type | their type}. Event payloads unique to `Application` can be found
5088
+ * under the {@link OpenFin.ApplicationEvents} namespace (payloads inherited from propagated events are defined in the namespace
5089
+ * from which they propagate).
5090
+ */
5091
+ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.PropagatedEvent<'application'> | ApplicationWindowEvent | ApplicationSourcedEvent;
5092
+
5093
+ /**
5094
+ * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link View}. Events are
5095
+ * discriminated by {@link Event.type | their type}. Event payloads unique to `View` can be found
5096
+ * under the {@link OpenFin.ViewEvents} namespace (except for {@link OpenFin.WebContentsEvents | those shared with other WebContents}).
5097
+ */
5098
+ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5099
+ target: OpenFin_2.Identity;
5100
+ }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent;
5101
+
5102
+ /**
5103
+ * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
5104
+ * (i.e. {@link OpenFin.Window} or {@link OpenFin.View}).
5105
+ */
5106
+ declare type Event_5<Topic extends string> = {
5107
+ topic: Topic;
5108
+ } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent);
5109
+
5110
+ /**
5111
+ * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Window}. Events are
5112
+ * discriminated by {@link Event.type | their type}. Event payloads unique to `Window` can be found
5113
+ * under the {@link OpenFin.WindowEvents} namespace (except for {@link OpenFin.WebContentsEvents | those shared with other WebContents}).
5114
+ */
5115
+ declare type Event_6 = WindowSourcedEvent | WindowViewEvent | ViewEvents.PropagatedEvent<'window'>;
5116
+
5117
+ /**
5118
+ * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by an {@link ExternalApplication}. Events are
5119
+ * discriminated by {@link ExternalApplicationEvent.type | their type}. Event payloads unique to `ExternalApplication` can be found
5120
+ * under the {@link OpenFin.ExternalApplicationEvents} namespace.
5121
+ */
5122
+ declare type Event_7 = ConnectedEvent_3 | DisconnectedEvent_2;
5123
+
5124
+ /**
5125
+ * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link _Frame}. Events are
5126
+ * discriminated by {@link _Frame.type | their type}. Event payloads unique to `Frame` can be found
5127
+ * under the {@link OpenFin.FrameEvents} namespace.
5128
+ */
5129
+ declare type Event_8 = {
5130
+ topic: 'frame';
5131
+ } & (ConnectedEvent_4 | DisconnectedEvent_3);
5132
+
5133
+ /**
5134
+ * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by {@link GlobalHotkey}. Events are
5135
+ * discriminated by {@link Event.type | their type}. Event payloads unique to `GlobalHotkey` can be found
5136
+ * under the {@link OpenFin.GlobalHotkeyEvents} namespace.
5137
+ */
5138
+ declare type Event_9 = {
5139
+ topic: 'global-hotkey';
5140
+ hotkey: 'string';
5141
+ } & (RegisteredEvent | UnregisteredEvent);
5142
+
5099
5143
  declare class EventAggregator extends EmitterMap {
5100
5144
  dispatchEvent: (message: Message<any>) => boolean;
5101
5145
  }
@@ -5161,6 +5205,46 @@ declare namespace Events {
5161
5205
  }
5162
5206
  }
5163
5207
 
5208
+ /**
5209
+ * Union of possible `type` values for a view {@link Event}.
5210
+ */
5211
+ declare type EventType = Event_4['type'];
5212
+
5213
+ /**
5214
+ * Union of possible `type` values for a Window {@link Event}.
5215
+ */
5216
+ declare type EventType_2 = Event_6['type'];
5217
+
5218
+ /**
5219
+ * Union of possible `type` values for an Application {@link Event}.
5220
+ */
5221
+ declare type EventType_3 = Event_3['type'];
5222
+
5223
+ /**
5224
+ * Union of possible `type` values for an ExternalApplication {@link Event}.
5225
+ */
5226
+ declare type EventType_4 = Event_7['type'];
5227
+
5228
+ /**
5229
+ * Union of possible `type` values for a {@link FrameEvent}.
5230
+ */
5231
+ declare type EventType_5 = Event_8['type'];
5232
+
5233
+ /**
5234
+ * Union of possible `type` values for a {@link GlobalHotkeyEvent}
5235
+ */
5236
+ declare type EventType_6 = Event_9['type'];
5237
+
5238
+ /**
5239
+ * Union of possible `type` values for a {@link PlatformEvent}.
5240
+ */
5241
+ declare type EventType_7 = Event_10['type'];
5242
+
5243
+ /**
5244
+ * Union of possible `type` values for a {@link SystemEvent}.
5245
+ */
5246
+ declare type EventType_8 = Event_11['type'];
5247
+
5164
5248
  /**
5165
5249
  * @internal
5166
5250
  */
@@ -5174,6 +5258,8 @@ declare type EventWithId<Event extends AppVersionEvent> = Event extends infer E
5174
5258
 
5175
5259
  /**
5176
5260
  * @internal
5261
+ *
5262
+ * Ensures that an event payload type does not include any `-requested` events. Distributes over unions.
5177
5263
  */
5178
5264
  declare type ExcludeRequested<Event extends {
5179
5265
  type: string;
@@ -5210,83 +5296,6 @@ declare class ExternalApplication extends EmitterBase<OpenFin_2.ExternalApplicat
5210
5296
  * @internal
5211
5297
  */
5212
5298
  constructor(wire: Transport, identity: OpenFin_2.ApplicationIdentity);
5213
- /**
5214
- * Adds a listener to the end of the listeners array for the specified event.
5215
- * @param eventType - The type of the event.
5216
- * @param listener - Called whenever an event of the specified type occurs.
5217
- * @param options - Option to support event timestamps.
5218
- *
5219
- * @function addListener
5220
- * @memberof ExternalApplication
5221
- * @instance
5222
- * @tutorial ExternalApplication.EventEmitter
5223
- */
5224
- /**
5225
- * Adds a listener to the end of the listeners array for the specified event.
5226
- * @param eventType - The type of the event.
5227
- * @param listener - Called whenever an event of the specified type occurs.
5228
- * @param options - Option to support event timestamps.
5229
- *
5230
- * @function on
5231
- * @memberof ExternalApplication
5232
- * @instance
5233
- * @tutorial ExternalApplication.EventEmitter
5234
- */
5235
- /**
5236
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
5237
- * @param eventType - The type of the event.
5238
- * @param listener - The callback function.
5239
- * @param options - Option to support event timestamps.
5240
- *
5241
- * @function once
5242
- * @memberof ExternalApplication
5243
- * @instance
5244
- * @tutorial ExternalApplication.EventEmitter
5245
- */
5246
- /**
5247
- * Adds a listener to the beginning of the listeners array for the specified event.
5248
- * @param eventType - The type of the event.
5249
- * @param listener - The callback function.
5250
- * @param options - Option to support event timestamps.
5251
- *
5252
- * @function prependListener
5253
- * @memberof ExternalApplication
5254
- * @instance
5255
- * @tutorial ExternalApplication.EventEmitter
5256
- */
5257
- /**
5258
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
5259
- * The listener is added to the beginning of the listeners array.
5260
- * @param eventType - The type of the event.
5261
- * @param listener - The callback function.
5262
- * @param options - Option to support event timestamps.
5263
- *
5264
- * @function prependOnceListener
5265
- * @memberof ExternalApplication
5266
- * @instance
5267
- * @tutorial ExternalApplication.EventEmitter
5268
- */
5269
- /**
5270
- * Remove a listener from the listener array for the specified event.
5271
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
5272
- * @param eventType - The type of the event.
5273
- * @param listener - The callback function.
5274
- * @param options - Option to support event timestamps.
5275
- *
5276
- * @function removeListener
5277
- * @memberof ExternalApplication
5278
- * @instance
5279
- * @tutorial ExternalApplication.EventEmitter
5280
- */
5281
- /**
5282
- * Removes all listeners, or those of the specified event.
5283
- * @param eventType - The type of the event.
5284
- *
5285
- * @function removeAllListeners
5286
- * @memberof ExternalApplication
5287
- * @instance
5288
- * @tutorial ExternalApplication.EventEmitter
5289
- */
5290
5299
  /**
5291
5300
  * Retrieves information about the external application.
5292
5301
  *
@@ -5303,46 +5312,43 @@ declare class ExternalApplication extends EmitterBase<OpenFin_2.ExternalApplicat
5303
5312
  }
5304
5313
 
5305
5314
  /**
5306
- * Generated when an external application has authenticated and is connected.
5307
- * @interface
5315
+ * @deprecated Renamed to {@link ConnectedEvent}.
5308
5316
  */
5309
- declare type ExternalApplicationConnectedEvent = BaseExternalApplicationEvent & {
5310
- type: 'connected';
5311
- };
5317
+ declare type ExternalApplicationConnectedEvent = ConnectedEvent_3;
5312
5318
 
5313
5319
  /**
5314
- * Generated when an external application has disconnected.
5315
- * @interface
5320
+ * @deprecated Renamed to {@link DisconnectedEvent}.
5316
5321
  */
5317
- declare type ExternalApplicationDisconnectedEvent = BaseExternalApplicationEvent & {
5318
- type: 'disconnected';
5319
- };
5322
+ declare type ExternalApplicationDisconnectedEvent = DisconnectedEvent_2;
5320
5323
 
5321
5324
  /**
5322
- * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by an {@link ExternalApplication}. Events are
5323
- * discriminated by {@link ExternalApplicationEvent.type | their type}. Event payloads unique to `ExternalApplication` can be found
5324
- * under the {@link OpenFin.ExternalApplicationEvents} namespace.
5325
+ * @deprecated Renamed to {@link Event}.
5325
5326
  */
5326
- declare type ExternalApplicationEvent = ExternalApplicationConnectedEvent | ExternalApplicationDisconnectedEvent;
5327
+ declare type ExternalApplicationEvent = Event_7;
5327
5328
 
5328
5329
  declare type ExternalApplicationEvent_2 = Events.ExternalApplicationEvents.ExternalApplicationEvent;
5329
5330
 
5330
5331
  declare namespace ExternalApplicationEvents {
5331
5332
  export {
5333
+ BaseEvent_6 as BaseEvent,
5332
5334
  BaseExternalApplicationEvent,
5335
+ ConnectedEvent_3 as ConnectedEvent,
5333
5336
  ExternalApplicationConnectedEvent,
5337
+ DisconnectedEvent_2 as DisconnectedEvent,
5334
5338
  ExternalApplicationDisconnectedEvent,
5339
+ Event_7 as Event,
5335
5340
  ExternalApplicationEvent,
5341
+ EventType_4 as EventType,
5336
5342
  ExternalApplicationEventType,
5337
- Payload_3 as Payload,
5338
- ByType_2 as ByType
5343
+ Payload_5 as Payload,
5344
+ ByType_4 as ByType
5339
5345
  }
5340
5346
  }
5341
5347
 
5342
5348
  /**
5343
- * Union of possible `type` values for a {@link ApplicationEvent}.
5349
+ * @deprecated Renamed to {@link Event}.
5344
5350
  */
5345
- declare type ExternalApplicationEventType = ExternalApplicationEvent['type'];
5351
+ declare type ExternalApplicationEventType = EventType_4;
5346
5352
 
5347
5353
  /**
5348
5354
  * @interface
@@ -5403,7 +5409,7 @@ declare type ExternalConnection = {
5403
5409
  * Generated when an external process has exited.
5404
5410
  * @interface
5405
5411
  */
5406
- declare type ExternalProcessExitedEvent = BaseWindowEvent & {
5412
+ declare type ExternalProcessExitedEvent = BaseEvent_5 & {
5407
5413
  type: 'external-process-exited';
5408
5414
  processUuid: string;
5409
5415
  exitCode: number;
@@ -5448,19 +5454,15 @@ declare type ExternalProcessRequestType = {
5448
5454
  * Generated when an external process has started.
5449
5455
  * @interface
5450
5456
  */
5451
- declare type ExternalProcessStartedEvent = BaseWindowEvent & {
5457
+ declare type ExternalProcessStartedEvent = BaseEvent_5 & {
5452
5458
  type: 'external-process-started';
5453
5459
  processUuid: string;
5454
5460
  };
5455
5461
 
5456
5462
  /**
5457
- * Generated when page receives favicon urls.
5458
- * @interface
5463
+ * @deprecated, use {@link PageFaviconUpdatedEvent}.
5459
5464
  */
5460
- declare type FaviconUpdatedEvent = NamedEvent & {
5461
- type: 'page-favicon-updated';
5462
- favicons: string[];
5463
- };
5465
+ declare type FaviconUpdatedEvent = PageFaviconUpdatedEvent;
5464
5466
 
5465
5467
  declare namespace FDC3 {
5466
5468
  export {
@@ -5547,7 +5549,7 @@ declare type FileDownloadEvent = {
5547
5549
  *
5548
5550
  * @interface
5549
5551
  */
5550
- declare type FileDownloadLocationChangedEvent = BaseApplicationEvent & {
5552
+ declare type FileDownloadLocationChangedEvent = BaseEvent_3 & {
5551
5553
  type: 'file-download-location-changed';
5552
5554
  };
5553
5555
 
@@ -5712,83 +5714,6 @@ declare class _Frame extends EmitterBase<OpenFin_2.FrameEvent> {
5712
5714
  * @internal
5713
5715
  */
5714
5716
  constructor(wire: Transport, identity: OpenFin_2.Identity);
5715
- /**
5716
- * Adds the listener function to the end of the listeners array for the specified event type.
5717
- * @param eventType - The type of the event.
5718
- * @param listener - Called whenever an event of the specified type occurs.
5719
- * @param options - Option to support event timestamps.
5720
- *
5721
- * @function addListener
5722
- * @memberof Frame
5723
- * @instance
5724
- * @tutorial Frame.EventEmitter
5725
- */
5726
- /**
5727
- * Adds a listener to the end of the listeners array for the specified event.
5728
- * @param eventType - The type of the event.
5729
- * @param listener - Called whenever an event of the specified type occurs.
5730
- * @param options - Option to support event timestamps.
5731
- *
5732
- * @function on
5733
- * @memberof Frame
5734
- * @instance
5735
- * @tutorial Frame.EventEmitter
5736
- */
5737
- /**
5738
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
5739
- * @param eventType - The type of the event.
5740
- * @param listener - The callback function.
5741
- * @param options - Option to support event timestamps.
5742
- *
5743
- * @function once
5744
- * @memberof Frame
5745
- * @instance
5746
- * @tutorial Frame.EventEmitter
5747
- */
5748
- /**
5749
- * Adds a listener to the beginning of the listeners array for the specified event.
5750
- * @param eventType - The type of the event.
5751
- * @param listener - The callback function.
5752
- * @param options - Option to support event timestamps.
5753
- *
5754
- * @function prependListener
5755
- * @memberof Frame
5756
- * @instance
5757
- * @tutorial Frame.EventEmitter
5758
- */
5759
- /**
5760
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
5761
- * The listener is added to the beginning of the listeners array.
5762
- * @param eventType - The type of the event.
5763
- * @param listener - The callback function.
5764
- * @param options - Option to support event timestamps.
5765
- *
5766
- * @function prependOnceListener
5767
- * @memberof Frame
5768
- * @instance
5769
- * @tutorial Frame.EventEmitter
5770
- */
5771
- /**
5772
- * Remove a listener from the listener array for the specified event.
5773
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
5774
- * @param eventType - The type of the event.
5775
- * @param listener - The callback function.
5776
- * @param options - Option to support event timestamps.
5777
- *
5778
- * @function removeListener
5779
- * @memberof Frame
5780
- * @instance
5781
- * @tutorial Frame.EventEmitter
5782
- */
5783
- /**
5784
- * Removes all listeners, or those of the specified event.
5785
- * @param eventType - The type of the event.
5786
- *
5787
- * @function removeAllListeners
5788
- * @memberof Frame
5789
- * @instance
5790
- * @tutorial Frame.EventEmitter
5791
- */
5792
5717
  /**
5793
5718
  * Returns a frame info object for the represented frame.
5794
5719
  *
@@ -5819,48 +5744,43 @@ declare class _Frame extends EmitterBase<OpenFin_2.FrameEvent> {
5819
5744
  }
5820
5745
 
5821
5746
  /**
5822
- * Generated when a frame is connected.
5823
- * @interface
5747
+ * @deprecated Renamed to {@link ConnectedEvent}.
5824
5748
  */
5825
- declare type FrameConnectedEvent = BaseFrameEvent & {
5826
- type: 'connected';
5827
- };
5749
+ declare type FrameConnectedEvent = ConnectedEvent_4;
5828
5750
 
5829
5751
  /**
5830
- * Generated when a frame has disconnected.
5831
- * @interface
5752
+ * @deprecated Renamed to {@link DisconnectedEvent}.
5832
5753
  */
5833
- declare type FrameDisconnectedEvent = BaseFrameEvent & {
5834
- type: 'disconnected';
5835
- };
5754
+ declare type FrameDisconnectedEvent = DisconnectedEvent_3;
5836
5755
 
5837
5756
  /**
5838
- * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link _Frame}. Events are
5839
- * discriminated by {@link _Frame.type | their type}. Event payloads unique to `Frame` can be found
5840
- * under the {@link OpenFin.FrameEvents} namespace.
5757
+ * @deprecated Renamed to {@link Event}.
5841
5758
  */
5842
- declare type FrameEvent = {
5843
- topic: 'frame';
5844
- } & (FrameConnectedEvent | FrameDisconnectedEvent);
5759
+ declare type FrameEvent = Event_8;
5845
5760
 
5846
5761
  declare type FrameEvent_2 = Events.FrameEvents.FrameEvent;
5847
5762
 
5848
5763
  declare namespace FrameEvents {
5849
5764
  export {
5765
+ BaseEvent_7 as BaseEvent,
5850
5766
  BaseFrameEvent,
5767
+ ConnectedEvent_4 as ConnectedEvent,
5851
5768
  FrameConnectedEvent,
5769
+ DisconnectedEvent_3 as DisconnectedEvent,
5852
5770
  FrameDisconnectedEvent,
5771
+ Event_8 as Event,
5853
5772
  FrameEvent,
5773
+ EventType_5 as EventType,
5854
5774
  FrameEventType,
5855
- Payload_4 as Payload,
5856
- ByType_3 as ByType
5775
+ Payload_6 as Payload,
5776
+ ByType_5 as ByType
5857
5777
  }
5858
5778
  }
5859
5779
 
5860
5780
  /**
5861
- * Union of possible `type` values for a {@link FrameEvent}.
5781
+ * @deprecated Renamed to {@link EventType}.
5862
5782
  */
5863
- declare type FrameEventType = FrameEvent['type'];
5783
+ declare type FrameEventType = EventType_5;
5864
5784
 
5865
5785
  /**
5866
5786
  * @interface
@@ -6082,14 +6002,9 @@ declare class GlobalHotkey extends EmitterBase<OpenFin_2.GlobalHotkeyEvent> {
6082
6002
  }
6083
6003
 
6084
6004
  /**
6085
- * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by {@link GlobalHotkey}. Events are
6086
- * discriminated by {@link GlobalHotkeyEvent.type | their type}. Event payloads unique to `GlobalHotkey` can be found
6087
- * under the {@link OpenFin.GlobalHotkeyEvents} namespace.
6005
+ * @deprecated Renamed to {@link Event}.
6088
6006
  */
6089
- declare type GlobalHotkeyEvent = {
6090
- topic: 'global-hotkey';
6091
- hotkey: 'string';
6092
- } & (RegisteredEvent | UnregisteredEvent);
6007
+ declare type GlobalHotkeyEvent = Event_9;
6093
6008
 
6094
6009
  declare type GlobalHotkeyEvent_2 = Events.GlobalHotkeyEvents.GlobalHotkeyEvent;
6095
6010
 
@@ -6097,17 +6012,19 @@ declare namespace GlobalHotkeyEvents {
6097
6012
  export {
6098
6013
  RegisteredEvent,
6099
6014
  UnregisteredEvent,
6015
+ Event_9 as Event,
6100
6016
  GlobalHotkeyEvent,
6017
+ EventType_6 as EventType,
6101
6018
  GlobalHotkeyEventType,
6102
- Payload_5 as Payload,
6103
- ByType_4 as ByType
6019
+ Payload_7 as Payload,
6020
+ ByType_6 as ByType
6104
6021
  }
6105
6022
  }
6106
6023
 
6107
6024
  /**
6108
- * Union of possible `type` values for a {@link GlobalHotkeyEvent}
6025
+ * @deprecated Renamed to {@link EventType}.
6109
6026
  */
6110
- declare type GlobalHotkeyEventType = GlobalHotkeyEvent['type'];
6027
+ declare type GlobalHotkeyEventType = EventType_6;
6111
6028
 
6112
6029
  declare namespace GoldenLayout {
6113
6030
  export {
@@ -6409,8 +6326,17 @@ declare interface Header {
6409
6326
  * Generated when a View is hidden.
6410
6327
  * @interface
6411
6328
  */
6412
- declare type HiddenEvent = BaseViewEvent & {
6329
+ declare type HiddenEvent = BaseEvent_4 & {
6330
+ type: 'hidden';
6331
+ };
6332
+
6333
+ /**
6334
+ * Generated when a window has been hidden.
6335
+ * @interface
6336
+ */
6337
+ declare type HiddenEvent_2 = BaseEvent_5 & {
6413
6338
  type: 'hidden';
6339
+ reason: 'closing' | 'hide' | 'hide-on-close';
6414
6340
  };
6415
6341
 
6416
6342
  /**
@@ -6418,7 +6344,7 @@ declare type HiddenEvent = BaseViewEvent & {
6418
6344
  * or because the View has moved to a new window. Only available on Views in a Platform.
6419
6345
  * @interface
6420
6346
  */
6421
- declare type HostContextChangedEvent = BaseViewEvent & {
6347
+ declare type HostContextChangedEvent = BaseEvent_4 & {
6422
6348
  type: 'host-context-changed';
6423
6349
  context: any;
6424
6350
  reason: 'reparented' | 'updated';
@@ -6497,7 +6423,16 @@ declare type Hotkey = {
6497
6423
  * @remarks For reference on keyboard event properties see [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent).
6498
6424
  * @interface
6499
6425
  */
6500
- declare type HotkeyEvent = BaseViewEvent & {
6426
+ declare type HotkeyEvent = BaseEvent_4 & {
6427
+ type: 'hotkey';
6428
+ };
6429
+
6430
+ /**
6431
+ * Generated when a keyboard shortcut defined in the `hotkeys` array in [Window options](OpenFin.WindowOptions.html) is pressed inside the window.
6432
+ * @remarks For reference on keyboard event properties see [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent).
6433
+ * @interface
6434
+ */
6435
+ declare type HotkeyEvent_2 = InputEvent_2 & BaseEvent_5 & {
6501
6436
  type: 'hotkey';
6502
6437
  };
6503
6438
 
@@ -6553,6 +6488,11 @@ declare type IdentityEvent = BaseEvent & {
6553
6488
  */
6554
6489
  declare type IdEventType = WithId<AppVersionEventType>;
6555
6490
 
6491
+ /**
6492
+ * @deprecated Renamed to {@link IdleStateChangedEvent}.
6493
+ */
6494
+ declare type IdleEvent = IdleStateChangedEvent;
6495
+
6556
6496
  /**
6557
6497
  * Generated when a user enters or returns from idle state.
6558
6498
  * @remarks This method is continuously generated every minute while the user is in idle.
@@ -6560,7 +6500,7 @@ declare type IdEventType = WithId<AppVersionEventType>;
6560
6500
  * A user returns from idle state when the computer is unlocked or keyboard/mouse activity has resumed.
6561
6501
  * @interface
6562
6502
  */
6563
- declare type IdleEvent = BaseSystemEvent & {
6503
+ declare type IdleStateChangedEvent = BaseEvent_8 & {
6564
6504
  type: 'idle-state-changed';
6565
6505
  elapsedTime: number;
6566
6506
  isIdle: boolean;
@@ -6645,11 +6585,19 @@ declare type InfoForIntentOptions<MetadataType = IntentMetadata_3> = {
6645
6585
  * Generated when an application has initialized.
6646
6586
  * @interface
6647
6587
  */
6648
- declare type InitializedEvent = IdentityEvent & {
6588
+ declare type InitializedEvent = BaseEvents.IdentityEvent & {
6649
6589
  topic: 'application';
6650
6590
  type: 'initialized';
6651
6591
  };
6652
6592
 
6593
+ /**
6594
+ * Generated when a window is initialized.
6595
+ * @interface
6596
+ */
6597
+ declare type InitializedEvent_2 = BaseEvent_5 & {
6598
+ type: 'initialized';
6599
+ };
6600
+
6653
6601
  /**
6654
6602
  * @interface
6655
6603
  */
@@ -7050,64 +6998,14 @@ declare class InteropBroker extends Base {
7050
6998
  new (): InteropBroker;
7051
6999
  };
7052
7000
  /**
7053
- * @REMOVED
7054
- * SetContextOptions interface
7055
- * @typedef { object } SetContextOptions@typedef { object } SetContextOptions
7056
- * @property { Context } {context} - New context to set.
7057
- */
7058
- /**
7059
- * @REMOVED
7060
- * GetContextOptions interface
7061
- * @typedef { object } GetContextOptions@typedef { object } GetContextOptions
7062
- * @property { string } [contextType] - Context Type
7063
- */
7064
- /**
7065
- * @REMOVED
7066
- * JoinContextGroupOptions interface
7067
- * @typedef { object } JoinContextGroupOptions@typedef { object } JoinContextGroupOptions
7068
- * @property { string } contextGroupId - Id of the context group.
7069
- * @property { Identity | ClientIdentity } [target] - Identity of the entity you wish to join to a context group.
7001
+ * Sets a context for the context group of the incoming current entity.
7002
+ * @param setContextOptions - New context to set.
7003
+ * @param clientIdentity - Identity of the client sender.
7004
+ *
7070
7005
  */
7071
- /**
7072
- * @REMOVED
7073
- * AddClientToContextGroupOptions interface
7074
- * @typedef { object } AddClientToContextGroupOptions@typedef { object } AddClientToContextGroupOptions
7075
- * @property { string } contextGroupId - Name of the context group.
7076
- */
7077
- /**
7078
- * @REMOVED
7079
- * RemoveFromContextGroupOptions interface
7080
- * @typedef { object } RemoveFromContextGroupOptions@typedef { object } RemoveFromContextGroupOptions
7081
- * @property { Identity | ClientIdentity } target - Identity of the entity you wish to join to a context group.
7082
- */
7083
- /**
7084
- * @REMOVED
7085
- * GetInfoForContextGroupOptions interface
7086
- * @typedef { object } GetInfoForContextGroupOptions@typedef { object } GetInfoForContextGroupOptions
7087
- * @property { string } contextGroupId - Name of the context group to get info for.
7088
- */
7089
- /**
7090
- * @REMOVED
7091
- * GetAllClientsInContextGroupOptions interface
7092
- * @typedef { object } GetAllClientsInContextGroupOptions@typedef { object } GetAllClientsInContextGroupOptions
7093
- * @property { string } contextGroupId - Name of the context group to get info for.
7094
- */
7095
- /**
7096
- * @PORTED
7097
- * InfoForIntentOptions interface
7098
- * @typedef { object } InfoForIntentOptions@typedef { object } InfoForIntentOptions
7099
- * @property { string } name Name of the intent to get info for.
7100
- * @property { Context } [context] Optional context.
7101
- */
7102
- /**
7103
- * Sets a context for the context group of the incoming current entity.
7104
- * @param setContextOptions - New context to set.
7105
- * @param clientIdentity - Identity of the client sender.
7106
- *
7107
- */
7108
- setContext({ context }: {
7109
- context: OpenFin_2.Context;
7110
- }, clientIdentity: OpenFin_2.ClientIdentity): void;
7006
+ setContext({ context }: {
7007
+ context: OpenFin_2.Context;
7008
+ }, clientIdentity: OpenFin_2.ClientIdentity): void;
7111
7009
  /**
7112
7010
  * Get current context for a client subscribed to a Context Group.
7113
7011
  *
@@ -7342,7 +7240,7 @@ declare class InteropBroker extends Base {
7342
7240
  * // }
7343
7241
  * ```
7344
7242
  *
7345
- * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
7243
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/Metadata#intentresolution).
7346
7244
  *
7347
7245
  * @param contextForIntent Data passed between entities and applications.
7348
7246
  * @param clientIdentity Identity of the Client making the request.
@@ -7598,95 +7496,6 @@ declare type InteropBrokerOptions = {
7598
7496
  logging?: InteropLoggingOptions;
7599
7497
  };
7600
7498
 
7601
- /**
7602
- * @PORTED
7603
- * @typedef { object } Intent
7604
- * @summary The combination of an action and a context that is passed to an application for resolution.
7605
- * @property { string } name Name of the intent.
7606
- * @property { Context } context Data associated with the intent
7607
- */
7608
- /**
7609
- * @REMOVED
7610
- * @typedef { object } Subscription
7611
- * @summary Object returned when subscribing a handler.
7612
- * @property { function } unsubscribe Function to unsubscribe the handler.
7613
- */
7614
- /**
7615
- * @typedef { function } ContextHandler
7616
- * @summary Subscription function for addContextHandler.
7617
- */
7618
- /**
7619
- * @typedef { function } IntentHandler
7620
- * @summary Subscription function for registerIntentHandler
7621
- */
7622
- /**
7623
- * @PORTED
7624
- * @typedef { object } ClientIdentity
7625
- * @summary The Identity for a Channel Client. Includes endpointId to differentiate between different connections for an entity.
7626
- * @property {string} uuid GUID of an application.
7627
- * @property {string} name Name of an entity in an application.
7628
- * @property {string} endpointId Unique differentiator for different Channel connections for an entity.
7629
- */
7630
- /**
7631
- * @PORTED
7632
- * @typedef { object } ContextGroupInfo
7633
- * @summary Information for a Context Group. Contains metadata for displaying the group properly.
7634
- * @property {string} id Name of the context group
7635
- * @property {DisplayMetadata} displayMetadata Metadata for the Context Group. Contains the group's human-readable name, color, and an image, as defined by the Interop Broker.
7636
- */
7637
- /**
7638
- * @PORTED
7639
- * @typedef { object } DisplayMetadata
7640
- * @summary The display data for a Context Group.
7641
- * @property {string} name A user-readable name for this context group, e.g: `"Red"`
7642
- * @property {string} [color] The color that should be associated within this context group when displaying this context group in a UI, e.g: `0xFF0000`.
7643
- * @property {string} [glyph] A URL of an image that can be used to display this context group
7644
- */
7645
- /**
7646
- * @PORTED
7647
- * @typedef { object } Context
7648
- * @summary Data passed between entities and applications.
7649
- * @property {object} [id] An object containing string key-value pairs for the bulk of the data for the context. Differs between context types.
7650
- * @property {string} [name] User-readable name for the incoming context.
7651
- * @property {string} type Conserved type for the context (e.g. `instrument` or `country`)
7652
- */
7653
- /**
7654
- * @REMOVED
7655
- * @typedef { object } ContextForIntent
7656
- * @summary Data passed between entities and applications, including an optional metadata.
7657
- * @property {object} [id] An object containing string key-value pairs for the bulk of the data for the context. Differs between context types.
7658
- * @property {string} [name] User-readable name for the incoming context.
7659
- * @property {string} type Conserved type for the context (e.g. `instrument` or `country`)
7660
- * @property {any} [metadata]
7661
- */
7662
- /**
7663
- * @REMOVED
7664
- * @typedef { object } SessionContextGroup
7665
- * @summary An instance of a SessionContextGroup
7666
- * @property {string} id The SessionContextGroup's id.
7667
- * @property {setContext} setContext Sets a context of a certain type
7668
- * @property {getCurrentContext} getCurrentContext Gets the currently set context of a certain type
7669
- * @property {addContextHandler} addContextHandler Adds a handler for context change.
7670
- */
7671
- /**
7672
- * @typedef {function} setContext
7673
- * @summary A SessionContextGroup instance method for setting a context in the SessionContextGroup.
7674
- * @param context The Context to be set.
7675
- *
7676
- */
7677
- /**
7678
- * @typedef {function} getCurrentContext
7679
- * @summary A SessionContextGroup instance method for getting the current context of a certain type.
7680
- * @param contextType The Context Type to get. If not specified the last contextType set would get used.
7681
- *
7682
- */
7683
- /**
7684
- * @typedef {function} addContextHandler
7685
- * @summary A SessionContextGroup instance method for adding a handler for context change.
7686
- * @param contextHandler The callback to be invoked. Is invoked when (a) the context changes or (b) immediately after getting created if the context is already set.
7687
- * @param contextType The context type this handler should listen to. If not specified, a global handler for all context types will get created. Only one global handler is allowed per SessionContextGroup.
7688
- *
7689
- */
7690
7499
  /**
7691
7500
  * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7692
7501
  *
@@ -8125,13 +7934,6 @@ declare type InteropLoggingActions = 'beforeAction' | 'afterAction';
8125
7934
  */
8126
7935
  declare type InteropLoggingOptions = Record<InteropLoggingActions, InteropActionLoggingOption>;
8127
7936
 
8128
- /**
8129
- * @PORTED
8130
- * @typedef { object } InteropConfig
8131
- * @summary Information relevant to the Interop Broker.
8132
- * @property {string} [currentContextGroup] Context Group for the client. (green, yellow, red, etc.)
8133
- * @property {string} [providerId] When provided, automatically connects the client to the specified provider uuid
8134
- */
8135
7937
  /**
8136
7938
  * Manages creation of Interop Brokers and Interop Clients. These APIs are called under-the-hood in Platforms.
8137
7939
  *
@@ -8522,7 +8324,7 @@ declare class Layout extends Base {
8522
8324
  * @internal
8523
8325
  */
8524
8326
  init: (options?: OpenFin_2.InitLayoutOptions) => Promise<Layout>;
8525
- identity: OpenFin_2.LayoutIdentity;
8327
+ identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity;
8526
8328
  private platform;
8527
8329
  wire: Transport;
8528
8330
  /**
@@ -8741,45 +8543,24 @@ declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'r
8741
8543
  */
8742
8544
  declare type LayoutIdentity = Identity_5 & {
8743
8545
  /**
8744
- * The name of the layout an action should be targeted to. When not provided,
8745
- * OpenFin attempts to resolve the instance via visibility checks.
8546
+ * The name of the layout in a given window.
8746
8547
  */
8747
- layoutName?: string;
8548
+ layoutName: string;
8748
8549
  };
8749
8550
 
8750
8551
  /**
8751
- * Generated when a window and all of its layout's views have either finished or failed navigation.
8552
+ * Generated when the window is created, and all of its layout's views have either finished or failed
8553
+ * navigation, once per layout. Does not emit for any layouts added via Layout.create() call.
8752
8554
  * @interface
8753
8555
  */
8754
- declare type LayoutInitializedEvent = BaseWindowEvent & {
8556
+ declare type LayoutInitializedEvent = BaseEvent_5 & {
8755
8557
  type: 'layout-initialized';
8558
+ layoutIdentity: OpenFin_2.LayoutIdentity;
8756
8559
  ofViews: (OpenFin_2.Identity & {
8757
8560
  entityType: 'view';
8758
8561
  })[];
8759
8562
  };
8760
8563
 
8761
- /**
8762
- * @interface @experimental @internal
8763
- *
8764
- * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
8765
- *
8766
- * Responsible for handling all layout management and renderering
8767
- */
8768
- declare type LayoutInstance = {
8769
- identity: LayoutIdentity;
8770
- getFrameSnapshot: () => Promise<LayoutOptions>;
8771
- addView: (payload: AddViewOptions) => Promise<View_2>;
8772
- closeView: (viewIdentity: Identity_5) => Promise<void>;
8773
- removeView: (viewConfig: Identity_5 | ViewState) => Promise<View_2>;
8774
- replaceView: (payload: ReplaceViewOptions) => Promise<View_2>;
8775
- getViews: () => LayoutComponent[];
8776
- getCurrentViews: () => Identity_5[];
8777
- startReplaceLayout: (payload: ReplaceLayoutOptions) => Promise<void>;
8778
- applyPreset: (payload: PresetLayoutOptions_2) => void;
8779
- isVisible: () => boolean;
8780
- destroy: () => Promise<void>;
8781
- };
8782
-
8783
8564
  /**
8784
8565
  * Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
8785
8566
  * to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
@@ -8807,7 +8588,7 @@ declare type LayoutItemConfig = {
8807
8588
  *
8808
8589
  * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
8809
8590
  *
8810
- * Responsible for aggergating all layout snapshots and storing LayoutInstances
8591
+ * Responsible for aggregating all layout snapshots and storing layout instances
8811
8592
  */
8812
8593
  declare interface LayoutManager<T extends LayoutSnapshot> {
8813
8594
  /**
@@ -8831,16 +8612,6 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8831
8612
  * @throws if Object.keys(snapshot).length > 1
8832
8613
  */
8833
8614
  applyLayoutSnapshot(snapshot: T): Promise<void>;
8834
- /**
8835
- * Called at the start of layout initialization. Adds a new LayoutInstance if the snapshot
8836
- * contains a single layout.
8837
- *
8838
- * Throws if the snapshot contains more than 1 layout, it is expected that the user handles calling
8839
- * fin.Platform.Layout.create() once for each layout to properly connect it to their UI state.
8840
- *
8841
- * @param snapshot
8842
- * @throws if Object.keys(snapshot).length > 1
8843
- */
8844
8615
  /**
8845
8616
  * @experimental
8846
8617
  *
@@ -8861,31 +8632,49 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8861
8632
  /**
8862
8633
  * @experimental
8863
8634
  *
8864
- * @param layoutIdentity
8865
- * @returns
8635
+ * A hook provided to the consumer for controlling how OpenFin routes Layout API calls. Override
8636
+ * this method to control the target layout for Layout API calls.
8637
+ *
8638
+ * Example use case: You have hidden all the layouts and are showing a dialog that will
8639
+ * execute an API call (ex: Layout.replace()) - override this method and save the
8640
+ * "last visible" layout identity and return it.
8641
+ *
8642
+ * By default, OpenFin will use a series of checks to determine which Layout the API
8643
+ * call must route to in this order of precedence:
8644
+ * - try to resolve the layout from the layoutIdentity, throws if missing
8645
+ * - if there is only 1 layout, resolves that one
8646
+ * - enumerates all layouts checks visibility via element offsetTop/Left + window.innerHeight/Width
8647
+ * - returns undefined
8648
+ *
8649
+ * @param identity
8650
+ * @returns LayoutIdentity | undefined
8866
8651
  */
8867
- resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
8652
+ resolveLayoutIdentity(identity?: Identity_5 | LayoutIdentity): LayoutIdentity | undefined;
8868
8653
  /**
8869
8654
  * @experimental
8870
8655
  *
8871
- * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
8872
- * Throws if it does not exist.
8873
- * @param layoutName
8874
- * @returns
8656
+ * A hook provided to the consumer when it's time to remove a layout. Use this hook to
8657
+ * update your local state and remove the layout for the given LayoutIdentity. Note that
8658
+ * this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
8659
+ * signify to your application it's time to destroy this layout.
8660
+ *
8661
+ * Note that if the Window Option {@link WindowOptions.closeOnLastViewRemoved} is true, and the last View in this layout is closed, this hook will be called before the window closes.
8662
+ *
8663
+ * @param LayoutIdentity
8875
8664
  */
8876
- getLayoutByName(layoutName: string): LayoutInstance;
8665
+ removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
8877
8666
  /**
8878
8667
  * @experimental
8879
8668
  */
8880
- getLayouts(): Record<string, LayoutInstance>;
8669
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8881
8670
  /**
8882
8671
  * @experimental
8883
8672
  */
8884
- getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8673
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8885
8674
  /**
8886
8675
  * @experimental
8887
8676
  */
8888
- isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8677
+ size(): number;
8889
8678
  }
8890
8679
 
8891
8680
  /**
@@ -8932,7 +8721,7 @@ declare class LayoutModule extends Base {
8932
8721
  * const layoutConfig = await layout.getConfig();
8933
8722
  * ```
8934
8723
  */
8935
- wrap(identity: OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
8724
+ wrap(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
8936
8725
  /**
8937
8726
  * Synchronously returns a Layout object that represents a Window's layout.
8938
8727
  *
@@ -8952,7 +8741,7 @@ declare class LayoutModule extends Base {
8952
8741
  * const layoutConfig = await layout.getConfig();
8953
8742
  * ```
8954
8743
  */
8955
- wrapSync(identity: OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
8744
+ wrapSync(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
8956
8745
  /**
8957
8746
  * Asynchronously returns a Layout object that represents a Window's layout.
8958
8747
  *
@@ -9124,6 +8913,15 @@ declare abstract class LayoutNode {
9124
8913
  /**
9125
8914
  * Creates a new TabStack adjacent to the given TabStack or ColumnOrRow. Inputs can be new views to create, or existing views.
9126
8915
  *
8916
+ * Known Issue: If the number of views to add overflows the tab-container, the added views will be set as active
8917
+ * during each render, and then placed at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
8918
+ * This means the views you pass to createAdjacentStack() may not render in the order given by the array.
8919
+ * Until fixed, this problem can be avoided only if your window is wide enough to fit creating all the views in the tabstack.
8920
+ *
8921
+ * @param views The views that will populate the new TabStack.
8922
+ * @param options Additional options that control new TabStack creation.
8923
+ * @returns The newly-created TabStack.
8924
+ *
9127
8925
  * @example
9128
8926
  * ```js
9129
8927
  * if (!fin.me.isView) {
@@ -9158,12 +8956,15 @@ declare abstract class LayoutNode {
9158
8956
  * console.log(`A new TabStack created to the right has ${newStack.length} views in it`);
9159
8957
  *
9160
8958
  * ```
8959
+ * @experimental
9161
8960
  */
9162
8961
  createAdjacentStack: (views: OpenFin_2.PlatformViewCreationOptions[], options: {
9163
8962
  position?: OpenFin_2.LayoutPosition;
9164
8963
  }) => Promise<TabStack>;
9165
8964
  /**
9166
- * Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow
8965
+ * Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow.
8966
+ *
8967
+ * @param edge Edge whose adjacent TabStacks will be returned.
9167
8968
  *
9168
8969
  * @example
9169
8970
  * ```js
@@ -9183,6 +8984,7 @@ declare abstract class LayoutNode {
9183
8984
  * console.log(`The entity has ${rightStacks.length} stacks to the right, and ${leftStacks.length} stacks to the left`);
9184
8985
  *
9185
8986
  * ```
8987
+ * @experimental
9186
8988
  */
9187
8989
  getAdjacentStacks: (edge: OpenFin_2.LayoutPosition) => Promise<TabStack[]>;
9188
8990
  }
@@ -9206,7 +9008,7 @@ declare type LayoutOptions = {
9206
9008
  * @defaultValue false
9207
9009
  *
9208
9010
  * Limits the area to which tabs can be dragged.
9209
- * If true, stack headers are the only areas where tabs can be dropped.
9011
+ * If true, the layout container is the only area where tabs can be dropped.
9210
9012
  */
9211
9013
  constrainDragToContainer?: boolean;
9212
9014
  /**
@@ -9277,6 +9079,9 @@ declare type LayoutOptions = {
9277
9079
  };
9278
9080
  };
9279
9081
 
9082
+ /**
9083
+ * Represents the position of an item in a layout relative to another.
9084
+ */
9280
9085
  declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9281
9086
 
9282
9087
  /**
@@ -9285,11 +9090,12 @@ declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9285
9090
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9286
9091
 
9287
9092
  /**
9288
- * Generated when a window and all of its layout's views have been created and can receive API calls.
9093
+ * Generated when the layout and all of the its views have been created and can receive API calls.
9289
9094
  * @interface
9290
9095
  */
9291
- declare type LayoutReadyEvent = BaseWindowEvent & {
9096
+ declare type LayoutReadyEvent = BaseEvent_5 & {
9292
9097
  type: 'layout-ready';
9098
+ layoutIdentity: OpenFin_2.LayoutIdentity;
9293
9099
  views: (OpenFin_2.Identity & {
9294
9100
  success: boolean;
9295
9101
  })[];
@@ -9429,7 +9235,7 @@ declare type Manifest = {
9429
9235
  * Generated when the RVM notifies an application that the manifest has changed.
9430
9236
  * @interface
9431
9237
  */
9432
- declare type ManifestChangedEvent = IdentityEvent & {
9238
+ declare type ManifestChangedEvent = BaseEvents.IdentityEvent & {
9433
9239
  topic: 'application';
9434
9240
  type: 'manifest-changed';
9435
9241
  };
@@ -9482,7 +9288,7 @@ declare type MatchPattern = string;
9482
9288
  * Generated when a window is maximized.
9483
9289
  * @interface
9484
9290
  */
9485
- declare type MaximizedEvent = BaseWindowEvent & {
9291
+ declare type MaximizedEvent = BaseEvent_5 & {
9486
9292
  type: 'maximized';
9487
9293
  };
9488
9294
 
@@ -9592,7 +9398,7 @@ declare type MessagingProtocols = ProtocolOffer['type'];
9592
9398
  * Generated when a window is minimized.
9593
9399
  * @interface
9594
9400
  */
9595
- declare type MinimizedEvent = BaseWindowEvent & {
9401
+ declare type MinimizedEvent = BaseEvent_5 & {
9596
9402
  type: 'minimized';
9597
9403
  };
9598
9404
 
@@ -9636,14 +9442,9 @@ declare type MonitorDetails = {
9636
9442
  };
9637
9443
 
9638
9444
  /**
9639
- * Generated on changes of a monitor's size/location.
9640
- * @remarks A monitor's size changes when the taskbar is resized or relocated.
9641
- * The available space of a monitor defines a rectangle that is not occupied by the taskbar
9642
- * @interface
9445
+ * @deprecated Renamed to {@link MonitorInfoChangedEvent}.
9643
9446
  */
9644
- declare type MonitorEvent = BaseSystemEvent & OpenFin_2.MonitorInfo & {
9645
- type: 'monitor-info-changed';
9646
- };
9447
+ declare type MonitorEvent = MonitorInfoChangedEvent;
9647
9448
 
9648
9449
  /**
9649
9450
  * @interface
@@ -9667,6 +9468,16 @@ declare type MonitorInfo = {
9667
9468
  virtualScreen: DipRect;
9668
9469
  };
9669
9470
 
9471
+ /**
9472
+ * Generated on changes of a monitor's size/location.
9473
+ * @remarks A monitor's size changes when the taskbar is resized or relocated.
9474
+ * The available space of a monitor defines a rectangle that is not occupied by the taskbar
9475
+ * @interface
9476
+ */
9477
+ declare type MonitorInfoChangedEvent = BaseEvent_8 & OpenFin_2.MonitorInfo & {
9478
+ type: 'monitor-info-changed';
9479
+ };
9480
+
9670
9481
  /**
9671
9482
  * @interface
9672
9483
  */
@@ -9997,7 +9808,7 @@ declare type MutableWindowOptions = {
9997
9808
  * Used by Workspace to store custom data. Overwriting or modifying this field may impact the functionality of Workspace
9998
9809
  */
9999
9810
  _internalWorkspaceData: any;
10000
- workspacePlatform: WorkspacePlatformOptions;
9811
+ workspacePlatform: unknown;
10001
9812
  };
10002
9813
 
10003
9814
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -10073,14 +9884,23 @@ declare type NonPropagatedWindowEvent = never;
10073
9884
 
10074
9885
  /**
10075
9886
  * @internal
9887
+ *
9888
+ * Ensures that an event type key does not include any `close-requested` events. Distributes over unions.
9889
+ */
9890
+ declare type NotCloseRequested<EventType extends string> = Exclude<EventType, 'close-requested'>;
9891
+
9892
+ /**
9893
+ * @internal
9894
+ *
9895
+ * Ensures that an event type key doesn't include any `-requested` events. Distributes over unions.
10076
9896
  */
10077
- declare type NotRequested<EventType> = EventType extends `${infer U}-requested` ? never : EventType;
9897
+ declare type NotRequested<EventType extends String> = EventType extends `${string}-requested` ? never : EventType;
10078
9898
 
10079
9899
  /**
10080
9900
  * Generated when an application is not responding.
10081
9901
  * @interface
10082
9902
  */
10083
- declare type NotRespondingEvent = IdentityEvent & {
9903
+ declare type NotRespondingEvent = BaseEvents.IdentityEvent & {
10084
9904
  topic: 'application';
10085
9905
  type: 'not-responding';
10086
9906
  };
@@ -10231,6 +10051,7 @@ declare namespace OpenFin_2 {
10231
10051
  WebPermission,
10232
10052
  VerboseWebPermission,
10233
10053
  OpenExternalPermission,
10054
+ DeviceInfo,
10234
10055
  Permissions_2 as Permissions,
10235
10056
  PlatformWindowCreationOptions,
10236
10057
  PlatformWindowOptions,
@@ -10388,7 +10209,6 @@ declare namespace OpenFin_2 {
10388
10209
  InitLayoutOptions,
10389
10210
  LayoutManagerConstructor,
10390
10211
  LayoutManagerOverride,
10391
- LayoutInstance,
10392
10212
  LayoutManager,
10393
10213
  CreateLayoutOptions,
10394
10214
  PresetLayoutOptions_2 as PresetLayoutOptions,
@@ -10406,7 +10226,7 @@ declare namespace OpenFin_2 {
10406
10226
  AppVersionCompleteEvent,
10407
10227
  AppVersionRuntimeStatusEvent,
10408
10228
  Events,
10409
- BaseEvent_2 as BaseEvent,
10229
+ BaseEvent_9 as BaseEvent,
10410
10230
  WebContentsEvent_2 as WebContentsEvent,
10411
10231
  SystemEvent_2 as SystemEvent,
10412
10232
  ApplicationEvent_2 as ApplicationEvent,
@@ -10448,12 +10268,32 @@ export default OpenFin_2;
10448
10268
 
10449
10269
  declare type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
10450
10270
 
10271
+ /**
10272
+ * Generated after window options are changed using the window.updateOptions method.
10273
+ * @remarks Will not fire if the diff object is empty.
10274
+ * @interface
10275
+ */
10276
+ declare type OptionsChangedEvent = BaseEvent_5 & {
10277
+ type: 'options-changed';
10278
+ options: OpenFin_2.WindowOptions;
10279
+ diff: OpenFin_2.WindowOptionDiff;
10280
+ };
10281
+
10451
10282
  declare type OverlapsOnlyIfMatching<T, U> = {
10452
10283
  [K in Extract<keyof T, keyof U>]: U[K] extends T[K] ? U[K] : T[K] extends U[K] ? T[K] : never;
10453
10284
  };
10454
10285
 
10455
10286
  declare type OverrideCallback<T extends any = PlatformProvider, U extends T = T> = (arg: Constructor<T>) => U | Promise<U>;
10456
10287
 
10288
+ /**
10289
+ * Generated when page receives favicon urls.
10290
+ * @interface
10291
+ */
10292
+ declare type PageFaviconUpdatedEvent = NamedEvent & {
10293
+ type: 'page-favicon-updated';
10294
+ favicons: string[];
10295
+ };
10296
+
10457
10297
  /**
10458
10298
  * Generated when page title is set during navigation.
10459
10299
  * @remarks explicitSet is false when title is synthesized from file url.
@@ -10472,74 +10312,74 @@ declare type Payload<Success extends boolean = boolean, Data = any> = {
10472
10312
  };
10473
10313
 
10474
10314
  /**
10475
- * Extracts a single event type matching the given key from the {@link ApplicationEvent} union.
10315
+ * Extracts a single event type matching the given key from the View {@link Event} union.
10476
10316
  *
10477
10317
  * @typeParam Type String key specifying the event to extract
10478
10318
  */
10479
- declare type Payload_2<Type extends ApplicationEventType> = Extract<ApplicationEvent, {
10319
+ declare type Payload_2<Type extends EventType> = Extract<Event_4, {
10480
10320
  type: Type;
10481
10321
  }>;
10482
10322
 
10483
10323
  /**
10484
- * Extracts a single event type matching the given key from the {@link ExternalApplicationEvent} union.
10324
+ * Extracts a single event type matching the given key from the Window {@link Event} union.
10485
10325
  *
10486
10326
  * @typeParam Type String key specifying the event to extract
10487
10327
  */
10488
- declare type Payload_3<Type extends ExternalApplicationEventType> = Extract<ExternalApplicationEvent, {
10328
+ declare type Payload_3<Type extends EventType_2> = Extract<Event_6, {
10489
10329
  type: Type;
10490
10330
  }>;
10491
10331
 
10492
10332
  /**
10493
- * Extracts a single event type matching the given key from the {@link FrameEvent} union.
10333
+ * Extracts a single event type matching the given key from the Application {@link Event} union.
10494
10334
  *
10495
10335
  * @typeParam Type String key specifying the event to extract
10496
10336
  */
10497
- declare type Payload_4<Type extends FrameEventType> = Extract<FrameEvent, {
10337
+ declare type Payload_4<Type extends EventType_3> = Extract<Event_3, {
10498
10338
  type: Type;
10499
10339
  }>;
10500
10340
 
10501
10341
  /**
10502
- * Extracts a single event type matching the given key from the {@link GlobalHotkeyEvent} union.
10342
+ * Extracts a single event type matching the given key from the ExternalApplication {@link Event} union.
10503
10343
  *
10504
10344
  * @typeParam Type String key specifying the event to extract
10505
10345
  */
10506
- declare type Payload_5<Type extends GlobalHotkeyEventType> = Extract<GlobalHotkeyEvent, {
10346
+ declare type Payload_5<Type extends EventType_4> = Extract<Event_7, {
10507
10347
  type: Type;
10508
10348
  }>;
10509
10349
 
10510
10350
  /**
10511
- * Extracts a single event type matching the given key from the {@link PlatformEvent} union.
10351
+ * Extracts a single event type matching the given key from the Frame {@link Event} union.
10512
10352
  *
10513
10353
  * @typeParam Type String key specifying the event to extract
10514
10354
  */
10515
- declare type Payload_6<Type extends PlatformEventType> = Extract<PlatformEvent, {
10355
+ declare type Payload_6<Type extends EventType_5> = Extract<Event_8, {
10516
10356
  type: Type;
10517
10357
  }>;
10518
10358
 
10519
10359
  /**
10520
- * Extracts a single event type matching the given key from the {@link SystemEvent} union.
10360
+ * Extracts a single event type matching the given key from the GlobalHotkey {@link Event} union.
10521
10361
  *
10522
10362
  * @typeParam Type String key specifying the event to extract
10523
10363
  */
10524
- declare type Payload_7<Type extends SystemEventType> = Extract<SystemEvent, {
10364
+ declare type Payload_7<Type extends EventType_6> = Extract<Event_9, {
10525
10365
  type: Type;
10526
10366
  }>;
10527
10367
 
10528
10368
  /**
10529
- * Extracts a single event type matching the given key from the {@link ViewEvent} union.
10369
+ * Extracts a single event type matching the given key from the Platform {@link Event} union.
10530
10370
  *
10531
10371
  * @typeParam Type String key specifying the event to extract
10532
10372
  */
10533
- declare type Payload_8<Type extends ViewEventType> = Extract<ViewEvent, {
10373
+ declare type Payload_8<Type extends EventType_7> = Extract<Event_10, {
10534
10374
  type: Type;
10535
10375
  }>;
10536
10376
 
10537
10377
  /**
10538
- * Extracts a single event type matching the given key from the {@link WindowEvent} union.
10378
+ * Extracts a single event type matching the given key from the System {@link Event} union.
10539
10379
  *
10540
10380
  * @typeParam Type String key specifying the event to extract
10541
10381
  */
10542
- declare type Payload_9<Type extends WindowEventType> = Extract<WindowEvent, {
10382
+ declare type Payload_9<Type extends EventType_8> = Extract<Event_11, {
10543
10383
  type: Type;
10544
10384
  }>;
10545
10385
 
@@ -10549,7 +10389,7 @@ declare type PayloadTypeByStrategy<T extends ChannelStrategy<unknown>> = T exten
10549
10389
  * Generated when window finishes loading. Provides performance and navigation data.
10550
10390
  * @interface
10551
10391
  */
10552
- declare type PerformanceReportEvent = Performance & BaseWindowEvent & {
10392
+ declare type PerformanceReportEvent = Performance & BaseEvent_5 & {
10553
10393
  type: 'performance-report';
10554
10394
  };
10555
10395
 
@@ -10560,6 +10400,7 @@ declare type Permissions_2 = {
10560
10400
  Application?: Partial<ApplicationPermissions>;
10561
10401
  System?: Partial<SystemPermissions>;
10562
10402
  webAPIs?: WebPermission[];
10403
+ devices?: DeviceInfo[];
10563
10404
  };
10564
10405
 
10565
10406
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -11213,38 +11054,36 @@ declare class Platform extends EmitterBase<OpenFin_2.PlatformEvent> {
11213
11054
  }
11214
11055
 
11215
11056
  /**
11216
- * Generated when a new Platform's API becomes responsive.
11217
- * @interface
11057
+ * @deprecated Renamed to {@link ApiReadyEvent}.
11218
11058
  */
11219
- declare type PlatformApiReadyEvent = BaseEvent & {
11220
- topic: 'application';
11221
- type: 'platform-api-ready';
11222
- };
11059
+ declare type PlatformApiReadyEvent = ApiReadyEvent;
11223
11060
 
11224
11061
  /**
11225
- * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Platform}. Events are
11226
- * discriminated by {@link PlatformEvent.type | their type}. Event payloads unique to `Platform` can be found
11227
- * under the {@link OpenFin.PlatformEvents} namespace.
11062
+ * @deprecated Renamed to {@link Event}.
11228
11063
  */
11229
- declare type PlatformEvent = ApplicationEvent | PlatformApiReadyEvent | PlatformSnapshotAppliedEvent;
11064
+ declare type PlatformEvent = Event_10;
11230
11065
 
11231
11066
  declare type PlatformEvent_2 = Events.PlatformEvents.PlatformEvent;
11232
11067
 
11233
11068
  declare namespace PlatformEvents {
11234
11069
  export {
11070
+ ApiReadyEvent,
11235
11071
  PlatformApiReadyEvent,
11072
+ SnapshotAppliedEvent,
11236
11073
  PlatformSnapshotAppliedEvent,
11074
+ Event_10 as Event,
11237
11075
  PlatformEvent,
11076
+ EventType_7 as EventType,
11238
11077
  PlatformEventType,
11239
- Payload_6 as Payload,
11240
- ByType_5 as ByType
11078
+ Payload_8 as Payload,
11079
+ ByType_7 as ByType
11241
11080
  }
11242
11081
  }
11243
11082
 
11244
11083
  /**
11245
- * Union of possible `type` values for a {@link PlatformEvent}.
11084
+ * @deprecated Renamed to {@link }.
11246
11085
  */
11247
- declare type PlatformEventType = PlatformEvent['type'];
11086
+ declare type PlatformEventType = EventType_7;
11248
11087
 
11249
11088
  /**
11250
11089
  * Static namespace for OpenFin API methods that interact with the {@link Platform} class, available under `fin.Platform`.
@@ -11517,18 +11356,16 @@ declare interface PlatformProvider {
11517
11356
  */
11518
11357
  getInitialLayoutSnapshot(payload: undefined, callerIdentity: OpenFin_2.Identity): Promise<OpenFin_2.LayoutSnapshot | undefined>;
11519
11358
  /**
11520
- * @experimental @internal
11521
- *
11522
- * **NOTE**: Internal use only. This method is reserved for Workspace Browser implementation.
11523
- *
11524
- * Calls platform.createView for every view in the given layout. Returns an array of promises
11525
- * one promise for each view create call
11359
+ * @experimental
11526
11360
  *
11527
- * @param layout
11528
- * @param target
11529
- * @returns an array of promises
11361
+ * This API is called during the {@link PlatformProvider.getSnapshot()} call.
11362
+ * Gets the current state of a particular window and its views and returns an object that
11363
+ * can be added to the {@link OpenFin.Snapshot.windows} property. Override this function if
11364
+ * you wish to mutate each window snapshot during the {@link PlatformProvider.getSnapshot()} call
11365
+ * @param identity
11366
+ * @param callerIdentity
11530
11367
  */
11531
- createViewsForLayout(layout: GoldenLayout.Config, target: OpenFin_2.Identity): Promise<OpenFin_2.View>[];
11368
+ getWindowSnapshot(identity: OpenFin_2.Identity, callerIdentity: OpenFin_2.Identity): Promise<OpenFin_2.WindowCreationOptions>;
11532
11369
  /**
11533
11370
  * **NOTE**: Internal use only. It is not recommended to manage the state of individual views.
11534
11371
  * Gets the current state of a single view and returns an object with the options needed to restore that view as part of a snapshot.
@@ -11969,19 +11806,9 @@ declare interface PlatformProvider {
11969
11806
  }
11970
11807
 
11971
11808
  /**
11972
- * Generated when a platform.ApplySnapshot call is resolved.
11973
- * @remarks The call is resolved when the following conditions are met for all windows in the snapshot:
11974
- * 1. The window has been created
11975
- * 2. The window has a responsive API
11976
- * 3. If a window has a layout property, the 'layout-ready' event has fired
11977
- *
11978
- * _Note_ - In the case of using a custom provider, if a window has a layout property but does not call _Layout.init_ this event may not fire.
11979
- * @interface
11809
+ * @deprecated Renamed to {@link SnapshotAppliedEvent}.
11980
11810
  */
11981
- declare type PlatformSnapshotAppliedEvent = BaseEvent & {
11982
- topic: 'application';
11983
- type: 'platform-snapshot-applied';
11984
- };
11811
+ declare type PlatformSnapshotAppliedEvent = SnapshotAppliedEvent;
11985
11812
 
11986
11813
  /**
11987
11814
  * @interface
@@ -12249,7 +12076,7 @@ declare type PreloadScriptsStateChangedEvent = PreloadScriptsStateChangeEvent &
12249
12076
  * A general preload scripts state change event without event type.
12250
12077
  * @interface
12251
12078
  */
12252
- declare type PreloadScriptsStateChangeEvent = BaseWindowEvent & {
12079
+ declare type PreloadScriptsStateChangeEvent = BaseEvent_5 & {
12253
12080
  preloadScripts: (PreloadScriptInfoRunning & any)[];
12254
12081
  };
12255
12082
 
@@ -12458,51 +12285,43 @@ declare type ProcessLoggingOptions = {
12458
12285
  };
12459
12286
 
12460
12287
  /**
12461
- * An Application event that has propagated to {@link OpenFin.SystemEvents System}, type string prefixed with `application-`.
12462
- * {@link OpenFin.ApplicationEvents.ApplicationWindowEvent Application events that are tied to Windows but do not propagate from them}
12463
- * are propagated to `System` without any type string prefixing.
12464
- *
12465
- * "Requested" events (e.g. {@link RunRequestedEvent}) do not propagate.
12288
+ * @deprecated Renamed to {@link PropagatedEvent}.
12466
12289
  */
12467
- declare type PropagatedApplicationEvent<TargetTopic extends string> = PropagatedEvent<'application', TargetTopic, ApplicationSourcedEvent> | ApplicationWindowEvent;
12290
+ declare type PropagatedApplicationEvent<TargetTopic extends string> = PropagatedEvent_4<TargetTopic>;
12468
12291
 
12469
12292
  /**
12470
- * Union of possible 'type' values for a {@link OpenFin.ApplicationEvents.PropagatedApplicationEvent}.
12293
+ * @deprecated Renamed to {@link PropagatedEventType}.
12471
12294
  */
12472
- declare type PropagatedApplicationEventType = PropagatedApplicationEvent<string>['type'];
12295
+ declare type PropagatedApplicationEventType = PropagatedEventType_3;
12473
12296
 
12474
12297
  /**
12475
- * Modifies an event shape to reflect propagation to a parent topic.
12298
+ * Modifies an event shape to reflect propagation to a parent topic. Excludes `close-requested` events, as
12299
+ * these do not propagate.
12300
+ *
12476
12301
  * @remarks The 'type' field is prefixed with the original topic, and a new property is added with the original topic's identity.
12302
+ *
12303
+ * @typeParam SourceTopic The topic the event shape is propagating from.
12304
+ * @typeParam TargetTopic The topic the event shape is propagating to.
12305
+ * @typeParam Event The shape of the event being propagated.
12477
12306
  */
12478
12307
  declare type PropagatedEvent<SourceTopic extends string, TargetTopic extends string, Event extends {
12479
12308
  type: string;
12480
12309
  }> = Event extends infer E extends {
12481
12310
  type: string;
12482
- } ? Omit<E, 'type' | 'topic'> & {
12311
+ } ? E['type'] extends 'close-requested' ? never : Omit<E, 'type' | 'topic'> & {
12483
12312
  type: PropagatedEventType<SourceTopic, E['type']>;
12484
12313
  topic: TargetTopic;
12485
12314
  } : never;
12486
12315
 
12487
- /**
12488
- * Modifies an event key to reflect propagation by prefixing with the topic.
12489
- */
12490
- declare type PropagatedEventType<Topic extends string, Type extends string> = `${Topic}-${Type}`;
12491
-
12492
12316
  /**
12493
12317
  * A view event that has propagated to a parent {@link OpenFin.WindowEvents Window}, {@link OpenFin.ApplicationEvents Application},
12494
12318
  * or {@link OpenFin.SystemEvents System}), adding a `viewIdentity` property (since the `Identity` property of the propagated event refers to the `Window`) and prefixing the
12495
12319
  * event type key with `'view-'`.
12496
12320
  */
12497
- declare type PropagatedViewEvent<TargetTopic extends string> = PropagatedEvent<'view', TargetTopic, ViewEvent> & {
12321
+ declare type PropagatedEvent_2<TargetTopic extends string> = BaseEvents.PropagatedEvent<'view', TargetTopic, ViewEvent> & {
12498
12322
  viewIdentity: OpenFin_2.Identity;
12499
12323
  };
12500
12324
 
12501
- /**
12502
- * Union of possible `type` values for a {@link OpenFin.ViewEvents.PropagatedViewEvent}.
12503
- */
12504
- declare type PropagatedViewEventType = PropagatedViewEvent<string>['type'];
12505
-
12506
12325
  /**
12507
12326
  * A Window event that has propagated to the parent {@link OpenFin.ApplicationEvents Application} and {@link OpenFin.SystemEvents System},
12508
12327
  * prefixing the type string with `'window-'`. Only {@link WindowSourcedEvent window-sourced events} will propagate
@@ -12511,12 +12330,51 @@ declare type PropagatedViewEventType = PropagatedViewEvent<string>['type'];
12511
12330
  *
12512
12331
  * "Requested" events (e.g. {@link AuthRequestedEvent}) do not propagate to `System.`
12513
12332
  */
12514
- declare type PropagatedWindowEvent<TargetTopic extends string> = PropagatedEvent<'window', TargetTopic, Exclude<WindowSourcedEvent, WindowCloseRequestedEvent>>;
12333
+ declare type PropagatedEvent_3<TargetTopic extends string> = BaseEvents.PropagatedEvent<'window', TargetTopic, WindowSourcedEvent>;
12334
+
12335
+ /**
12336
+ * An Application event that has propagated to {@link OpenFin.SystemEvents System}, type string prefixed with `application-`.
12337
+ * {@link OpenFin.ApplicationEvents.ApplicationWindowEvent Application events that are tied to Windows but do not propagate from them}
12338
+ * are propagated to `System` without any type string prefixing.
12339
+ *
12340
+ * "Requested" events (e.g. {@link RunRequestedEvent}) do not propagate.
12341
+ */
12342
+ declare type PropagatedEvent_4<TargetTopic extends string> = BaseEvents.PropagatedEvent<'application', TargetTopic, ApplicationSourcedEvent> | ApplicationWindowEvent;
12343
+
12344
+ /**
12345
+ * Modifies an event type key to reflect propagation by prefixing with the topic.
12346
+ */
12347
+ declare type PropagatedEventType<Topic extends string, Type extends string> = `${Topic}-${NotCloseRequested<Type>}`;
12348
+
12349
+ /**
12350
+ * Union of possible `type` values for a {@link PropagatedEvent} sourced from a {@link OpenFin.View}.
12351
+ */
12352
+ declare type PropagatedEventType_2 = PropagatedEvent_2<string>['type'];
12353
+
12354
+ /**
12355
+ * Union of possible 'type' values for an {@link PropagatedEvent} sourced from an {@link Application}.
12356
+ */
12357
+ declare type PropagatedEventType_3 = PropagatedEvent_4<string>['type'];
12358
+
12359
+ /**
12360
+ * @deprecated Renamed to {@link PropagatedEvent}.
12361
+ */
12362
+ declare type PropagatedViewEvent<TargetTopic extends string> = PropagatedEvent_2<TargetTopic>;
12363
+
12364
+ /**
12365
+ * @deprecated Renamed to {@link PropagatedEventType}.
12366
+ */
12367
+ declare type PropagatedViewEventType = PropagatedEventType_2;
12368
+
12369
+ /**
12370
+ * @deprecated Renamed to {@link PropagatedEvent}.
12371
+ */
12372
+ declare type PropagatedWindowEvent<TargetTopic extends string> = PropagatedEvent_3<TargetTopic>;
12515
12373
 
12516
12374
  /**
12517
- * Union of possible `type` values for a {@link OpenFin.WindowEvents.PropagatedWindowEvent}.
12375
+ * Union of possible `type` values for a {@link PropagatedEvent} sourced from a {@link OpenFin.Window}.
12518
12376
  */
12519
- declare type PropagatedWindowEventType = PropagatedWindowEvent<string>['type'];
12377
+ declare type PropagatedWindowEventType = PropagatedEvent_3<string>['type'];
12520
12378
 
12521
12379
  declare interface ProtocolMap extends ProtocolMapBase {
12522
12380
  'request-external-authorization': {
@@ -12934,7 +12792,7 @@ declare type RegistryInfo_2 = {
12934
12792
  * Generated when a window has been reloaded.
12935
12793
  * @interface
12936
12794
  */
12937
- declare type ReloadedEvent = BaseWindowEvent & {
12795
+ declare type ReloadedEvent = BaseEvent_5 & {
12938
12796
  type: 'reloaded';
12939
12797
  url: string;
12940
12798
  };
@@ -12971,7 +12829,7 @@ declare type ReplaceLayoutPayload = {
12971
12829
  /**
12972
12830
  * Identity of the window whose layout will be replaced.
12973
12831
  */
12974
- target: LayoutIdentity;
12832
+ target: Identity_5 | LayoutIdentity;
12975
12833
  };
12976
12834
 
12977
12835
  /**
@@ -13070,11 +12928,19 @@ declare type ResourceResponseReceivedEvent = NamedEvent & {
13070
12928
  * Generated when an application is responding.
13071
12929
  * @interface
13072
12930
  */
13073
- declare type RespondingEvent = IdentityEvent & {
12931
+ declare type RespondingEvent = BaseEvents.IdentityEvent & {
13074
12932
  topic: 'application';
13075
12933
  type: 'responding';
13076
12934
  };
13077
12935
 
12936
+ /**
12937
+ * Generated when a window is displayed after having been minimized or when a window leaves the maximize state without minimizing.
12938
+ * @interface
12939
+ */
12940
+ declare type RestoredEvent = BaseEvent_5 & {
12941
+ type: 'restored';
12942
+ };
12943
+
13078
12944
  declare type ResultBehavior = 'close' | 'hide' | 'none';
13079
12945
 
13080
12946
  /**
@@ -13137,7 +13003,7 @@ declare type RunRequestedEvent = OpenFin_2.ApplicationEvents.RunRequestedEvent;
13137
13003
  * Generated when Application.run() is called for an already running application.
13138
13004
  * @interface
13139
13005
  */
13140
- declare type RunRequestedEvent_2 = IdentityEvent & {
13006
+ declare type RunRequestedEvent_2 = BaseEvents.IdentityEvent & {
13141
13007
  topic: 'application';
13142
13008
  type: 'run-requested';
13143
13009
  userAppConfigArgs: Record<string, any>;
@@ -13319,7 +13185,7 @@ declare type ServiceIdentifier = {
13319
13185
  * Generated on changes to a user’s local computer session.
13320
13186
  * @interface
13321
13187
  */
13322
- declare type SessionChangedEvent = BaseSystemEvent & {
13188
+ declare type SessionChangedEvent = BaseEvent_8 & {
13323
13189
  type: 'session-changed';
13324
13190
  reason: 'lock' | 'unlock' | 'remote-connect' | 'remote-disconnect' | 'unknown';
13325
13191
  };
@@ -13541,7 +13407,7 @@ declare type ShortcutOverride = Hotkey & {
13541
13407
  *
13542
13408
  * @interface
13543
13409
  */
13544
- declare type ShowAllDownloadsEvent = BaseWindowEvent & {
13410
+ declare type ShowAllDownloadsEvent = BaseEvent_5 & {
13545
13411
  type: 'show-all-downloads';
13546
13412
  };
13547
13413
 
@@ -13549,7 +13415,15 @@ declare type ShowAllDownloadsEvent = BaseWindowEvent & {
13549
13415
  * Generated when a View is shown. This event will fire during creation of a View.
13550
13416
  * @interface
13551
13417
  */
13552
- declare type ShownEvent = BaseViewEvent & {
13418
+ declare type ShownEvent = BaseEvent_4 & {
13419
+ type: 'shown';
13420
+ };
13421
+
13422
+ /**
13423
+ * Generated when a hidden window has been shown.
13424
+ * @interface
13425
+ */
13426
+ declare type ShownEvent_2 = BaseEvent_5 & {
13553
13427
  type: 'shown';
13554
13428
  };
13555
13429
 
@@ -13578,6 +13452,15 @@ declare type ShowPopupMenuOptions<Data extends unknown = unknown> = {
13578
13452
  y?: number;
13579
13453
  };
13580
13454
 
13455
+ /**
13456
+ * Generated when a window has been prevented from showing.
13457
+ * @remarks A window will be prevented from showing by default, either through the API or by a user when ‘show-requested’ has been subscribed to on the window or 'window-show-requested' on the parent application and the Window.show(force) flag is false.
13458
+ * @interface
13459
+ */
13460
+ declare type ShowRequestedEvent = BaseEvent_5 & {
13461
+ type: 'show-requested';
13462
+ };
13463
+
13581
13464
  /**
13582
13465
  * _Platform Windows Only_. Enables views to be shown when a Platform Window is being resized by the user.
13583
13466
  *
@@ -13624,6 +13507,21 @@ declare type Snapshot = {
13624
13507
  };
13625
13508
  };
13626
13509
 
13510
+ /**
13511
+ * Generated when a platform.ApplySnapshot call is resolved.
13512
+ * @remarks The call is resolved when the following conditions are met for all windows in the snapshot:
13513
+ * 1. The window has been created
13514
+ * 2. The window has a responsive API
13515
+ * 3. If a window has a layout property, the 'layout-ready' event has fired
13516
+ *
13517
+ * _Note_ - In the case of using a custom provider, if a window has a layout property but does not call _Layout.init_ this event may not fire.
13518
+ * @interface
13519
+ */
13520
+ declare type SnapshotAppliedEvent = BaseEvent & {
13521
+ topic: 'application';
13522
+ type: 'platform-snapshot-applied';
13523
+ };
13524
+
13627
13525
  /**
13628
13526
  * @interface
13629
13527
  */
@@ -13741,7 +13639,7 @@ declare class SnapshotSourceModule extends Base {
13741
13639
  * Generated when an application has started.
13742
13640
  * @interface
13743
13641
  */
13744
- declare type StartedEvent = IdentityEvent & {
13642
+ declare type StartedEvent = BaseEvents.IdentityEvent & {
13745
13643
  topic: 'application';
13746
13644
  type: 'started';
13747
13645
  };
@@ -13768,83 +13666,6 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
13768
13666
  */
13769
13667
  constructor(wire: Transport);
13770
13668
  private sendExternalProcessRequest;
13771
- /**
13772
- * Adds a listener to the end of the listeners array for the specified event.
13773
- * @param eventType - The type of the event.
13774
- * @param listener - Called whenever an event of the specified type occurs.
13775
- * @param options - Option to support event timestamps.
13776
- *
13777
- * @function addListener
13778
- * @memberof System
13779
- * @instance
13780
- * @tutorial System.EventEmitter
13781
- */
13782
- /**
13783
- * Adds a listener to the end of the listeners array for the specified event.
13784
- * @param eventType - The type of the event.
13785
- * @param listener - Called whenever an event of the specified type occurs.
13786
- * @param options - Option to support event timestamps.
13787
- *
13788
- * @function on
13789
- * @memberof System
13790
- * @instance
13791
- * @tutorial System.EventEmitter
13792
- */
13793
- /**
13794
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
13795
- * @param eventType - The type of the event.
13796
- * @param listener - The callback function.
13797
- * @param options - Option to support event timestamps.
13798
- *
13799
- * @function once
13800
- * @memberof System
13801
- * @instance
13802
- * @tutorial System.EventEmitter
13803
- */
13804
- /**
13805
- * Adds a listener to the beginning of the listeners array for the specified event.
13806
- * @param eventType - The type of the event.
13807
- * @param listener - The callback function.
13808
- * @param options - Option to support event timestamps.
13809
- *
13810
- * @function prependListener
13811
- * @memberof System
13812
- * @instance
13813
- * @tutorial System.EventEmitter
13814
- */
13815
- /**
13816
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
13817
- * The listener is added to the beginning of the listeners array.
13818
- * @param eventType - The type of the event.
13819
- * @param listener - The callback function.
13820
- * @param options - Option to support event timestamps.
13821
- *
13822
- * @function prependOnceListener
13823
- * @memberof System
13824
- * @instance
13825
- * @tutorial System.EventEmitter
13826
- */
13827
- /**
13828
- * Remove a listener from the listener array for the specified event.
13829
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
13830
- * @param eventType - The type of the event.
13831
- * @param listener - The callback function.
13832
- * @param options - Option to support event timestamps.
13833
- *
13834
- * @function removeListener
13835
- * @memberof System
13836
- * @instance
13837
- * @tutorial System.EventEmitter
13838
- */
13839
- /**
13840
- * Removes all listeners, or those of the specified event.
13841
- * @param eventType - The type of the event.
13842
- *
13843
- * @function removeAllListeners
13844
- * @memberof System
13845
- * @instance
13846
- * @tutorial System.EventEmitter
13847
- */
13848
13669
  /**
13849
13670
  * Returns the version of the runtime. The version contains the major, minor,
13850
13671
  * build and revision numbers.
@@ -15277,12 +15098,9 @@ declare type SystemChannel = Omit<Channel_3, 'addContextListener' | 'broadcast'
15277
15098
  };
15278
15099
 
15279
15100
  /**
15280
- * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link System}. Events are
15281
- * discriminated by {@link SystemEvent.type | their type}. Event payloads unique to `System` can be found
15282
- * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
15283
- * from which they propagate).
15101
+ * @deprecated Renamed to {@link Event}.
15284
15102
  */
15285
- declare type SystemEvent = ExcludeRequested<PropagatedWindowEvent<'system'>> | PropagatedViewEvent<'system'> | PropagatedApplicationEvent<'system'> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleEvent | MonitorEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent;
15103
+ declare type SystemEvent = Event_11;
15286
15104
 
15287
15105
  declare type SystemEvent_2 = Events.SystemEvents.SystemEvent;
15288
15106
 
@@ -15290,8 +15108,10 @@ declare namespace SystemEvents {
15290
15108
  export {
15291
15109
  NotRequested,
15292
15110
  ExcludeRequested,
15293
- BaseSystemEvent,
15111
+ BaseEvent_8 as BaseEvent,
15112
+ IdleStateChangedEvent,
15294
15113
  IdleEvent,
15114
+ MonitorInfoChangedEvent,
15295
15115
  MonitorEvent,
15296
15116
  SessionChangedEvent,
15297
15117
  AppVersionEvent,
@@ -15305,17 +15125,19 @@ declare namespace SystemEvents {
15305
15125
  ApplicationCreatedEvent,
15306
15126
  DesktopIconClickedEvent,
15307
15127
  SystemShutdownEvent,
15128
+ Event_11 as Event,
15308
15129
  SystemEvent,
15130
+ EventType_8 as EventType,
15309
15131
  SystemEventType,
15310
- Payload_7 as Payload,
15311
- ByType_6 as ByType
15132
+ Payload_9 as Payload,
15133
+ ByType_8 as ByType
15312
15134
  }
15313
15135
  }
15314
15136
 
15315
15137
  /**
15316
- * Union of possible `type` values for a {@link SystemEvent}.
15138
+ * @deprecated Renamed to {@link EventType}.
15317
15139
  */
15318
- declare type SystemEventType = SystemEvent['type'];
15140
+ declare type SystemEventType = EventType_8;
15319
15141
 
15320
15142
  /**
15321
15143
  * @interface
@@ -15372,7 +15194,7 @@ declare type SystemProcessInfo = {
15372
15194
  * Generated when system shutdown or log off.
15373
15195
  * @internal
15374
15196
  */
15375
- declare type SystemShutdownEvent = BaseSystemEvent & {
15197
+ declare type SystemShutdownEvent = BaseEvent_8 & {
15376
15198
  type: 'system-shutdown';
15377
15199
  };
15378
15200
 
@@ -15433,75 +15255,11 @@ declare interface TabDragListener extends EventEmitter_2 {
15433
15255
  contentItem: ContentItem;
15434
15256
  }
15435
15257
 
15436
- /**
15437
- * @typedef {string} LayoutPosition
15438
- * @summary Represents the position of an item in a layout relative to another. Possible values are 'top', 'bottom', 'left' and 'right'.
15439
- */
15440
- /**
15441
- * @typedef {object} StackCreationOptions
15442
- * @summary Stack creation options.
15443
- * @property {LayoutPosition} [position] - The position to create the new {@link TabStack} in, relative to the given adjacent {@link TabStack}. Defaults to 'right'.
15444
- */
15445
- /**
15446
- * @typedef {object} TabStack~AddViewOptions
15447
- * @summary Options to use when adding a view to a {@link TabStack}
15448
- * @property {number} [index] - Insertion index when adding the view. Defaults to 0.
15449
- */
15450
15258
  /**
15451
15259
  * A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
15452
15260
  */
15453
15261
  declare class TabStack extends LayoutNode {
15454
15262
  #private;
15455
- /**
15456
- * Determines if this {@link TabStack} is the top level content item in the current layout.
15457
- * @function isRoot
15458
- * @memberof TabStack
15459
- * @instance
15460
- * @tutorial TabStack.isRoot
15461
- * @returns Resolves true if this TabStack is the top level content item, or false if it is not.
15462
- */
15463
- /**
15464
- * Determines if this {@link TabStack} exists.
15465
- * @function exists
15466
- * @instance
15467
- * @memberof TabStack
15468
- * @tutorial TabStack.exists
15469
- * @returns Resolves true if this is the TabStack exists, or false if it has been destroyed.
15470
- */
15471
- /**
15472
- * Retrieves the parent {@link ColumnOrRow} of this {@link TabStack}, if one exists.
15473
- * @function getParent
15474
- * @instance
15475
- * @memberof TabStack
15476
- * @tutorial TabStack.getParent
15477
- * @returns is the root content item or does not exist.
15478
- */
15479
- /**
15480
- * Returns all the adjacent stacks that share an edge with the given {@link TabStack}.
15481
- * @function getAdjacentStacks
15482
- * @instance
15483
- * @memberof TabStack
15484
- * @param {LayoutPosition} edge - Edge to check for any adjacent stacks.
15485
- *
15486
- * @tutorial TabStack.getAdjacentStacks
15487
- */
15488
- /**
15489
- * Given a list of view creation options or references and a layout position, creates a {@link TabStack} adjacent to the current {@link TabStack}
15490
- *
15491
- * Known Issue: If the number of views to add overflows the tab-container, the added views will be set as active
15492
- * during each render, and then placed at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
15493
- * This means the views you pass to createAdjacentStack() may not render in the order given by the array.
15494
- * Until fixed, this problem can be avoided only if your window is wide enough to fit creating all the views in the tabstack.
15495
- *
15496
- * @function createAdjacentStack
15497
- * @instance
15498
- * @memberof TabStack
15499
- * @param views - List of identities or view creation options of the views to include in the stack
15500
- * @param options - Creation options.
15501
- * @returns The created TabStack.
15502
- * @tutorial TabStack.createAdjacentStack
15503
- * @experimental
15504
- */
15505
15263
  /** @internal */
15506
15264
  constructor(client: LayoutEntitiesClient, entityId: string);
15507
15265
  /**
@@ -15625,7 +15383,7 @@ declare type TargetApp = string | AppMetadata;
15625
15383
  * In that case, previousTarget identity will be the same as target identity.
15626
15384
  * @interface
15627
15385
  */
15628
- declare type TargetChangedEvent = BaseViewEvent & {
15386
+ declare type TargetChangedEvent = BaseEvent_4 & {
15629
15387
  type: 'target-changed';
15630
15388
  previousTarget: OpenFin_2.Identity;
15631
15389
  };
@@ -15779,7 +15537,7 @@ declare class Transport<MeType extends EntityType = EntityType> extends EventEmi
15779
15537
  * Generated when the tray icon is clicked.
15780
15538
  * @interface
15781
15539
  */
15782
- declare type TrayIconClickedEvent = IdentityEvent & {
15540
+ declare type TrayIconClickedEvent = BaseEvents.IdentityEvent & {
15783
15541
  topic: 'application';
15784
15542
  type: 'tray-icon-clicked';
15785
15543
  button: 0 | 1 | 2;
@@ -15869,7 +15627,7 @@ declare type UrlChangedEvent = BaseUrlEvent & ({
15869
15627
  * A general user bounds change event without event type.
15870
15628
  * @interface
15871
15629
  */
15872
- declare type UserBoundsChangeEvent = BaseWindowEvent & {
15630
+ declare type UserBoundsChangeEvent = BaseEvent_5 & {
15873
15631
  height: number;
15874
15632
  left: number;
15875
15633
  top: number;
@@ -15881,7 +15639,7 @@ declare type UserBoundsChangeEvent = BaseWindowEvent & {
15881
15639
  * Generated when a window's user movement becomes disabled.
15882
15640
  * @interface
15883
15641
  */
15884
- declare type UserMovementDisabledEvent = BaseWindowEvent & {
15642
+ declare type UserMovementDisabledEvent = BaseEvent_5 & {
15885
15643
  type: 'user-movement-disabled';
15886
15644
  };
15887
15645
 
@@ -15889,7 +15647,7 @@ declare type UserMovementDisabledEvent = BaseWindowEvent & {
15889
15647
  * Generated when a window's user movement becomes enabled.
15890
15648
  * @interface
15891
15649
  */
15892
- declare type UserMovementEnabledEvent = BaseWindowEvent & {
15650
+ declare type UserMovementEnabledEvent = BaseEvent_5 & {
15893
15651
  type: 'user-movement-enabled';
15894
15652
  };
15895
15653
 
@@ -15942,169 +15700,6 @@ declare type VerboseWebPermission = {
15942
15700
 
15943
15701
  declare type View = OpenFin_2.View;
15944
15702
 
15945
- /**
15946
- * @PORTED
15947
- * @typedef {object} View~options
15948
- * @summary View creation options.
15949
- * @desc This is the options object required by {@link View.create View.create}.
15950
- *
15951
- * Note that `name` and `target` are the only required properties — albeit the `url` property is usually provided as well
15952
- * (defaults to `"about:blank"` when omitted).
15953
- *
15954
- * @property {object} [experimental]
15955
- * Configurations for API injection.
15956
- *
15957
- * @property {boolean} [experimental.childWindows] Configure if the runtime should enable child windows for views.
15958
- *
15959
- * @property {object} [accelerator]
15960
- * Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
15961
- *
15962
- * @property {boolean} [accelerator.devtools=false]
15963
- * If `true`, enables the devtools keyboard shortcut:<br>
15964
- * `Ctrl` + `Shift` + `I` _(Toggles Devtools)_
15965
- *
15966
- * @property {boolean} [accelerator.reload=false]
15967
- * If `true`, enables the reload keyboard shortcuts:<br>
15968
- * `Ctrl` + `R` _(Windows)_<br>
15969
- * `F5` _(Windows)_<br>
15970
- * `Command` + `R` _(Mac)_
15971
- *
15972
- * @property {boolean} [accelerator.reloadIgnoringCache=false]
15973
- * If `true`, enables the reload-from-source keyboard shortcuts:<br>
15974
- * `Ctrl` + `Shift` + `R` _(Windows)_<br>
15975
- * `Shift` + `F5` _(Windows)_<br>
15976
- * `Command` + `Shift` + `R` _(Mac)_
15977
- *
15978
- * @property {boolean} [accelerator.zoom=false]
15979
- * If `true`, enables the zoom keyboard shortcuts:<br>
15980
- * `Ctrl` + `+` _(Zoom In)_<br>
15981
- * `Ctrl` + `Shift` + `+` _(Zoom In)_<br>
15982
- * `Ctrl` + `NumPad+` _(Zoom In)_<br>
15983
- * `Ctrl` + `-` _(Zoom Out)_<br>
15984
- * `Ctrl` + `Shift` + `-` _(Zoom Out)_<br>
15985
- * `Ctrl` + `NumPad-` _(Zoom Out)_<br>
15986
- * `Ctrl` + `Scroll` _(Zoom In & Out)_<br>
15987
- * `Ctrl` + `0` _(Restore to 100%)_
15988
- *
15989
- * @property {object} [api]
15990
- * Configurations for API injection.
15991
- *
15992
- * @property {object} [api.iframe] Configure if the the API should be injected into iframes based on domain.
15993
- *
15994
- * @property {boolean} [api.iframe.crossOriginInjection=false] Controls if the `fin` API object is present for cross origin iframes.
15995
- * @property {boolean} [api.iframe.sameOriginInjection=true] Controls if the `fin` API object is present for same origin iframes.
15996
- *
15997
- * @property {string} [autoplayPolicy="no-user-gesture-required"]
15998
- * Autoplay policy to apply to content in the window, can be
15999
- * `no-user-gesture-required`, `user-gesture-required`,
16000
- * `document-user-activation-required`. Defaults to `no-user-gesture-required`.
16001
- *
16002
- * @property {object} [autoResize] AutoResize options
16003
- *
16004
- * @property {object} [bounds] initial bounds given relative to the window.
16005
- *
16006
- * @property {string} [backgroundColor="#FFF"] - _Updatable._
16007
- * The view’s _backfill_ color as a hexadecimal value. Not to be confused with the content background color
16008
- * (`document.body.style.backgroundColor`),
16009
- * this color briefly fills a view’s (a) content area before its content is loaded as well as (b) newly exposed
16010
- * areas when growing a window. Setting
16011
- * this value to the anticipated content background color can help improve user experience.
16012
- * Default is white.
16013
- *
16014
- * @property {object} [contentNavigation]
16015
- * Restrict navigation to URLs that match an allowed pattern.
16016
- * In the lack of an allowlist, navigation to URLs that match a denied pattern would be prohibited.
16017
- * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
16018
- * @property {string[]} [contentNavigation.allowlist=[]] List of allowed URLs.
16019
- * @property {string[]} [contentNavigation.denylist=[]] List of denied URLs.
16020
- *
16021
- * @property {object} [contentRedirect]
16022
- * Restrict redirects to URLs that match an allowed pattern.
16023
- * In the lack of an allowlist, redirects to URLs that match a denied pattern would be prohibited.
16024
- * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
16025
- * @property {string[]} [contentRedirect.allowlist=[]] List of allowed URLs.
16026
- * @property {string[]} [contentRedirect.denylist=[]] List of denied URLs.
16027
- *
16028
- * @property {object} [contextMenuSettings] - _Updatable._
16029
- * Deprecated - superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
16030
- * Configure the context menu when right-clicking on a view.
16031
- * @property {boolean} [contextMenuSettings.enable=true] Should the context menu display on right click.
16032
- * @property {boolean} [contextMenuSettings.devtools=true] Should the context menu contain a button for opening devtools.
16033
- * @property {boolean} [contextMenuSettings.reload=true] Should the context menu contain a button for reloading the page.
16034
- *
16035
- * @property {object} [contextMenuOptions] - _Updatable._
16036
- * Configure the context menu when right-clicking on a view. Supported menu items:
16037
- * 'separator'
16038
- * 'cut'
16039
- * 'copy'
16040
- * 'copyImage',
16041
- * 'paste'
16042
- * 'spellCheck'
16043
- * 'inspect'
16044
- * 'reload'
16045
- * 'navigateForward'
16046
- * 'navigateBack'
16047
- * 'print'
16048
- * @property {boolean} [contextMenuOptions.enabled = true] Should the context menu display on right click.
16049
- * @property {string[]} [contextMenuOptions.template=[]] List of context menu items to display on right-click.
16050
- *
16051
- * @property {any} [customData=""] - _Updatable._
16052
- * A field that the user can attach serializable data to be ferried around with the view options.
16053
- * _When omitted, the default value of this property is the empty string (`""`)._
16054
- *
16055
- * @property {any} [customContext=""] - _Updatable._
16056
- * A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
16057
- * is called.
16058
- * When omitted, the default value of this property is the empty string (`""`).
16059
- * As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
16060
- *
16061
- * @property {object[]} [hotkeys=[]] - _Updatable._
16062
- * Defines the list of hotkeys that will be emitted as a `hotkey` event on the view. For usage example see [example]{@tutorial hotkeys}.
16063
- * Within Platform, OpenFin also implements a set of pre-defined actions called
16064
- * [keyboard commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}
16065
- * that can be assigned to a specific hotkey in the platform manifest.
16066
- * @property {string} hotkeys.keys The key combination of the hotkey, i.e. "Ctrl+T"
16067
- * @property {boolean} [hotkeys.preventDefault=false] preventDefault will prevent the page keydown/keyup events from being emitted.
16068
- *
16069
- * @property {boolean} [isClosable=true] **Platforms Only.** If false, the view will be persistent and can't be closed through
16070
- * either UI or `Platform.closeView`. Note that the view will still be closed if the host window is closed or
16071
- * if the view isn't part of the new layout when running `Layout.replace`.
16072
- *
16073
- * @property {string} name
16074
- * The name of the view.
16075
- *
16076
- * @property {boolean} [detachOnClose=false] - _Updatable._
16077
- * Platforms Only. If true, will hide and detach the View from the window for later use instead of closing,
16078
- * allowing the state of the View to be saved and the View to be immediately shown in a new Layout.
16079
- *
16080
- * @property {string} [manifestUrl] **Platforms Only.** Url to a manifest that contains View Options. Properties other than manifestUrl can still be used
16081
- * but the properties in the manifest will take precedence if there is any collision.
16082
- *
16083
- * @property {preloadScript[]} [preloadScripts] - _Inheritable_
16084
- * A list of scripts that are eval'ed before other scripts in the page. When omitted, _inherits_
16085
- * from the parent application.
16086
- *
16087
- * @property {boolean} [preventDragOut=false] **Platforms Only.** If true, the tab of the view can't be dragged out of its host window.
16088
- *
16089
- * @property {string} [processAffinity=<application uuid>]
16090
- * A string to attempt to group renderers together. Will only be used if pages are on the same origin.
16091
- *
16092
- * @property {boolean} [spellCheck=false]
16093
- * Enable spell check in input text fields for the view.
16094
- *
16095
- * @property {Identity} [target]
16096
- * The identity of the window this view should be attached to.
16097
- *
16098
- * @property {string} [url="about:blank"]
16099
- * The URL of the view.
16100
- *
16101
- * @property {string} [uuid=<application uuid>]
16102
- * The `uuid` of the application, unique within the set of all `Application`s running in OpenFin Runtime.
16103
- * If omitted, defaults to the `uuid` of the application spawning the view.
16104
- * If given, must match the `uuid` of the application spawning the view.
16105
- * In other words, the application's `uuid` is the only acceptable value, but is the default, so there's
16106
- * really no need to provide it.
16107
- */
16108
15703
  /**
16109
15704
  * A View can be used to embed additional web content into a Window.
16110
15705
  * It is like a child window, except it is positioned relative to its owning window.
@@ -16576,7 +16171,7 @@ declare class View_2 extends WebContents<OpenFin_2.ViewEvent> {
16576
16171
  * Generated when a View is attached to a window.
16577
16172
  * @interface
16578
16173
  */
16579
- declare type ViewAttachedEvent = BaseWindowEvent & {
16174
+ declare type ViewAttachedEvent = BaseEvent_5 & {
16580
16175
  type: 'view-attached';
16581
16176
  target: OpenFin_2.Identity;
16582
16177
  viewIdentity: OpenFin_2.Identity;
@@ -16618,26 +16213,23 @@ declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformVi
16618
16213
  * @remarks Will fire when a view is destroyed in which case `target` will be null.
16619
16214
  * @interface
16620
16215
  */
16621
- declare type ViewDetachedEvent = BaseWindowEvent & {
16216
+ declare type ViewDetachedEvent = BaseEvent_5 & {
16622
16217
  type: 'view-detached';
16623
- target: OpenFin_2.Identity;
16218
+ target: OpenFin_2.Identity | null;
16624
16219
  previousTarget: OpenFin_2.Identity;
16625
16220
  viewIdentity: OpenFin_2.Identity;
16626
16221
  };
16627
16222
 
16628
16223
  /**
16629
- * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link View}. Events are
16630
- * discriminated by {@link ViewEvent.type | their type}. Event payloads unique to `View` can be found
16631
- * under the {@link OpenFin.ViewEvents} namespace (except for {@link OpenFin.WebContentsEvents | those shared with other WebContents}).
16224
+ * @deprecated Renamed to {@link Event}.
16632
16225
  */
16633
- declare type ViewEvent = (WebContentsEvent<'view'> & {
16634
- target: OpenFin_2.Identity;
16635
- }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent;
16226
+ declare type ViewEvent = Event_4;
16636
16227
 
16637
16228
  declare type ViewEvent_2 = Events.ViewEvents.ViewEvent;
16638
16229
 
16639
16230
  declare namespace ViewEvents {
16640
16231
  export {
16232
+ BaseEvent_4 as BaseEvent,
16641
16233
  BaseViewEvent,
16642
16234
  TargetChangedEvent,
16643
16235
  NonPropagatedViewEvent,
@@ -16647,20 +16239,24 @@ declare namespace ViewEvents {
16647
16239
  HotkeyEvent,
16648
16240
  ShownEvent,
16649
16241
  HostContextChangedEvent,
16242
+ Event_4 as Event,
16650
16243
  ViewEvent,
16651
16244
  WillPropagateViewEvent,
16245
+ EventType,
16652
16246
  ViewEventType,
16247
+ PropagatedEvent_2 as PropagatedEvent,
16653
16248
  PropagatedViewEvent,
16249
+ PropagatedEventType_2 as PropagatedEventType,
16654
16250
  PropagatedViewEventType,
16655
- Payload_8 as Payload,
16656
- ByType_7 as ByType
16251
+ Payload_2 as Payload,
16252
+ ByType
16657
16253
  }
16658
16254
  }
16659
16255
 
16660
16256
  /**
16661
- * Union of possible `type` values for a {@link OpenFin.ViewEvents.ViewEvent}.
16257
+ * @deprecated Renamed to {@link EventType}.
16662
16258
  */
16663
- declare type ViewEventType = ViewEvent['type'];
16259
+ declare type ViewEventType = EventType;
16664
16260
 
16665
16261
  /**
16666
16262
  * @interface
@@ -17799,12 +17395,9 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17799
17395
  }
17800
17396
 
17801
17397
  /**
17802
- * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
17803
- * (i.e. {@link OpenFin.Window} or {@link OpenFin.View}).
17398
+ * @deprecated Renamed to {@link Event}.
17804
17399
  */
17805
- declare type WebContentsEvent<Topic extends string> = {
17806
- topic: Topic;
17807
- } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | FaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent);
17400
+ declare type WebContentsEvent<Topic extends string> = Event_5<Topic>;
17808
17401
 
17809
17402
  declare type WebContentsEvent_2<Topic extends string> = Events.WebContentsEvents.WebContentsEvent<Topic>;
17810
17403
 
@@ -17816,6 +17409,7 @@ declare namespace WebContentsEvents {
17816
17409
  CrashedEvent_2 as CrashedEvent,
17817
17410
  CertificateErrorEvent,
17818
17411
  CertificateSelectionShownEvent,
17412
+ PageFaviconUpdatedEvent,
17819
17413
  FaviconUpdatedEvent,
17820
17414
  NavigationRejectedEvent,
17821
17415
  UrlChangedEvent,
@@ -17834,6 +17428,7 @@ declare namespace WebContentsEvents {
17834
17428
  FileDownloadStartedEvent,
17835
17429
  FileDownloadProgressEvent,
17836
17430
  FileDownloadCompletedEvent,
17431
+ Event_5 as Event,
17837
17432
  WebContentsEvent,
17838
17433
  WillPropagateWebContentsEvent,
17839
17434
  NonPropagatedWebContentsEvent
@@ -17856,7 +17451,7 @@ declare namespace WebContentsEvents {
17856
17451
  * `clipboard-read`: Request access to read from the clipboard.<br>
17857
17452
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
17858
17453
  */
17859
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
17454
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
17860
17455
 
17861
17456
  /**
17862
17457
  * Object representing headers and their values, where the
@@ -17881,7 +17476,7 @@ declare type WillMoveEvent = WillMoveOrResizeEvent & {
17881
17476
  * A general will-move or will-resize event without event type.
17882
17477
  * @interface
17883
17478
  */
17884
- declare type WillMoveOrResizeEvent = BaseWindowEvent & {
17479
+ declare type WillMoveOrResizeEvent = BaseEvent_5 & {
17885
17480
  height: number;
17886
17481
  left: number;
17887
17482
  top: number;
@@ -17903,7 +17498,7 @@ declare type WillPropagateViewEvent = ViewEvent;
17903
17498
  *
17904
17499
  * A WebContents event that does propagate to (republish on) parent topics.
17905
17500
  */
17906
- declare type WillPropagateWebContentsEvent = WebContentsEvent<string>;
17501
+ declare type WillPropagateWebContentsEvent = Event_5<string>;
17907
17502
 
17908
17503
  /**
17909
17504
  * @DEPRECATED all Window events propagate, so this is redundant - left as a convenience shim to avoid breaking
@@ -17917,7 +17512,7 @@ declare type WillPropagateWindowEvent = WindowSourcedEvent;
17917
17512
  * Generated when window is being redirected as per contentRedirect allowlist/denylist rules.
17918
17513
  * @interface
17919
17514
  */
17920
- declare type WillRedirectEvent = BaseWindowEvent & {
17515
+ declare type WillRedirectEvent = BaseEvent_5 & {
17921
17516
  type: 'will-redirect';
17922
17517
  blocked: boolean;
17923
17518
  isInPlace: boolean;
@@ -17934,476 +17529,6 @@ declare type WillResizeEvent = WillMoveOrResizeEvent & {
17934
17529
  type: 'will-resize';
17935
17530
  };
17936
17531
 
17937
- /**
17938
- * @PORTED
17939
- * @typedef { object } Margins@typedef { object } Margins
17940
- * @property { string } [marginType]
17941
- * Can be `default`, `none`, `printableArea`, or `custom`. If `custom` is chosen,
17942
- * you will also need to specify `top`, `bottom`, `left`, and `right`.
17943
- *
17944
- * @property { number } [top] The top margin of the printed web page, in pixels.
17945
- * @property { number } [bottom] The bottom margin of the printed web page, in pixels.
17946
- * @property { number } [left] The left margin of the printed web page, in pixels.
17947
- * @property { number } [right] The right margin of the printed web page, in pixels.
17948
- */
17949
- /**
17950
- * @PORTED
17951
- * @typedef { object } Dpi@typedef { object } Dpi
17952
- * @property { number } [horizontal] The horizontal dpi
17953
- * @property { number } [vertical] The vertical dpi
17954
- */
17955
- /**
17956
- * @PORTED
17957
- * @typedef { object } PrintOptions@typedef { object } PrintOptions
17958
- * @property { boolean } [silent=false] Don't ask user for print settings.
17959
- * @property { boolean } [printBackground=false] Prints the background color and image of the web page.
17960
- * @property { string } [deviceName=''] Set the printer device name to use.
17961
- * @property { boolean } [color=true] Set whether the printed web page will be in color or grayscale.
17962
- * @property { Margins } [margins] Set margins for the printed web page
17963
- * @property { boolean } [landscape=false] Whether the web page should be printed in landscape mode.
17964
- * @property { number } [scaleFactor] The scale factor of the web page.
17965
- * @property { number } [pagesPerSheet] The number of pages to print per page sheet.
17966
- * @property { boolean } [collate] Whether the web page should be collated.
17967
- * @property { number } [copies] The number of copies of the web page to print.
17968
- * @property { Record<string, number> } [pageRanges] The page range to print. Should have two keys: from and to.
17969
- * @property { string } [duplexMode] Set the duplex mode of the printed web page. Can be simplex, shortEdge, or longEdge.
17970
- * @property { Dpi } [dpi] Set dpi for the printed web page
17971
- */
17972
- /**
17973
- * @REMOVED
17974
- * PrinterInfo interface
17975
- * @typedef { object } PrinterInfo@typedef { object } PrinterInfo
17976
- * @property { string } name Printer Name
17977
- * @property { string } description Printer Description
17978
- * @property { number } status Printer Status
17979
- * @property { boolean } isDefault Indicates that system's default printer
17980
- */
17981
- /**
17982
- * @REMOVED
17983
- * SharedWorkerInfo interface
17984
- * @typedef { object } SharedWorkerInfo@typedef { object } SharedWorkerInfo
17985
- * @property { string } id The unique id of the shared worker.
17986
- * @property { string } url The url of the shared worker.
17987
- */
17988
- /**
17989
- * @PORTED
17990
- * ContentCreationRule interface
17991
- * @typedef { object } ContentCreationRule@typedef { object } ContentCreationRule
17992
- * @property { string } behavior 'view' | 'window' | 'browser' | 'block'
17993
- * @property { string[] } match List of [match patterns](https://developer.chrome.com/extensions/match_patterns).
17994
- * @property { object } options Window creation options or View creation options.
17995
- */
17996
- /**
17997
- * @PORTED
17998
- * @typedef {object} Window~options
17999
- * @summary Window creation options.
18000
- * @desc This is the options object required by {@link Window.create Window.create}.
18001
- *
18002
- * Note that `name` is the only required property — albeit the `url` property is usually provided as well
18003
- * (defaults to `"about:blank"` when omitted).
18004
- *
18005
- * _This jsdoc typedef mirrors the `WindowOptions` TypeScript interface in `@types/openfin`._
18006
- *
18007
- * @property {object} [accelerator]
18008
- * Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
18009
- *
18010
- * @property {boolean} [accelerator.devtools=false]
18011
- * If `true`, enables the devtools keyboard shortcut:<br>
18012
- * `Ctrl` + `Shift` + `I` _(Toggles Devtools)_
18013
- *
18014
- * @property {boolean} [accelerator.reload=false]
18015
- * If `true`, enables the reload keyboard shortcuts:<br>
18016
- * `Ctrl` + `R` _(Windows)_<br>
18017
- * `F5` _(Windows)_<br>
18018
- * `Command` + `R` _(Mac)_
18019
- *
18020
- * @property {boolean} [accelerator.reloadIgnoringCache=false]
18021
- * If `true`, enables the reload-from-source keyboard shortcuts:<br>
18022
- * `Ctrl` + `Shift` + `R` _(Windows)_<br>
18023
- * `Shift` + `F5` _(Windows)_<br>
18024
- * `Command` + `Shift` + `R` _(Mac)_
18025
- *
18026
- * @property {boolean} [accelerator.zoom=false]
18027
- * NOTE: It is not recommended to set this value to true for Windows in Platforms as that may lead to unexpected visual shifts in layout.
18028
- * If `true`, enables the zoom keyboard shortcuts:<br>
18029
- * `Ctrl` + `+` _(Zoom In)_<br>
18030
- * `Ctrl` + `Shift` + `+` _(Zoom In)_<br>
18031
- * `Ctrl` + `NumPad+` _(Zoom In)_<br>
18032
- * `Ctrl` + `-` _(Zoom Out)_<br>
18033
- * `Ctrl` + `Shift` + `-` _(Zoom Out)_<br>
18034
- * `Ctrl` + `NumPad-` _(Zoom Out)_<br>
18035
- * `Ctrl` + `Scroll` _(Zoom In & Out)_<br>
18036
- * `Ctrl` + `0` _(Restore to 100%)_
18037
- *
18038
- * @property {object} [alphaMask] - _Experimental._ _Updatable._
18039
- * <br>
18040
- * alphaMask turns anything of matching RGB value transparent.
18041
- * <br>
18042
- * Caveats:
18043
- * * Runtime flags --disable-gpu and --allow-unsafe-compositing are required. Note: Unclear behavior on remote Desktop support
18044
- * * User cannot click-through transparent regions
18045
- * * Not supported on Mac
18046
- * * Windows Aero must be enabled
18047
- * * Won't make visual sense on Pixel-pushed environments such as Citrix
18048
- * * Not supported on rounded corner windows
18049
- * @property {number} [alphaMask.red=-1] 0-255
18050
- * @property {number} [alphaMask.green=-1] 0-255
18051
- * @property {number} [alphaMask.blue=-1] 0-255
18052
- *
18053
- * @property {boolean} [alwaysOnTop=false] - _Updatable._
18054
- * A flag to always position the window at the top of the window stack.
18055
- *
18056
- * @property {object} [api]
18057
- * Configurations for API injection.
18058
- *
18059
- * @property {object} [api.iframe] Configure if the the API should be injected into iframes based on domain.
18060
- *
18061
- * @property {boolean} [api.iframe.crossOriginInjection=false] Controls if the `fin` API object is present for cross origin iframes.
18062
- * @property {boolean} [api.iframe.sameOriginInjection=true] Controls if the `fin` API object is present for same origin iframes.
18063
- *
18064
- * @property {string} [applicationIcon = ""] - _Deprecated_ - use `icon` instead.
18065
- *
18066
- * @property {number} [aspectRatio=0] - _Updatable._
18067
- * The aspect ratio of width to height to enforce for the window. If this value is equal to or less than zero,
18068
- * an aspect ratio will not be enforced.
18069
- *
18070
- * @property {string} [autoplayPolicy="no-user-gesture-required"]
18071
- * Autoplay policy to apply to content in the window, can be
18072
- * `no-user-gesture-required`, `user-gesture-required`,
18073
- * `document-user-activation-required`. Defaults to `no-user-gesture-required`.
18074
- *
18075
- * @property {boolean} [autoShow=true]
18076
- * A flag to automatically show the window when it is created.
18077
- *
18078
- * @property {string} [backgroundColor="#FFF"]
18079
- * The window’s _backfill_ color as a hexadecimal value. Not to be confused with the content background color
18080
- * (`document.body.style.backgroundColor`),
18081
- * this color briefly fills a window’s (a) content area before its content is loaded as well as (b) newly exposed
18082
- * areas when growing a window. Setting
18083
- * this value to the anticipated content background color can help improve user experience.
18084
- * Default is white.
18085
- *
18086
- * @property {object} [contentCreation]
18087
- * Apply rules that determine how user interaction (`window.open` and links) creates content.
18088
- * @property {ContentCreationRule[]} [contentCreation.rules = []] List of content creation rules.
18089
- *
18090
- * @property {object} [contentNavigation]
18091
- * Restrict navigation to URLs that match an allowed pattern.
18092
- * In the lack of an allowlist, navigation to URLs that match a denied pattern would be prohibited.
18093
- * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
18094
- * @property {string[]} [contentNavigation.allowlist=[]] List of allowed URLs.
18095
- * @property {string[]} [contentNavigation.denylist=[]] List of denied URLs.
18096
- *
18097
- * @property {object} [contentRedirect]
18098
- * Restrict redirects to URLs that match an allowed pattern.
18099
- * In the lack of an allowlist, redirects to URLs that match a denied pattern would be prohibited.
18100
- * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
18101
- * @property {string[]} [contentRedirect.allowlist=[]] List of allowed URLs.
18102
- * @property {string[]} [contentRedirect.denylist=[]] List of denied URLs.
18103
- *
18104
- * @property {boolean} [contextMenu=true] - _Updatable._
18105
- * A flag to show the context menu when right-clicking on a window.
18106
- * Gives access to the devtools for the window.
18107
- *
18108
- * @property {object} [contextMenuSettings] - _Updatable._
18109
- * Deprecated - superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
18110
- * Configure the context menu when right-clicking on a window.
18111
- * @property {boolean} [contextMenuSettings.enable=true] Should the context menu display on right click.
18112
- * @property {boolean} [contextMenuSettings.devtools=true] Should the context menu contain a button for opening devtools.
18113
- * @property {boolean} [contextMenuSettings.reload=true] Should the context menu contain a button for reloading the page.
18114
- *
18115
- * @property {object} [contextMenuOptions] - _Updatable._
18116
- * Configure the context menu when right-clicking on a window. Supported menu items:
18117
- * 'separator'
18118
- * 'cut'
18119
- * 'copy'
18120
- * 'paste'
18121
- * 'spellCheck'
18122
- * 'inspect'
18123
- * 'reload'
18124
- * 'navigateForward'
18125
- * 'navigateBack'
18126
- * 'print'
18127
- * @property {boolean} [contextMenuOptions.enabled = true] Should the context menu display on right click.
18128
- * @property {string[]} [contextMenuSettings.template=[]] List of context menu items to display on right-click.
18129
- *
18130
- * @property {object} [cornerRounding] - _Updatable._
18131
- * Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
18132
- * average of _height_ and _width_.
18133
- * @property {number} [cornerRounding.height=0] The height in pixels.
18134
- * @property {number} [cornerRounding.width=0] The width in pixels.
18135
- *
18136
- * @property {any} [customContext=""] - _Updatable. Inheritable._
18137
- * A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
18138
- * is called. If a window in a Platform is trying to update or retrieve its own context, it can use the
18139
- * {@link Platform#setWindowContext Platform.setWindowContext} and {@link Platform#getWindowContext Platform.getWindowContext} calls.
18140
- * _When omitted, _inherits_ from the parent application._
18141
- * As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
18142
- *
18143
- * @property {any} [customData=""] - _Updatable. Inheritable._
18144
- * A field that the user can attach serializable data to be ferried around with the window options.
18145
- * _When omitted, _inherits_ from the parent application._
18146
- *
18147
- * @property {object[]} [customRequestHeaders]
18148
- * Defines list of custom headers for requests sent by the window.
18149
- * @property {string[]} [customRequestHeaders.urlPatterns=[]] The URL patterns for which the headers will be applied
18150
- * @property {object[]} [customRequestHeaders.headers=[]] Objects representing headers and their values,
18151
- * where the object key is the name of header and value at key is the value of the header
18152
- *
18153
- * @property {boolean} [closeOnLastViewRemoved=true] - _Experimental._ _Updatable._
18154
- * Toggling off would keep the Window alive even if all its Views were closed.
18155
- * This is meant for advanced users and should be used with caution.
18156
- * Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
18157
- * Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
18158
- * ** note ** - This option is ignored in non-Platforms apps.
18159
- *
18160
- * @property {boolean} [defaultCentered=false]
18161
- * Centers the window in the primary monitor. This option overrides `defaultLeft` and `defaultTop`. When `saveWindowState` is `true`,
18162
- * this value will be ignored for subsequent launches in favor of the cached value. **NOTE:** On macOS _defaultCenter_ is
18163
- * somewhat above center vertically.
18164
- *
18165
- * @property {number} [defaultHeight=500]
18166
- * The default height of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent launches
18167
- * in favor of the cached value.
18168
- *
18169
- * @property {number} [defaultLeft=100]
18170
- * The default left position of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
18171
- * launches in favor of the cached value.
18172
- *
18173
- * @property {number} [defaultTop=100]
18174
- * The default top position of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
18175
- * launches in favor of the cached value.
18176
- *
18177
- * @property {number} [defaultWidth=800]
18178
- * The default width of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
18179
- * launches in favor of the cached value.
18180
- *
18181
- * @property {boolean} [includeInSnapshots=true] - _Updatable._
18182
- * When true, the window will be be included in snapshots returned by Platform.getSnapshot(). Turning this off may be desirable when dealing with
18183
- * inherently temporary windows whose state shouldn't be preserved, such as modals, menus, or popups.
18184
- *
18185
- * @property {boolean} [frame=true] - _Updatable._
18186
- * A flag to show the frame.
18187
- *
18188
- * @hidden-property {boolean} [hideOnClose=false] - A flag to allow a window to be hidden when the close button is clicked.
18189
- *
18190
- * @property {object[]} [hotkeys=[]] - _Updatable._
18191
- * Defines the list of hotkeys that will be emitted as a `hotkey` event on the window. For usage example see [example]{@tutorial hotkeys}.
18192
- * Within Platform, OpenFin also implements a set of pre-defined actions called
18193
- * [keyboard commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}
18194
- * that can be assigned to a specific hotkey in the platform manifest.
18195
- * @property {string} hotkeys.keys The key combination of the hotkey, i.e. "Ctrl+T"
18196
- * @property {boolean} [hotkeys.preventDefault=false] Whether or not to prevent default key handling before emitting the event
18197
- *
18198
- * @property {string} [icon] - _Updatable. Inheritable._
18199
- * A URL for the icon to be shown in the window title bar and the taskbar.
18200
- * When omitted, inherits from the parent application._
18201
- * note: Window OS caches taskbar icons, therefore an icon change might only be visible after the cache is removed or the uuid is changed.
18202
- *
18203
- * @property {number} [maxHeight=-1] - _Updatable._
18204
- * The maximum height of a window. Will default to the OS defined value if set to -1.
18205
- *
18206
- * @property {boolean} [maximizable=true] - _Updatable._
18207
- * A flag that lets the window be maximized.
18208
- *
18209
- * @property {number} [maxWidth=-1] - _Updatable._
18210
- * The maximum width of a window. Will default to the OS defined value if set to -1.
18211
- *
18212
- * @property {number} [minHeight=0] - _Updatable._
18213
- * The minimum height of a window.
18214
- *
18215
- * @property {boolean} [minimizable=true] - _Updatable._
18216
- * A flag that lets the window be minimized.
18217
- *
18218
- * @property {number} [minWidth=0] - _Updatable._
18219
- * The minimum width of a window.
18220
- *
18221
- * @property {Identity} [modalParentIdentity]
18222
- * Parent identity of a modal window. It will create a modal child window when this option is set.
18223
- *
18224
- * @property {string} name
18225
- * The name of the window.
18226
- *
18227
- * @property {number} [opacity=1.0] - _Updatable._
18228
- * A flag that specifies how transparent the window will be.
18229
- * Changing opacity doesn't work on Windows 7 without Aero so setting this value will have no effect there.
18230
- * This value is clamped between `0.0` and `1.0`.
18231
- * * In software composition mode, the runtime flag --allow-unsafe-compositing is required.
18232
- *
18233
- * @property {preloadScript[]} [preloadScripts] - _Inheritable_
18234
- * A list of scripts that are eval'ed before other scripts in the page. When omitted, _inherits_
18235
- * from the parent application.
18236
- *
18237
- * @property {string} [processAffinity]
18238
- * A string to attempt to group renderers together. Will only be used if pages are on the same origin.
18239
- *
18240
- * @property {boolean} [resizable=true] - _Updatable._
18241
- * A flag to allow the user to resize the window.
18242
- *
18243
- * @property {object} [resizeRegion] - _Updatable._
18244
- * Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window.
18245
- * @property {number} [resizeRegion.bottomRightCorner=9]
18246
- * The size in pixels of an additional square resizable region located at the bottom right corner of a frameless window.
18247
- * @property {number} [resizeRegion.size=7]
18248
- * The size in pixels.
18249
- * @property {object} [resizeRegion.sides={top:true,right:true,bottom:true,left:true}]
18250
- * Sides that a window can be resized from.
18251
- *
18252
- * @property {boolean} [saveWindowState=true]
18253
- * A flag to cache the location of the window.
18254
- * ** note ** - This option is ignored in Platforms as it would cause inconsistent {@link Platform#applySnapshot applySnapshot} behavior.
18255
- *
18256
- * @property {boolean} [ignoreSavedWindowState]
18257
- * A flag to ignore previously cached state of the window. It defaults the opposite value of `saveWindowState` to maintain backwards compatibility.
18258
- *
18259
- * @property {boolean} [shadow=false]
18260
- * A flag to display a shadow on frameless windows.
18261
- * `shadow` and `cornerRounding` are mutually exclusive.
18262
- * On Windows 7, Aero theme is required.
18263
- *
18264
- * @property {boolean} [showBackgroundImages=false] - _Updatable._
18265
- * Platforms Only. If true, will show background images in the layout when the Views are hidden.
18266
- * This occurs when the window is resizing or a tab is being dragged within the layout.
18267
- *
18268
- * @property {boolean} [showTaskbarIcon=true] - _Updatable._ _Windows_.
18269
- * A flag to show the window's icon in the taskbar.
18270
- *
18271
- * @property {boolean} [smallWindow=false]
18272
- * A flag to specify a frameless window that can be be created and resized to less than 41x36 px (width x height).
18273
- * _Note: Caveats of small windows are no Aero Snap and drag to/from maximize._
18274
- * _Windows 10: Requires `maximizable` to be false. Resizing with the mouse is only possible down to 38x39 px._
18275
- *
18276
- * @property {boolean} [spellCheck=false]
18277
- * Enable spell check in input text fields for the window.
18278
- *
18279
- * @property {string} [state="normal"]
18280
- * The visible state of the window on creation.
18281
- * One of:
18282
- * * `"maximized"`
18283
- * * `"minimized"`
18284
- * * `"normal"`
18285
- *
18286
- * @property {string} [taskbarIcon=string] - Deprecated - use `icon` instead._Windows_.
18287
- *
18288
- * @property {string} [taskbarIconGroup=<application uuid>] - _Windows_.
18289
- * Specify a taskbar group for the window.
18290
- * _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
18291
- *
18292
- * @property {string} [url="about:blank"]
18293
- * The URL of the window.
18294
- *
18295
- * @property {string} [uuid=<application uuid>]
18296
- * The `uuid` of the application, unique within the set of all `Application`s running in OpenFin Runtime.
18297
- * If omitted, defaults to the `uuid` of the application spawning the window.
18298
- * If given, must match the `uuid` of the application spawning the window.
18299
- * In other words, the application's `uuid` is the only acceptable value, but is the default, so there's
18300
- * really no need to provide it.
18301
- *
18302
- * @property {boolean} [waitForPageLoad=false]
18303
- * When set to `true`, the window will not appear until the `window` object's `load` event fires.
18304
- * When set to `false`, the window will appear immediately without waiting for content to be loaded.
18305
- *
18306
- * @property {ViewVisibility} [viewVisibility]
18307
- * _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
18308
- */
18309
- /**
18310
- * @PORTED
18311
- * @typedef {Object} ViewVisibility@typedef {Object} ViewVisibility _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
18312
- * @property {ShowViewsOnWindowResize} [showViewsOnWindowResize] Enables views to be shown when a Platform Window is being resized by the user.
18313
- * @property {ShowViewsOnSplitterDrag} [showViewsOnSplitterDrag] Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
18314
- * @property {ShowViewsOnTabDrag} [showViewsOnTabDrag] _Supported on Windows Operating Systems only_. Allows views to be shown when the user is dragging a tab around a layout.
18315
- */
18316
- /**
18317
- * @PORTED
18318
- * @typedef {Object} ShowViewsOnWindowResize@typedef {Object} ShowViewsOnWindowResize _Platform Windows Only_. Enables views to be shown when a Platform Window is being resized by the user.
18319
- * @property {boolean} [enabled=false] Enables or disables showing Views when a Platform Window is being resized.
18320
- * @property {number} [paintIntervalMs=0] Number of miliseconds to wait between view repaints.
18321
- */
18322
- /**
18323
- * @REMOVED
18324
- * @typedef {Object} ShowViewsOnSplitterDrag@typedef {Object} ShowViewsOnSplitterDrag _Platform Windows Only_. Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
18325
- * @property {boolean} [enabled=false] Enables or disables showing views when the layout splitter is being dragged.
18326
- */
18327
- /**
18328
- * @REMOVED
18329
- * @typedef {Object} ShowViewsOnTabDrag@typedef {Object} ShowViewsOnTabDrag _Platform Windows Only_. Allows views to be shown when the user is manipulating the layout by repositioning a tab.
18330
- * @property {boolean} [enabled=false] Enables or disables showing views when a tab is being dragged.
18331
- */
18332
- /**
18333
- * @PORTED
18334
- * @typedef {object} CapturePageOptions@typedef {object} CapturePageOptions
18335
- * @property { Area } [area] The area of the window to be captured.
18336
- * @property { string } [format='png'] The format of the captured image. Can be 'png', 'jpg', or 'bmp'.
18337
- * @property { number } [quality=100] Number representing quality of JPEG image only. Between 0 - 100.
18338
- */
18339
- /**
18340
- * @PORTED
18341
- * @typedef { object } Area@typedef { object } Area
18342
- * @property { number } height Area's height
18343
- * @property { number } width Area's width
18344
- * @property { number } x X coordinate of area's starting point
18345
- * @property { number } y Y coordinate of area's starting point
18346
- */
18347
- /**
18348
- * @PORTED
18349
- * @typedef {object} FindInPageOptions@typedef {object} FindInPageOptions
18350
- * @property {boolean} [forward=true] Whether to search forward or backward.
18351
- * @property {boolean} [findNext=false] Whether to begin a new text finding session. Should be true for first requests, and false for subsequent requests. Defaults to false.
18352
- * @property {boolean} [matchCase=false] Whether search should be case-sensitive.
18353
- * @property {boolean} [wordStart=false] Whether to look only at the start of words.
18354
- * @property {boolean} [medialCapitalAsWordStart=false]
18355
- * When combined with wordStart, accepts a match in the middle of a word if the match begins with an uppercase letter followed by a<br>
18356
- * lowercase or non-letter. Accepts several other intra-word matches.
18357
- */
18358
- /**
18359
- * @REMOVED
18360
- * @typedef {object} Transition@typedef {object} Transition
18361
- * @property {Opacity} opacity - The Opacity transition
18362
- * @property {Position} position - The Position transition
18363
- * @property {Size} size - The Size transition
18364
- */
18365
- /**
18366
- * @PORTED
18367
- * @typedef {object} TransitionOptions@typedef {object} TransitionOptions
18368
- * @property {boolean} interrupt - This option interrupts the current animation. When false it pushes
18369
- this animation onto the end of the animation queue.
18370
- * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
18371
- */
18372
- /**
18373
- * @PORTED
18374
- * @typedef {object} Size@typedef {object} Size
18375
- * @property {number} duration - The total time in milliseconds this transition should take.
18376
- * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
18377
- * @property {number} width - Optional if height is present. Defaults to the window's current width.
18378
- * @property {number} height - Optional if width is present. Defaults to the window's current height.
18379
- */
18380
- /**
18381
- * @PORTED
18382
- * @typedef {object} Position@typedef {object} Position
18383
- * @property {number} duration - The total time in milliseconds this transition should take.
18384
- * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
18385
- * @property {number} left - Defaults to the window's current left position in virtual screen coordinates.
18386
- * @property {number} top - Defaults to the window's current top position in virtual screen coordinates.
18387
- */
18388
- /**
18389
- * @PORTED
18390
- * @typedef {object} Opacity@typedef {object} Opacity
18391
- * @property {number} duration - The total time in milliseconds this transition should take.
18392
- * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
18393
- * @property {number} opacity - This value is clamped from 0.0 to 1.0.
18394
- */
18395
- /**
18396
- * @REMOVED
18397
- * Bounds is a interface that has the properties of height,
18398
- * width, left, top which are all numbers
18399
- * @typedef { object } Bounds@typedef { object } Bounds
18400
- * @property { number } height Get the application height bound
18401
- * @property { number } width Get the application width bound
18402
- * @property { number } top Get the application top bound
18403
- * @property { number } left Get the application left bound
18404
- * @property { number } right Get the application right bound
18405
- * @property { number } bottom Get the application bottom bound
18406
- */
18407
17532
  /**
18408
17533
  * A basic window that wraps a native HTML window. Provides more fine-grained
18409
17534
  * control over the window state such as the ability to minimize, maximize, restore, etc.
@@ -18416,83 +17541,6 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
18416
17541
  * @internal
18417
17542
  */
18418
17543
  constructor(wire: Transport, identity: OpenFin_2.Identity);
18419
- /**
18420
- * Adds a listener to the end of the listeners array for the specified event.
18421
- * @param eventType - The type of the event.
18422
- * @param listener - Called whenever an event of the specified type occurs.
18423
- * @param options - Option to support event timestamps.
18424
- *
18425
- * @function addListener
18426
- * @memberof Window
18427
- * @instance
18428
- * @tutorial Window.EventEmitter
18429
- */
18430
- /**
18431
- * Adds a listener to the end of the listeners array for the specified event.
18432
- * @param eventType - The type of the event.
18433
- * @param listener - Called whenever an event of the specified type occurs.
18434
- * @param options - Option to support event timestamps.
18435
- *
18436
- * @function on
18437
- * @memberof Window
18438
- * @instance
18439
- * @tutorial Window.EventEmitter
18440
- */
18441
- /**
18442
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
18443
- * @param eventType - The type of the event.
18444
- * @param listener - The callback function.
18445
- * @param options - Option to support event timestamps.
18446
- *
18447
- * @function once
18448
- * @memberof Window
18449
- * @instance
18450
- * @tutorial Window.EventEmitter
18451
- */
18452
- /**
18453
- * Adds a listener to the beginning of the listeners array for the specified event.
18454
- * @param eventType - The type of the event.
18455
- * @param listener - The callback function.
18456
- * @param options - Option to support event timestamps.
18457
- *
18458
- * @function prependListener
18459
- * @memberof Window
18460
- * @instance
18461
- * @tutorial Window.EventEmitter
18462
- */
18463
- /**
18464
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
18465
- * The listener is added to the beginning of the listeners array.
18466
- * @param eventType - The type of the event.
18467
- * @param listener - The callback function.
18468
- * @param options - Option to support event timestamps.
18469
- *
18470
- * @function prependOnceListener
18471
- * @memberof Window
18472
- * @instance
18473
- * @tutorial Window.EventEmitter
18474
- */
18475
- /**
18476
- * Remove a listener from the listener array for the specified event.
18477
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
18478
- * @param eventType - The type of the event.
18479
- * @param listener - The callback function.
18480
- * @param options - Option to support event timestamps.
18481
- *
18482
- * @function removeListener
18483
- * @memberof Window
18484
- * @instance
18485
- * @tutorial Window.EventEmitter
18486
- */
18487
- /**
18488
- * Removes all listeners, or those of the specified event.
18489
- * @param eventType - The type of the event.
18490
- *
18491
- * @function removeAllListeners
18492
- * @memberof Window
18493
- * @instance
18494
- * @tutorial Window.EventEmitter
18495
- */
18496
17544
  /**
18497
17545
  * create a new window
18498
17546
  * @internal
@@ -19273,10 +18321,9 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
19273
18321
  show(force?: boolean): Promise<void>;
19274
18322
  /**
19275
18323
  * Shows the window if it is hidden at the specified location.
19276
- * If the toggle parameter is set to true, the window will
19277
- * alternate between showing and hiding.
19278
- * @param left The left position of the window
19279
- * @param top The right position of the window
18324
+ *
18325
+ * @param left The left position of the window in pixels
18326
+ * @param top The top position of the window in pixels
19280
18327
  * @param force Show will be prevented from closing when force is false and
19281
18328
  * ‘show-requested’ has been subscribed to for application’s main window
19282
18329
  *
@@ -19338,28 +18385,6 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
19338
18385
  * ```
19339
18386
  */
19340
18387
  authenticate(userName: string, password: string): Promise<void>;
19341
- /**
19342
- * @typedef {object} ShowPopupMenuOptions@typedef {object} ShowPopupMenuOptions
19343
- * @property {Array<MenuItemTemplate>} template - An array describing the menu to show.
19344
- * @property {number} [x] - The window x coordinate where to show the menu. Defaults to mouse position. If using must also use `y`.
19345
- * @property {number} [y] - The window y coordinate where to show the menu. Defaults to mouse position. If using must also use `x`
19346
- */
19347
- /**
19348
- * @typedef {object} MenuItemTemplate@typedef {object} MenuItemTemplate
19349
- * @property {*} data - Data to be returned if the user selects the element. Must be serializable. Large objects can have a performance impact.
19350
- * @property {'normal' | 'separator' | 'submenu' | 'checkbox'} [type] - Defaults to 'normal' unless a 'submenu' key exists
19351
- * @property {string} [label] - The text to show on the menu item. Should be left undefined for `type: 'separator'`
19352
- * @property {boolean} [enabled] - If false, the menu item will be greyed out and unclickable.
19353
- * @property {boolean} [visible] - If false, the menu item will be entirely hidden.
19354
- * @property {boolean} [checked] - Should only be specified for `checkbox` type menu items.
19355
- * @property {string} [icon] - Image Data URI with image dimensions inferred from the encoded string
19356
- * @property {Array<MenuItemTemplate>} [submenu] Should be specified for `submenu` type menu items. If `submenu` is specified, the `type: 'submenu'` can be omitted.
19357
- */
19358
- /**
19359
- * @typedef {object} MenuResult@typedef {object} MenuResult
19360
- * @property {'clicked' | 'closed'} result - Whether the user clicked on a menu item or the menu was closed (user clicked elsewhere).
19361
- * @property {* | undefined} [data] - The data property of the menu item clicked by the user. Only defined if result was `clicked`.
19362
- */
19363
18388
  /**
19364
18389
  * Shows a menu on the window.
19365
18390
  *
@@ -19456,615 +18481,565 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
19456
18481
  */
19457
18482
  closePopupMenu(): Promise<void>;
19458
18483
  /**
19459
- * @PORTED
19460
- * @typedef {object} PopupOptions@typedef {object} PopupOptions
19461
- * @property {string} [name] - If a window with this `name` exists, it will be shown as a popup. Otherwise, a new window with this `name` will be created. If this `name` is undefined, `initialOptions.name` will be used. If this `name` and `intialOptions.name` are both undefined, a `name` will be generated.
19462
- * @property {string} [url] - Navigates to this `url` if showing an existing window as a popup, otherwise the newly created window will load this `url`.
19463
- * @property {Window~options} [initialOptions] - Window creation options when using `showPopupWindow` to create a new window.
19464
- * @property {Window~options} [additionalOptions] - Updatable window options applied to new and existing windows when shown as popups.
19465
- * @property {function} [onPopupResult] - Executed when this window's popup calls `dispatchPopupResult`. Note: if this is defined, `showPopupWindow` will not return a `PopupResult`.
19466
- * @property {function} [onPopupReady] - Executed when the popup window is shown. Provides the popup window to the provided function, and allows for easy access the popup window for additional behavior customization.
19467
- * @property {number} [height] - Height of the popup window (takes priority over `intialOptions` size properties).
19468
- * @property {number} [width] - Width of the popup window (takes priority over `intialOptions` size properties).
19469
- * @property {number} [x] - Left position where the popup window will be shown (relative to the window calling `showPopupWindow`).
19470
- * @property {number} [y] - Top position where the popup window will be shown (relative to the window calling `showPopupWindow`).
19471
- * @property {'modal' | 'hide' | 'close'} [blurBehavior] - Determines what happens if the popup window is blurred. 'modal' restricts resizing and positioning in the caller, 'hide' hides the popup window on blur and 'close' closes the popup window on blur.
19472
- * @property {'none' | 'hide' | 'close'} [resultDispatchBehavior] - Determines what happens when the popup window calls `dispatchPopupResult`. 'none' will do nothing, 'hide' hides the popup window on `dispatchPopupResult` and 'close' closes the popup window on `dispatchPopupResult`.
19473
- * @property {boolean} [focus] - Determines if the popup window should or should not be focused when it is shown.
19474
- * @property {boolean} [hideOnClose] - Hide the popup window instead of closing whenever `close` is called on it. Note: if this is `true` and `blurBehavior` and/or `resultDispatchBehavior` are set to `close`, the window will be hidden.
19475
- */
19476
- /**
19477
- * @PORTED
19478
- * @typedef {object} PopupResult@typedef {object} PopupResult
19479
- * @property {Identity} identity - `name` and `uuid` of the popup window that called dispatched this result.
19480
- * @property {'clicked' | 'dismissed'} result - Result of the user interaction with the popup window.
19481
- * @property {* | undefined} [data] - Data passed to `dispatchPopupResult`.
19482
- */
19483
- /**
19484
- * Dispatch a result to the caller of `showPopupWindow`.
19485
- *
19486
- * @remarks If this window isn't currently being shown as a popup, this call will silently fail.
19487
- * @param data Serializable data to send to the caller window.
19488
- *
19489
- * @example
19490
- * ```js
19491
- * await fin.me.dispatchPopupResult({
19492
- * foo: 'bar'
19493
- * });
19494
- * ```
19495
- */
19496
- dispatchPopupResult(data: any): Promise<void>;
19497
- /**
19498
- * Prints the contents of the window.
19499
- *
19500
- * @param options Configuration for the print task.
19501
- * @remarks When `silent` is set to `true`, the API will pick the system's default printer if deviceName is empty
19502
- * and the default settings for printing.
19503
- *
19504
- * Use the CSS style `page-break-before: always;` to force print to a new page.
19505
- *
19506
- * @example
19507
- * ```js
19508
- * const win = fin.Window.getCurrentSync();
19509
- *
19510
- * win.print({ silent: false, deviceName: 'system-printer-name' }).then(() => {
19511
- * console.log('print call has been sent to the system');
19512
- * });
19513
- * ```
19514
- *
19515
- * If a window has embedded views, those views will not print by default. To print a window's contents including embedded views,
19516
- * use the `content` option:
19517
- *
19518
- * ```js
19519
- * const win = fin.Window.getCurrentSync();
19520
- *
19521
- * // Print embedded views
19522
- * win.print({ content: 'views' });
19523
- *
19524
- * // Print screenshot of current window
19525
- * win.print({ content: 'screenshot' })
19526
- * ```
19527
- *
19528
- * When `content` is set to `views`, the embedded views in the platform window will be concatenated and printed as
19529
- * individual pages. If `includeSelf` is set to `true`, the platform window itself will be printed as the first
19530
- * page - be aware that this page will *not* include the embedded views - it will only include the contents of
19531
- * the platform window itself (e.g. tab stacks), with blank spaces where the view contents would be embedded.
19532
- *
19533
- * Due to a known issue, view contents that are not visible at the time `print` is called will not appear when
19534
- * printing `contents: views`. This includes views that are obscured behind other active UI elements.
19535
- *
19536
- * To print the views embedded in their page context, set `content` to `screenshot`.
19537
- */
19538
- print(options?: OpenFin_2.WindowPrintOptions): Promise<void>;
19539
- }
19540
-
19541
- /**
19542
- * Generated when an alert is fired and suppressed due to the customWindowAlert flag being true.
19543
- * @interface
19544
- */
19545
- declare type WindowAlertRequestedEvent = BaseApplicationEvent & {
19546
- type: 'window-alert-requested';
19547
- };
19548
-
19549
- /**
19550
- * Returned from getBounds call. bottom and right are never used for setting.
19551
- * @interface
19552
- */
19553
- declare type WindowBounds = Bounds & {
19554
- bottom: number;
19555
- right: number;
19556
- };
19557
-
19558
- /**
19559
- * Generated when a window has closed.
19560
- * @interface
19561
- */
19562
- declare type WindowClosedEvent = BaseWindowEvent & {
19563
- type: 'closed';
19564
- };
19565
-
19566
- /**
19567
- * Generated when a window has been prevented from closing.
19568
- * @remarks A window will be prevented from closing by default, either through the API or by a user when ‘close-requested’ has been subscribed to and the Window.close(force) flag is false.
19569
- * @interface
19570
- */
19571
- declare type WindowCloseRequestedEvent = BaseWindowEvent & {
19572
- type: 'close-requested';
19573
- };
19574
-
19575
- /**
19576
- * Generated when a window has initiated the closing routine.
19577
- * @interface
19578
- */
19579
- declare type WindowClosingEvent = BaseWindowEvent & {
19580
- type: 'closing';
19581
- };
19582
-
19583
- /**
19584
- * A rule prescribing content creation in a {@link OpenFin.Window}.
19585
- *
19586
- * @interface
19587
- */
19588
- declare type WindowContentCreationRule = BaseContentCreationRule & {
19589
- /**
19590
- * Behavior to use when opening matched content.
19591
- */
19592
- behavior: 'window';
19593
- /**
19594
- * Options for newly-created window.
19595
- */
19596
- options?: Partial<WindowOptions>;
19597
- };
19598
-
19599
- /**
19600
- * Generated when a child window is created.
19601
- * @interface
19602
- */
19603
- declare type WindowCreatedEvent = BaseApplicationEvent & {
19604
- type: 'window-created';
19605
- };
19606
-
19607
- /**
19608
- * Options required to create a new window with {@link Window._WindowModule.create Window.create}.
19609
- *
19610
- * Note that `name` is the only required property — albeit the `url` property is usually provided as well
19611
- * (defaults to `"about:blank"` when omitted).
19612
- * @interface
19613
- */
19614
- declare type WindowCreationOptions = Partial<WindowOptions> & {
19615
- name: string;
19616
- };
19617
-
19618
- declare type WindowCreationReason = 'tearout' | 'create-view-without-target' | 'api-call' | 'app-creation' | 'restore' | 'apply-snapshot';
19619
-
19620
- /**
19621
- * @interface
19622
- */
19623
- declare type WindowDetail = {
19624
- /**
19625
- * The bottom-most coordinate of the window.
19626
- */
19627
- bottom: number;
19628
- /**
19629
- * The height of the window.
19630
- */
19631
- height: number;
19632
- isShowing: boolean;
19633
- /**
19634
- * The left-most coordinate of the window.
19635
- */
19636
- left: number;
19637
- /**
19638
- * The name of the window.
19639
- */
19640
- name: string;
19641
- /**
19642
- * The right-most coordinate of the window.
19643
- */
19644
- right: number;
19645
- state: string;
19646
- /**
19647
- * The top-most coordinate of the window.
19648
- */
19649
- top: number;
19650
- /**
19651
- * The width of the window.
19652
- */
19653
- width: number;
19654
- };
19655
-
19656
- /**
19657
- * Generated when a child window ends loading.
19658
- * @interface
19659
- */
19660
- declare type WindowEndLoadEvent = BaseApplicationEvent & {
19661
- type: 'window-end-load';
19662
- };
19663
-
19664
- /**
19665
- * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Window}. Events are
19666
- * discriminated by {@link WindowEvent.type | their type}. Event payloads unique to `Window` can be found
19667
- * under the {@link OpenFin.WindowEvents} namespace (except for {@link OpenFin.WebContentsEvents | those shared with other WebContents}).
19668
- */
19669
- declare type WindowEvent = WindowSourcedEvent | PropagatedViewEvent<'window'>;
19670
-
19671
- declare type WindowEvent_2 = Events.WindowEvents.WindowEvent;
19672
-
19673
- declare namespace WindowEvents {
19674
- export {
19675
- BaseWindowEvent,
19676
- ViewAttachedEvent,
19677
- ViewDetachedEvent,
19678
- WindowViewEvent,
19679
- AlertRequestedEvent,
19680
- AuthRequestedEvent,
19681
- EndLoadEvent,
19682
- WillRedirectEvent,
19683
- ReloadedEvent,
19684
- WindowOptionsChangedEvent_2 as WindowOptionsChangedEvent,
19685
- ExternalProcessExitedEvent,
19686
- ExternalProcessStartedEvent,
19687
- WindowHiddenEvent,
19688
- PreloadScriptInfoRunning,
19689
- PreloadScriptInfo,
19690
- PreloadScriptsStateChangeEvent,
19691
- UserBoundsChangeEvent,
19692
- BoundsChangeEvent,
19693
- WillMoveOrResizeEvent,
19694
- PerformanceReportEvent,
19695
- InputEvent_2 as InputEvent,
19696
- LayoutInitializedEvent,
19697
- LayoutReadyEvent,
19698
- BeginUserBoundsChangingEvent,
19699
- BoundsChangedEvent,
19700
- BoundsChangingEvent,
19701
- WindowCloseRequestedEvent,
19702
- ContextChangedEvent,
19703
- WindowClosedEvent,
19704
- WindowClosingEvent,
19705
- DisabledMovementBoundsChangedEvent,
19706
- DisabledMovementBoundsChangingEvent,
19707
- EmbeddedEvent,
19708
- EndUserBoundsChangingEvent,
19709
- WindowHotkeyEvent,
19710
- WindowInitializedEvent,
19711
- MaximizedEvent,
19712
- MinimizedEvent,
19713
- PreloadScriptsStateChangedEvent,
19714
- PreloadScriptsStateChangingEvent,
19715
- WindowRestoredEvent,
19716
- WindowShowRequestedEvent,
19717
- WindowShownEvent,
19718
- UserMovementEnabledEvent,
19719
- UserMovementDisabledEvent,
19720
- WillMoveEvent,
19721
- WillResizeEvent,
19722
- NonPropagatedWindowEvent,
19723
- ShowAllDownloadsEvent,
19724
- DownloadShelfVisibilityChangedEvent,
19725
- WindowSourcedEvent,
19726
- WillPropagateWindowEvent,
19727
- WindowEvent,
19728
- WindowEventType,
19729
- PropagatedWindowEvent,
19730
- PropagatedWindowEventType,
19731
- Payload_9 as Payload,
19732
- ByType_8 as ByType
19733
- }
19734
- }
19735
-
19736
- /**
19737
- * Union of possible `type` values for a {@link OpenFin.WindowEvents.WindowEvent}.
19738
- */
19739
- declare type WindowEventType = WindowEvent['type'];
19740
-
19741
- /**
19742
- * Generated when a window has been hidden.
19743
- * @interface
19744
- */
19745
- declare type WindowHiddenEvent = BaseWindowEvent & {
19746
- type: 'hidden';
19747
- reason: 'closing' | 'hide' | 'hide-on-close';
19748
- };
19749
-
19750
- /**
19751
- * Generated when a keyboard shortcut defined in the `hotkeys` array in [Window options](OpenFin.WindowOptions.html) is pressed inside the window.
19752
- * @remarks For reference on keyboard event properties see [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent).
19753
- * @interface
19754
- */
19755
- declare type WindowHotkeyEvent = InputEvent_2 & BaseWindowEvent & {
19756
- type: 'hotkey';
19757
- };
19758
-
19759
- /**
19760
- * @interface
19761
- */
19762
- declare type WindowInfo = {
19763
- canNavigateBack: boolean;
19764
- canNavigateForward: boolean;
19765
- preloadScripts: Array<any>;
19766
- title: string;
19767
- url: string;
19768
- };
19769
-
19770
- /**
19771
- * Generated when a window is initialized.
19772
- * @interface
19773
- */
19774
- declare type WindowInitializedEvent = BaseWindowEvent & {
19775
- type: 'initialized';
19776
- };
19777
-
19778
- /**
19779
- * Static namespace for OpenFin API methods that interact with the {@link _Window} class, available under `fin.Window`.
19780
- */
19781
- declare class _WindowModule extends Base {
19782
- /**
19783
- * Asynchronously returns a Window object that represents an existing window.
19784
- *
19785
- * @example
19786
- * ```js
19787
- * async function createWin() {
19788
- * const app = await fin.Application.start({
19789
- * name: 'myApp',
19790
- * uuid: 'app-1',
19791
- * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.wrap.html',
19792
- * autoShow: true
19793
- * });
19794
- * return await app.getWindow();
19795
- * }
19796
- * createWin().then(() => fin.Window.wrap({ uuid: 'app-1', name: 'myApp' }))
19797
- * .then(win => console.log('wrapped window'))
19798
- * .catch(err => console.log(err));
19799
- * ```
19800
- */
19801
- wrap(identity: OpenFin_2.Identity): Promise<OpenFin_2.Window>;
19802
- /**
19803
- * Synchronously returns a Window object that represents an existing window.
19804
- *
19805
- * @example
19806
- * ```js
19807
- * async function createWin() {
19808
- * const app = await fin.Application.start({
19809
- * name: 'myApp',
19810
- * uuid: 'app-1',
19811
- * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.wrapSync.html',
19812
- * autoShow: true
19813
- * });
19814
- * return await app.getWindow();
19815
- * }
19816
- * await createWin();
19817
- * let win = fin.Window.wrapSync({ uuid: 'app-1', name: 'myApp' });
19818
- * ```
19819
- */
19820
- wrapSync(identity: OpenFin_2.Identity): OpenFin_2.Window;
19821
- /**
19822
- * Creates a new Window.
19823
- * @param options - Window creation options
19824
- *
19825
- * @example
19826
- * ```js
19827
- * async function createWindow() {
19828
- * const winOption = {
19829
- * name:'child',
19830
- * defaultWidth: 300,
19831
- * defaultHeight: 300,
19832
- * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.create.html',
19833
- * frame: true,
19834
- * autoShow: true
19835
- * };
19836
- * return await fin.Window.create(winOption);
19837
- * }
19838
- *
19839
- * createWindow().then(() => console.log('Window is created')).catch(err => console.log(err));
19840
- * ```
19841
- */
19842
- create(options: OpenFin_2.WindowCreationOptions): Promise<OpenFin_2.Window>;
19843
- /**
19844
- * Asynchronously returns a Window object that represents the current window
19845
- *
19846
- * @example
19847
- * ```js
19848
- * fin.Window.getCurrent()
19849
- * .then(wnd => console.log('current window'))
19850
- * .catch(err => console.log(err));
19851
- *
19852
- * ```
19853
- */
19854
- getCurrent(): Promise<OpenFin_2.Window>;
19855
- /**
19856
- * Synchronously returns a Window object that represents the current window
19857
- *
19858
- * @example
19859
- * ```js
19860
- * const wnd = fin.Window.getCurrentSync();
19861
- * const info = await wnd.getInfo();
19862
- * console.log(info);
19863
- *
19864
- * ```
19865
- */
19866
- getCurrentSync(): OpenFin_2.Window;
19867
- }
19868
-
19869
- /**
19870
- * Generated when a child window is not responding.
19871
- * @interface
19872
- */
19873
- declare type WindowNotRespondingEvent = BaseApplicationEvent & {
19874
- type: 'window-not-responding';
19875
- };
19876
-
19877
- /**
19878
- * @interface
19879
- */
19880
- declare type WindowOptionDiff = {
19881
- [key in keyof WindowOptions]: {
19882
- oldVal: WindowOptions[key];
19883
- newVal: WindowOptions[key];
19884
- };
19885
- };
19886
-
19887
- /**
19888
- * @interface
19889
- */
19890
- declare type WindowOptions = MutableWindowOptions & ConstWindowOptions;
19891
-
19892
- declare type WindowOptionsChangedEvent = OpenFin_2.WindowEvents.WindowOptionsChangedEvent;
19893
-
19894
- /**
19895
- * Generated after window options are changed using the window.updateOptions method.
19896
- * @remarks Will not fire if the diff object is empty.
19897
- * @interface
19898
- */
19899
- declare type WindowOptionsChangedEvent_2 = BaseWindowEvent & {
19900
- type: 'options-changed';
19901
- options: OpenFin_2.WindowOptions;
19902
- diff: OpenFin_2.WindowOptionDiff;
19903
- };
19904
-
19905
- declare type WindowPrintOptions = PrintOptions | ScreenshotPrintOptions | WindowViewsPrintOptions;
19906
-
19907
- /**
19908
- * Generated when a child window is responding.
19909
- * @interface
19910
- */
19911
- declare type WindowRespondingEvent = BaseApplicationEvent & {
19912
- type: 'window-responding';
19913
- };
19914
-
19915
- /**
19916
- * Generated when a window is displayed after having been minimized or when a window leaves the maximize state without minimizing.
19917
- * @interface
19918
- */
19919
- declare type WindowRestoredEvent = BaseWindowEvent & {
19920
- type: 'restored';
19921
- };
19922
-
19923
- /**
19924
- * Generated when a hidden window has been shown.
19925
- * @interface
19926
- */
19927
- declare type WindowShownEvent = BaseWindowEvent & {
19928
- type: 'shown';
19929
- };
19930
-
19931
- /**
19932
- * Generated when a window has been prevented from showing.
19933
- * @remarks A window will be prevented from showing by default, either through the API or by a user when ‘show-requested’ has been subscribed to on the window or 'window-show-requested' on the parent application and the Window.show(force) flag is false.
19934
- * @interface
19935
- */
19936
- declare type WindowShowRequestedEvent = BaseWindowEvent & {
19937
- type: 'show-requested';
19938
- };
19939
-
19940
- /**
19941
- * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
19942
- * from {@link OpenFin.ViewEvents}.
19943
- */
19944
- declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent | DownloadShelfVisibilityChangedEvent;
19945
-
19946
- /**
19947
- * Generated when a child window starts loading.
19948
- * @interface
19949
- */
19950
- declare type WindowStartLoadEvent = BaseApplicationEvent & {
19951
- type: 'window-start-load';
19952
- };
19953
-
19954
- /**
19955
- * Visibility state of a window.
19956
- */
19957
- declare type WindowState = 'maximized' | 'minimized' | 'normal';
19958
-
19959
- /**
19960
- * A view-related event that fires natively on the `Window` topic. This means that these events *do* propagate
19961
- * to the `Application` level, with the name pattern `window-view-eventname`.
19962
- */
19963
- declare type WindowViewEvent = {
19964
- viewIdentity: OpenFin_2.Identity;
19965
- } & (ViewAttachedEvent | ViewDetachedEvent);
19966
-
19967
- /**
19968
- * @interface
19969
- */
19970
- declare type WindowViewsPrintOptions = {
19971
- content: 'views';
19972
- includeSelf?: boolean;
19973
- };
19974
-
19975
- declare type Wire = EventEmitter & {
19976
- connect(messageReciever: MessageReceiver): Promise<any>;
19977
- connectSync(): any;
19978
- send(data: any): Promise<any>;
19979
- shutdown(): Promise<void>;
19980
- getPort(): string;
19981
- };
19982
-
19983
- declare type WireConstructor = {
19984
- new (onmessage: (data: any) => void): Wire;
19985
- };
19986
-
19987
- /**
19988
- * @internal
19989
- */
19990
- declare type WithId<T extends AppVersionEventType> = `${T}.${string}`;
19991
-
19992
- declare interface WithInterop {
19993
- interop: InteropClient;
19994
- }
19995
-
19996
- /**
19997
- * @internal
19998
- */
19999
- declare type WithoutId<T extends string> = T extends WithId<infer U> ? U : never;
20000
-
20001
- declare type WithPositioningOptions<T extends {} = {}> = T & {
20002
- positioningOptions?: OpenFin_2.PositioningOptions;
20003
- };
20004
-
20005
- /**
20006
- * @internal
20007
- * @interface
20008
- */
20009
- declare type WorkspacePlatformOptions = {
20010
- /** Leaving this as any for now until we figure out what the shape should look like in Workspace */
20011
- [key: string]: any;
20012
- };
20013
-
20014
- /**
20015
- * A generic request to write any supported data to the clipboard.
20016
- * @interface
20017
- */
20018
- declare type WriteAnyClipboardRequest = BaseClipboardRequest & {
20019
- /**
20020
- * Data to be written
20021
- */
20022
- data: {
20023
- text?: string;
20024
- html?: string;
20025
- rtf?: string;
20026
- } & Partial<Pick<WriteImageClipboardRequest, 'image'>>;
20027
- };
20028
-
20029
- /**
20030
- * @deprecated - instead use WriteAnyClipboardRequest
20031
- *
20032
- * A generic request to write any supported data to the clipboard.
20033
- *
20034
- * @interface
20035
- */
20036
- declare type WriteAnyRequestType = WriteAnyClipboardRequest;
20037
-
20038
- /**
20039
- * A request to write data to the clipboard.
20040
- * @interface
20041
- */
20042
- declare type WriteClipboardRequest = BaseClipboardRequest & {
20043
- /**
20044
- * Data to write to the clipboard.
20045
- */
20046
- data: string;
20047
- };
20048
-
20049
- /**
20050
- * @interface
20051
- */
20052
- declare type WriteImageClipboardRequest = BaseClipboardRequest & {
20053
- /**
20054
- * Can be either a base64 string, or a DataURL string. If using DataURL, the
20055
- * supported formats are `data:image/png[;base64],` and `data:image/jpeg[;base64],`.
20056
- * Using other image/<format> DataURLs will throw an Error.
20057
- */
20058
- image: string;
20059
- };
20060
-
20061
- /**
20062
- * @deprecated - instead use OpenFin.WriteClipboardRequest
20063
- *
20064
- * A request to write data to the clipboard.
20065
- *
20066
- * @interface
20067
- */
20068
- declare type WriteRequestType = WriteClipboardRequest;
20069
-
20070
- export { }
18484
+ * Dispatch a result to the caller of `showPopupWindow`.
18485
+ *
18486
+ * @remarks If this window isn't currently being shown as a popup, this call will silently fail.
18487
+ * @param data Serializable data to send to the caller window.
18488
+ *
18489
+ * @example
18490
+ * ```js
18491
+ * await fin.me.dispatchPopupResult({
18492
+ * foo: 'bar'
18493
+ * });
18494
+ * ```
18495
+ */
18496
+ dispatchPopupResult(data: any): Promise<void>;
18497
+ /**
18498
+ * Prints the contents of the window.
18499
+ *
18500
+ * @param options Configuration for the print task.
18501
+ * @remarks When `silent` is set to `true`, the API will pick the system's default printer if deviceName is empty
18502
+ * and the default settings for printing.
18503
+ *
18504
+ * Use the CSS style `page-break-before: always;` to force print to a new page.
18505
+ *
18506
+ * @example
18507
+ * ```js
18508
+ * const win = fin.Window.getCurrentSync();
18509
+ *
18510
+ * win.print({ silent: false, deviceName: 'system-printer-name' }).then(() => {
18511
+ * console.log('print call has been sent to the system');
18512
+ * });
18513
+ * ```
18514
+ *
18515
+ * If a window has embedded views, those views will not print by default. To print a window's contents including embedded views,
18516
+ * use the `content` option:
18517
+ *
18518
+ * ```js
18519
+ * const win = fin.Window.getCurrentSync();
18520
+ *
18521
+ * // Print embedded views
18522
+ * win.print({ content: 'views' });
18523
+ *
18524
+ * // Print screenshot of current window
18525
+ * win.print({ content: 'screenshot' })
18526
+ * ```
18527
+ *
18528
+ * When `content` is set to `views`, the embedded views in the platform window will be concatenated and printed as
18529
+ * individual pages. If `includeSelf` is set to `true`, the platform window itself will be printed as the first
18530
+ * page - be aware that this page will *not* include the embedded views - it will only include the contents of
18531
+ * the platform window itself (e.g. tab stacks), with blank spaces where the view contents would be embedded.
18532
+ *
18533
+ * Due to a known issue, view contents that are not visible at the time `print` is called will not appear when
18534
+ * printing `contents: views`. This includes views that are obscured behind other active UI elements.
18535
+ *
18536
+ * To print the views embedded in their page context, set `content` to `screenshot`.
18537
+ */
18538
+ print(options?: OpenFin_2.WindowPrintOptions): Promise<void>;
18539
+ }
18540
+
18541
+ /**
18542
+ * Generated when an alert is fired and suppressed due to the customWindowAlert flag being true.
18543
+ * @interface
18544
+ */
18545
+ declare type WindowAlertRequestedEvent = BaseEvent_3 & {
18546
+ type: 'window-alert-requested';
18547
+ };
18548
+
18549
+ /**
18550
+ * Returned from getBounds call. bottom and right are never used for setting.
18551
+ * @interface
18552
+ */
18553
+ declare type WindowBounds = Bounds & {
18554
+ bottom: number;
18555
+ right: number;
18556
+ };
18557
+
18558
+ /**
18559
+ * @deprecated Renamed to {@link ClosedEvent}.
18560
+ */
18561
+ declare type WindowClosedEvent = ClosedEvent_2;
18562
+
18563
+ /**
18564
+ * @deprecated Renamed to {@link CloseRequestedEvent}.
18565
+ */
18566
+ declare type WindowCloseRequestedEvent = CloseRequestedEvent;
18567
+
18568
+ /**
18569
+ * @deprecated Renamed to {@link ClosingEvent}.
18570
+ */
18571
+ declare type WindowClosingEvent = ClosingEvent;
18572
+
18573
+ /**
18574
+ * A rule prescribing content creation in a {@link OpenFin.Window}.
18575
+ *
18576
+ * @interface
18577
+ */
18578
+ declare type WindowContentCreationRule = BaseContentCreationRule & {
18579
+ /**
18580
+ * Behavior to use when opening matched content.
18581
+ */
18582
+ behavior: 'window';
18583
+ /**
18584
+ * Options for newly-created window.
18585
+ */
18586
+ options?: Partial<WindowOptions>;
18587
+ };
18588
+
18589
+ /**
18590
+ * Generated when a child window is created.
18591
+ * @interface
18592
+ */
18593
+ declare type WindowCreatedEvent = BaseEvent_3 & {
18594
+ type: 'window-created';
18595
+ };
18596
+
18597
+ /**
18598
+ * Options required to create a new window with {@link Window._WindowModule.create Window.create}.
18599
+ *
18600
+ * Note that `name` is the only required property — albeit the `url` property is usually provided as well
18601
+ * (defaults to `"about:blank"` when omitted).
18602
+ * @interface
18603
+ */
18604
+ declare type WindowCreationOptions = Partial<WindowOptions> & {
18605
+ name: string;
18606
+ };
18607
+
18608
+ declare type WindowCreationReason = 'tearout' | 'create-view-without-target' | 'api-call' | 'app-creation' | 'restore' | 'apply-snapshot';
18609
+
18610
+ /**
18611
+ * @interface
18612
+ */
18613
+ declare type WindowDetail = {
18614
+ /**
18615
+ * The bottom-most coordinate of the window.
18616
+ */
18617
+ bottom: number;
18618
+ /**
18619
+ * The height of the window.
18620
+ */
18621
+ height: number;
18622
+ isShowing: boolean;
18623
+ /**
18624
+ * The left-most coordinate of the window.
18625
+ */
18626
+ left: number;
18627
+ /**
18628
+ * The name of the window.
18629
+ */
18630
+ name: string;
18631
+ /**
18632
+ * The right-most coordinate of the window.
18633
+ */
18634
+ right: number;
18635
+ state: string;
18636
+ /**
18637
+ * The top-most coordinate of the window.
18638
+ */
18639
+ top: number;
18640
+ /**
18641
+ * The width of the window.
18642
+ */
18643
+ width: number;
18644
+ };
18645
+
18646
+ /**
18647
+ * Generated when a child window ends loading.
18648
+ * @interface
18649
+ */
18650
+ declare type WindowEndLoadEvent = BaseEvent_3 & {
18651
+ type: 'window-end-load';
18652
+ };
18653
+
18654
+ /**
18655
+ * @deprecated, Renamed to {@link Event}.
18656
+ */
18657
+ declare type WindowEvent = Event_6;
18658
+
18659
+ declare type WindowEvent_2 = Events.WindowEvents.WindowEvent;
18660
+
18661
+ declare namespace WindowEvents {
18662
+ export {
18663
+ BaseEvent_5 as BaseEvent,
18664
+ BaseWindowEvent,
18665
+ ViewAttachedEvent,
18666
+ ViewDetachedEvent,
18667
+ WindowViewEvent,
18668
+ AlertRequestedEvent,
18669
+ AuthRequestedEvent,
18670
+ EndLoadEvent,
18671
+ WillRedirectEvent,
18672
+ ReloadedEvent,
18673
+ OptionsChangedEvent,
18674
+ WindowOptionsChangedEvent_2 as WindowOptionsChangedEvent,
18675
+ ExternalProcessExitedEvent,
18676
+ ExternalProcessStartedEvent,
18677
+ HiddenEvent_2 as HiddenEvent,
18678
+ WindowHiddenEvent,
18679
+ PreloadScriptInfoRunning,
18680
+ PreloadScriptInfo,
18681
+ PreloadScriptsStateChangeEvent,
18682
+ UserBoundsChangeEvent,
18683
+ BoundsChangeEvent,
18684
+ WillMoveOrResizeEvent,
18685
+ PerformanceReportEvent,
18686
+ InputEvent_2 as InputEvent,
18687
+ LayoutInitializedEvent,
18688
+ LayoutReadyEvent,
18689
+ BeginUserBoundsChangingEvent,
18690
+ BoundsChangedEvent,
18691
+ BoundsChangingEvent,
18692
+ CloseRequestedEvent,
18693
+ WindowCloseRequestedEvent,
18694
+ ContextChangedEvent,
18695
+ ClosedEvent_2 as ClosedEvent,
18696
+ WindowClosedEvent,
18697
+ ClosingEvent,
18698
+ WindowClosingEvent,
18699
+ DisabledMovementBoundsChangedEvent,
18700
+ DisabledMovementBoundsChangingEvent,
18701
+ EmbeddedEvent,
18702
+ EndUserBoundsChangingEvent,
18703
+ HotkeyEvent_2 as HotkeyEvent,
18704
+ WindowHotkeyEvent,
18705
+ InitializedEvent_2 as InitializedEvent,
18706
+ WindowInitializedEvent,
18707
+ MaximizedEvent,
18708
+ MinimizedEvent,
18709
+ PreloadScriptsStateChangedEvent,
18710
+ PreloadScriptsStateChangingEvent,
18711
+ RestoredEvent,
18712
+ WindowRestoredEvent,
18713
+ ShowRequestedEvent,
18714
+ WindowShowRequestedEvent,
18715
+ ShownEvent_2 as ShownEvent,
18716
+ WindowShownEvent,
18717
+ UserMovementEnabledEvent,
18718
+ UserMovementDisabledEvent,
18719
+ WillMoveEvent,
18720
+ WillResizeEvent,
18721
+ NonPropagatedWindowEvent,
18722
+ ShowAllDownloadsEvent,
18723
+ DownloadShelfVisibilityChangedEvent,
18724
+ WindowSourcedEvent,
18725
+ WillPropagateWindowEvent,
18726
+ Event_6 as Event,
18727
+ WindowEvent,
18728
+ EventType_2 as EventType,
18729
+ WindowEventType,
18730
+ PropagatedEvent_3 as PropagatedEvent,
18731
+ PropagatedWindowEvent,
18732
+ PropagatedWindowEventType,
18733
+ Payload_3 as Payload,
18734
+ ByType_2 as ByType
18735
+ }
18736
+ }
18737
+
18738
+ /**
18739
+ * @deprecated Renamed to {@link EventType}.
18740
+ */
18741
+ declare type WindowEventType = WindowEvent['type'];
18742
+
18743
+ /**
18744
+ * @deprecated Renamed to {@link HiddenEvent}.
18745
+ */
18746
+ declare type WindowHiddenEvent = HiddenEvent_2;
18747
+
18748
+ /**
18749
+ * @deprecated Renamed to {@link HotkeyEvent}.
18750
+ */
18751
+ declare type WindowHotkeyEvent = HotkeyEvent_2;
18752
+
18753
+ /**
18754
+ * @interface
18755
+ */
18756
+ declare type WindowInfo = {
18757
+ canNavigateBack: boolean;
18758
+ canNavigateForward: boolean;
18759
+ preloadScripts: Array<any>;
18760
+ title: string;
18761
+ url: string;
18762
+ };
18763
+
18764
+ /**
18765
+ * @deprecated Renamed to {@link InitializedEvent}.
18766
+ */
18767
+ declare type WindowInitializedEvent = InitializedEvent_2;
18768
+
18769
+ /**
18770
+ * Static namespace for OpenFin API methods that interact with the {@link _Window} class, available under `fin.Window`.
18771
+ */
18772
+ declare class _WindowModule extends Base {
18773
+ /**
18774
+ * Asynchronously returns a Window object that represents an existing window.
18775
+ *
18776
+ * @example
18777
+ * ```js
18778
+ * async function createWin() {
18779
+ * const app = await fin.Application.start({
18780
+ * name: 'myApp',
18781
+ * uuid: 'app-1',
18782
+ * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.wrap.html',
18783
+ * autoShow: true
18784
+ * });
18785
+ * return await app.getWindow();
18786
+ * }
18787
+ * createWin().then(() => fin.Window.wrap({ uuid: 'app-1', name: 'myApp' }))
18788
+ * .then(win => console.log('wrapped window'))
18789
+ * .catch(err => console.log(err));
18790
+ * ```
18791
+ */
18792
+ wrap(identity: OpenFin_2.Identity): Promise<OpenFin_2.Window>;
18793
+ /**
18794
+ * Synchronously returns a Window object that represents an existing window.
18795
+ *
18796
+ * @example
18797
+ * ```js
18798
+ * async function createWin() {
18799
+ * const app = await fin.Application.start({
18800
+ * name: 'myApp',
18801
+ * uuid: 'app-1',
18802
+ * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.wrapSync.html',
18803
+ * autoShow: true
18804
+ * });
18805
+ * return await app.getWindow();
18806
+ * }
18807
+ * await createWin();
18808
+ * let win = fin.Window.wrapSync({ uuid: 'app-1', name: 'myApp' });
18809
+ * ```
18810
+ */
18811
+ wrapSync(identity: OpenFin_2.Identity): OpenFin_2.Window;
18812
+ /**
18813
+ * Creates a new Window.
18814
+ * @param options - Window creation options
18815
+ *
18816
+ * @example
18817
+ * ```js
18818
+ * async function createWindow() {
18819
+ * const winOption = {
18820
+ * name:'child',
18821
+ * defaultWidth: 300,
18822
+ * defaultHeight: 300,
18823
+ * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.create.html',
18824
+ * frame: true,
18825
+ * autoShow: true
18826
+ * };
18827
+ * return await fin.Window.create(winOption);
18828
+ * }
18829
+ *
18830
+ * createWindow().then(() => console.log('Window is created')).catch(err => console.log(err));
18831
+ * ```
18832
+ */
18833
+ create(options: OpenFin_2.WindowCreationOptions): Promise<OpenFin_2.Window>;
18834
+ /**
18835
+ * Asynchronously returns a Window object that represents the current window
18836
+ *
18837
+ * @example
18838
+ * ```js
18839
+ * fin.Window.getCurrent()
18840
+ * .then(wnd => console.log('current window'))
18841
+ * .catch(err => console.log(err));
18842
+ *
18843
+ * ```
18844
+ */
18845
+ getCurrent(): Promise<OpenFin_2.Window>;
18846
+ /**
18847
+ * Synchronously returns a Window object that represents the current window
18848
+ *
18849
+ * @example
18850
+ * ```js
18851
+ * const wnd = fin.Window.getCurrentSync();
18852
+ * const info = await wnd.getInfo();
18853
+ * console.log(info);
18854
+ *
18855
+ * ```
18856
+ */
18857
+ getCurrentSync(): OpenFin_2.Window;
18858
+ }
18859
+
18860
+ /**
18861
+ * Generated when a child window is not responding.
18862
+ * @interface
18863
+ */
18864
+ declare type WindowNotRespondingEvent = BaseEvent_3 & {
18865
+ type: 'window-not-responding';
18866
+ };
18867
+
18868
+ /**
18869
+ * @interface
18870
+ */
18871
+ declare type WindowOptionDiff = {
18872
+ [key in keyof WindowOptions]: {
18873
+ oldVal: WindowOptions[key];
18874
+ newVal: WindowOptions[key];
18875
+ };
18876
+ };
18877
+
18878
+ /**
18879
+ * @interface
18880
+ */
18881
+ declare type WindowOptions = MutableWindowOptions & ConstWindowOptions;
18882
+
18883
+ declare type WindowOptionsChangedEvent = OpenFin_2.WindowEvents.WindowOptionsChangedEvent;
18884
+
18885
+ /**
18886
+ * @deprecated Renamed to {@link OptionsChangedEvent}.
18887
+ */
18888
+ declare type WindowOptionsChangedEvent_2 = OptionsChangedEvent;
18889
+
18890
+ declare type WindowPrintOptions = PrintOptions | ScreenshotPrintOptions | WindowViewsPrintOptions;
18891
+
18892
+ /**
18893
+ * Generated when a child window is responding.
18894
+ * @interface
18895
+ */
18896
+ declare type WindowRespondingEvent = BaseEvent_3 & {
18897
+ type: 'window-responding';
18898
+ };
18899
+
18900
+ /**
18901
+ * @deprecated Renamed to {@link RestoredEvent}.
18902
+ */
18903
+ declare type WindowRestoredEvent = RestoredEvent;
18904
+
18905
+ /**
18906
+ * @deprecated Renamed to {@link ShownEvent}.
18907
+ */
18908
+ declare type WindowShownEvent = ShownEvent_2;
18909
+
18910
+ /**
18911
+ * @deprecated Renamed to {@link ShowRequestedEvent}.
18912
+ */
18913
+ declare type WindowShowRequestedEvent = ShowRequestedEvent;
18914
+
18915
+ /**
18916
+ * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
18917
+ * from {@link OpenFin.ViewEvents}.
18918
+ */
18919
+ declare type WindowSourcedEvent = WebContentsEvents.Event<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | CloseRequestedEvent | ClosedEvent_2 | ClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | HiddenEvent_2 | HotkeyEvent_2 | InitializedEvent_2 | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | OptionsChangedEvent | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | RestoredEvent | ShowRequestedEvent | ShownEvent_2 | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent | DownloadShelfVisibilityChangedEvent;
18920
+
18921
+ /**
18922
+ * Generated when a child window starts loading.
18923
+ * @interface
18924
+ */
18925
+ declare type WindowStartLoadEvent = BaseEvent_3 & {
18926
+ type: 'window-start-load';
18927
+ };
18928
+
18929
+ /**
18930
+ * Visibility state of a window.
18931
+ */
18932
+ declare type WindowState = 'maximized' | 'minimized' | 'normal';
18933
+
18934
+ /**
18935
+ * A view-related event that fires natively on the `Window` topic. This means that these events *do* propagate
18936
+ * to the `Application` level, with the name pattern `window-view-eventname`.
18937
+ */
18938
+ declare type WindowViewEvent = {
18939
+ viewIdentity: OpenFin_2.Identity;
18940
+ } & (ViewAttachedEvent | ViewDetachedEvent);
18941
+
18942
+ /**
18943
+ * @interface
18944
+ */
18945
+ declare type WindowViewsPrintOptions = {
18946
+ content: 'views';
18947
+ includeSelf?: boolean;
18948
+ };
18949
+
18950
+ declare type Wire = EventEmitter & {
18951
+ connect(messageReciever: MessageReceiver): Promise<any>;
18952
+ connectSync(): any;
18953
+ send(data: any): Promise<any>;
18954
+ shutdown(): Promise<void>;
18955
+ getPort(): string;
18956
+ };
18957
+
18958
+ declare type WireConstructor = {
18959
+ new (onmessage: (data: any) => void): Wire;
18960
+ };
18961
+
18962
+ /**
18963
+ * @internal
18964
+ */
18965
+ declare type WithId<T extends AppVersionEventType> = `${T}.${string}`;
18966
+
18967
+ declare interface WithInterop {
18968
+ interop: InteropClient;
18969
+ }
18970
+
18971
+ /**
18972
+ * @internal
18973
+ */
18974
+ declare type WithoutId<T extends string> = T extends WithId<infer U> ? U : never;
18975
+
18976
+ declare type WithPositioningOptions<T extends {} = {}> = T & {
18977
+ positioningOptions?: OpenFin_2.PositioningOptions;
18978
+ };
18979
+
18980
+ /**
18981
+ * @internal
18982
+ * @interface
18983
+ */
18984
+ declare type WorkspacePlatformOptions = {
18985
+ /** Leaving this as any for now until we figure out what the shape should look like in Workspace */
18986
+ [key: string]: any;
18987
+ };
18988
+
18989
+ /**
18990
+ * A generic request to write any supported data to the clipboard.
18991
+ * @interface
18992
+ */
18993
+ declare type WriteAnyClipboardRequest = BaseClipboardRequest & {
18994
+ /**
18995
+ * Data to be written
18996
+ */
18997
+ data: {
18998
+ text?: string;
18999
+ html?: string;
19000
+ rtf?: string;
19001
+ } & Partial<Pick<WriteImageClipboardRequest, 'image'>>;
19002
+ };
19003
+
19004
+ /**
19005
+ * @deprecated - instead use WriteAnyClipboardRequest
19006
+ *
19007
+ * A generic request to write any supported data to the clipboard.
19008
+ *
19009
+ * @interface
19010
+ */
19011
+ declare type WriteAnyRequestType = WriteAnyClipboardRequest;
19012
+
19013
+ /**
19014
+ * A request to write data to the clipboard.
19015
+ * @interface
19016
+ */
19017
+ declare type WriteClipboardRequest = BaseClipboardRequest & {
19018
+ /**
19019
+ * Data to write to the clipboard.
19020
+ */
19021
+ data: string;
19022
+ };
19023
+
19024
+ /**
19025
+ * @interface
19026
+ */
19027
+ declare type WriteImageClipboardRequest = BaseClipboardRequest & {
19028
+ /**
19029
+ * Can be either a base64 string, or a DataURL string. If using DataURL, the
19030
+ * supported formats are `data:image/png[;base64],` and `data:image/jpeg[;base64],`.
19031
+ * Using other image/<format> DataURLs will throw an Error.
19032
+ */
19033
+ image: string;
19034
+ };
19035
+
19036
+ /**
19037
+ * @deprecated - instead use OpenFin.WriteClipboardRequest
19038
+ *
19039
+ * A request to write data to the clipboard.
19040
+ *
19041
+ * @interface
19042
+ */
19043
+ declare type WriteRequestType = WriteClipboardRequest;
19044
+
19045
+ export { }