@openfin/core 30.73.28 → 31.74.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/LICENSE.md +4 -0
  2. package/package.json +2 -2
  3. package/src/OpenFin.d.ts +1929 -407
  4. package/src/OpenFin.js +0 -2
  5. package/src/api/api-exposer/api-consumer.d.ts +28 -0
  6. package/src/api/api-exposer/api-consumer.js +28 -0
  7. package/src/api/api-exposer/api-exposer.d.ts +35 -0
  8. package/src/api/api-exposer/api-exposer.js +38 -0
  9. package/src/api/api-exposer/decorators.d.ts +10 -0
  10. package/src/api/api-exposer/decorators.js +18 -0
  11. package/src/api/api-exposer/index.d.ts +4 -0
  12. package/src/api/api-exposer/index.js +20 -0
  13. package/src/api/api-exposer/strategies/index.d.ts +1 -0
  14. package/src/api/api-exposer/strategies/index.js +17 -0
  15. package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.d.ts +14 -0
  16. package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.js +20 -0
  17. package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.d.ts +20 -0
  18. package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.js +23 -0
  19. package/src/api/api-exposer/strategies/openfin-channels/index.d.ts +2 -0
  20. package/src/api/api-exposer/strategies/openfin-channels/index.js +18 -0
  21. package/src/api/application/Factory.d.ts +1 -0
  22. package/src/api/application/Factory.js +2 -2
  23. package/src/api/application/Instance.d.ts +2 -1
  24. package/src/api/application/Instance.js +1 -0
  25. package/src/api/base.d.ts +4 -4
  26. package/src/api/clipboard/index.d.ts +1 -0
  27. package/src/api/clipboard/index.js +1 -0
  28. package/src/api/events/application.d.ts +22 -22
  29. package/src/api/events/base.d.ts +6 -9
  30. package/src/api/events/channel.d.ts +5 -5
  31. package/src/api/events/emitterMap.d.ts +1 -1
  32. package/src/api/events/externalApplication.d.ts +3 -3
  33. package/src/api/events/frame.d.ts +5 -5
  34. package/src/api/events/globalHotkey.d.ts +3 -3
  35. package/src/api/events/platform.d.ts +6 -7
  36. package/src/api/events/system.d.ts +20 -21
  37. package/src/api/events/typedEventEmitter.d.ts +1 -1
  38. package/src/api/events/view.d.ts +17 -14
  39. package/src/api/events/webcontents.d.ts +40 -18
  40. package/src/api/events/window.d.ts +65 -57
  41. package/src/api/external-application/Instance.d.ts +1 -1
  42. package/src/api/fin.d.ts +2 -2
  43. package/src/api/frame/Instance.d.ts +2 -2
  44. package/src/api/global-hotkey/index.d.ts +1 -1
  45. package/src/api/interappbus/channel/channel.d.ts +5 -5
  46. package/src/api/interappbus/channel/channel.js +3 -3
  47. package/src/api/interappbus/channel/channels-docs.d.ts +7 -0
  48. package/src/api/interappbus/channel/channels-docs.js +7 -0
  49. package/src/api/interappbus/channel/client.d.ts +5 -4
  50. package/src/api/interappbus/channel/client.js +24 -17
  51. package/src/api/interappbus/channel/connection-manager.d.ts +2 -2
  52. package/src/api/interappbus/channel/connection-manager.js +12 -12
  53. package/src/api/interappbus/channel/index.d.ts +3 -3
  54. package/src/api/interappbus/channel/index.js +6 -8
  55. package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +1 -1
  56. package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +2 -2
  57. package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +2 -2
  58. package/src/api/interappbus/channel/protocols/combined/strategy.js +5 -5
  59. package/src/api/interappbus/channel/protocols/index.d.ts +7 -4
  60. package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +1 -1
  61. package/src/api/interappbus/channel/protocols/rtc/endpoint.js +10 -2
  62. package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +1 -1
  63. package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +1 -1
  64. package/src/api/interappbus/channel/protocols/rtc/strategy.js +1 -1
  65. package/src/api/interappbus/channel/protocols/strategy-types.d.ts +4 -4
  66. package/src/api/interappbus/channel/protocols/strategy.d.ts +3 -3
  67. package/src/api/interappbus/channel/provider.d.ts +6 -6
  68. package/src/api/interappbus/channel/provider.js +24 -24
  69. package/src/api/interappbus/index.d.ts +1 -1
  70. package/src/api/interop/Factory.d.ts +1 -2
  71. package/src/api/interop/Factory.js +20 -4
  72. package/src/api/interop/InteropBroker.d.ts +16 -48
  73. package/src/api/interop/InteropBroker.js +38 -48
  74. package/src/api/interop/InteropClient.d.ts +10 -9
  75. package/src/api/interop/InteropClient.js +9 -8
  76. package/src/api/interop/SessionContextGroupClient.d.ts +1 -1
  77. package/src/api/interop/fdc3/PrivateChannelClient.d.ts +2 -1
  78. package/src/api/interop/fdc3/PrivateChannelClient.js +15 -7
  79. package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +16 -2
  80. package/src/api/interop/fdc3/PrivateChannelProvider.js +80 -21
  81. package/src/api/interop/fdc3/fdc3-1.2.js +27 -12
  82. package/src/api/interop/fdc3/fdc3-2.0.d.ts +13 -12
  83. package/src/api/interop/fdc3/fdc3-2.0.js +33 -26
  84. package/src/api/interop/fdc3/fdc3.d.ts +4 -5
  85. package/src/api/interop/fdc3/overrideCheck.d.ts +4 -0
  86. package/src/api/interop/fdc3/overrideCheck.js +32 -0
  87. package/src/api/interop/fdc3/shapes/fdc3v1.d.ts +3 -3
  88. package/src/api/interop/fdc3/shapes/fdc3v2.d.ts +5 -5
  89. package/src/api/interop/fdc3/utils.d.ts +17 -0
  90. package/src/api/interop/fdc3/utils.js +52 -18
  91. package/src/api/interop/fdc3/versions.d.ts +1 -0
  92. package/src/api/interop/fdc3/versions.js +2 -0
  93. package/src/api/interop/utils.d.ts +0 -1
  94. package/src/api/interop/utils.js +1 -9
  95. package/src/api/me.d.ts +4 -4
  96. package/src/api/platform/Factory.d.ts +6 -1
  97. package/src/api/platform/Factory.js +10 -9
  98. package/src/api/platform/Instance.d.ts +5 -3
  99. package/src/api/platform/Instance.js +5 -3
  100. package/src/api/platform/common-utils.d.ts +1 -1
  101. package/src/api/platform/layout/Factory.d.ts +5 -1
  102. package/src/api/platform/layout/Factory.js +15 -3
  103. package/src/api/platform/layout/Instance.d.ts +10 -4
  104. package/src/api/platform/layout/Instance.js +26 -1
  105. package/src/api/platform/layout/controllers/layout-content-cache.d.ts +9 -0
  106. package/src/api/platform/layout/controllers/layout-content-cache.js +54 -0
  107. package/src/api/platform/layout/controllers/layout-entities-controller.d.ts +117 -0
  108. package/src/api/platform/layout/controllers/layout-entities-controller.js +270 -0
  109. package/src/api/platform/layout/controllers/splitter-controller.d.ts +1 -1
  110. package/src/api/platform/layout/entities/layout-entities.d.ts +144 -0
  111. package/src/api/platform/layout/entities/layout-entities.js +216 -0
  112. package/src/api/platform/layout/entities/shapes.d.ts +6 -0
  113. package/src/api/platform/layout/entities/shapes.js +2 -0
  114. package/src/api/platform/layout/layout.constants.d.ts +1 -0
  115. package/src/api/platform/layout/layout.constants.js +4 -0
  116. package/src/api/platform/layout/shapes.d.ts +4 -1
  117. package/src/api/platform/layout/utils/layout-traversal.d.ts +4 -0
  118. package/src/api/platform/layout/utils/layout-traversal.js +65 -0
  119. package/src/api/platform/layout/utils/view-overlay.d.ts +1 -1
  120. package/src/api/platform/provider.d.ts +162 -0
  121. package/src/api/platform/provider.js +2 -0
  122. package/src/api/snapshot-source/Factory.d.ts +1 -0
  123. package/src/api/snapshot-source/Factory.js +1 -0
  124. package/src/api/snapshot-source/Instance.d.ts +1 -1
  125. package/src/api/system/index.d.ts +14 -484
  126. package/src/api/system/index.js +6 -476
  127. package/src/api/view/Instance.d.ts +20 -6
  128. package/src/api/view/Instance.js +48 -8
  129. package/src/api/webcontents/main.d.ts +18 -4
  130. package/src/api/window/Instance.d.ts +21 -1
  131. package/src/api/window/Instance.js +20 -0
  132. package/src/browser.js +1 -1
  133. package/src/environment/browser.d.ts +1 -1
  134. package/src/environment/environment.d.ts +1 -1
  135. package/src/environment/node-env.d.ts +1 -1
  136. package/src/environment/openfin-env.d.ts +1 -1
  137. package/src/mock.d.ts +1 -1
  138. package/src/mock.js +6 -3
  139. package/src/namespaces.d.ts +21 -0
  140. package/src/namespaces.js +24 -0
  141. package/src/shapes/ERROR_BOX_TYPES.d.ts +1 -1
  142. package/src/shapes/protocol.d.ts +3 -3
  143. package/src/transport/fin_store.d.ts +1 -1
  144. package/src/transport/transport-errors.d.ts +7 -2
  145. package/src/transport/transport-errors.js +1 -2
  146. package/src/transport/transport.d.ts +11 -8
  147. package/src/transport/transport.js +12 -6
  148. package/src/transport/wire.d.ts +14 -13
  149. package/src/util/channel-api-relay.d.ts +13 -0
  150. package/src/util/channel-api-relay.js +37 -0
  151. package/src/util/errors.d.ts +2 -2
  152. package/src/util/http.js +4 -2
  153. package/src/util/inaccessibleObject.d.ts +2 -0
  154. package/src/util/inaccessibleObject.js +49 -0
  155. package/src/util/lazy.d.ts +16 -0
  156. package/src/util/lazy.js +26 -0
  157. package/src/util/promises.d.ts +1 -1
  158. package/src/util/reversible-map.d.ts +11 -0
  159. package/src/util/reversible-map.js +49 -0
  160. package/src/util/utilTypes.d.ts +1 -1
package/src/OpenFin.d.ts CHANGED
@@ -1,55 +1,71 @@
1
- import type { Application } from './api/application';
2
- import { ApplicationEvent } from './api/events/application';
3
- import { ExternalApplicationEvent } from './api/events/externalApplication';
4
- import { FrameEvent } from './api/events/frame';
5
- import { GlobalHotkeyEvent } from './api/events/globalHotkey';
6
- import { PlatformEvent } from './api/events/platform';
7
- import { AppVersionEvent, SystemEvent } from './api/events/system';
1
+ import type { Application } from './api/application/index';
2
+ import { AppVersionEvent } from './api/events/system';
8
3
  import { TypedEventEmitter } from './api/events/typedEventEmitter';
9
- import { ViewEvent } from './api/events/view';
10
- import { WindowEvent, WindowOptionsChangedEvent } from './api/events/window';
11
- import type { ExternalApplication } from './api/external-application';
4
+ import type { ExternalApplication } from './api/external-application/index';
12
5
  import { FinApi } from './api/fin';
13
- import type { _Frame } from './api/frame';
6
+ import type { _Frame } from './api/frame/index';
14
7
  import type ChannelClient from './api/interappbus/channel/client';
15
- import { MessagingProtocols } from './api/interappbus/channel/protocols';
8
+ import { MessagingProtocols } from './api/interappbus/channel/protocols/index';
16
9
  import type { ChannelProvider } from './api/interappbus/channel/provider';
17
- import type { InteropBroker, InteropClient } from './api/interop';
18
- import type { Platform } from './api/platform';
19
- import type { Layout } from './api/platform/layout';
20
- import { SnapshotSource } from './api/snapshot-source';
21
- import type { View } from './api/view';
22
- import { _Window } from './api/window';
23
- export declare type Fin<MeType extends EntityType = 'window' | 'view'> = FinApi<MeType>;
24
- export type { Application, ExternalApplication, _Frame as Frame, ChannelClient, ChannelProvider, Platform, Layout, View, _Window as Window, InteropClient, InteropBroker, SnapshotSource };
25
- export declare type WebContent = View | _Window;
26
- export declare type ApplicationIdentity = {
10
+ import type { InteropBroker, InteropClient } from './api/interop/index';
11
+ import type { Platform } from './api/platform/index';
12
+ import type { Layout } from './api/platform/layout/index';
13
+ import { PlatformProvider } from './api/platform/provider';
14
+ import { SnapshotSource } from './api/snapshot-source/index';
15
+ import type { View } from './api/view/index';
16
+ import { _Window } from './api/window/index';
17
+ import { ColumnOrRow, TabStack } from './api/platform/layout/entities/layout-entities';
18
+ export type Fin<MeType extends EntityType = 'window' | 'view'> = FinApi<MeType>;
19
+ export type { Application, ExternalApplication, _Frame as Frame, ChannelClient, ChannelProvider, Platform, Layout, View, ColumnOrRow, TabStack, _Window as Window, InteropClient, InteropBroker, SnapshotSource };
20
+ export type { LayoutEntityDefinition, LayoutEntityTypes, LayoutPosition } from './api/platform/layout/entities/shapes';
21
+ export type WebContent = View | _Window;
22
+ export type { PlatformProvider };
23
+ export type ApplicationIdentity = {
27
24
  uuid: string;
28
25
  };
29
- export declare type Identity = {
26
+ export type Identity = {
27
+ /**
28
+ * Universally unique identifier of the compenent
29
+ */
30
30
  uuid: string;
31
+ /**
32
+ * The name of the component
33
+ */
31
34
  name: string;
32
35
  };
33
- export declare type ClientIdentity = {
34
- uuid: string;
35
- name: string;
36
+ /**
37
+ * Identity of a channel client
38
+ */
39
+ export type ClientIdentity = Identity & {
40
+ /**
41
+ * Unique identifier for a client, because there can be multiple clients at one name/uuid entity.
42
+ */
36
43
  endpointId: string;
37
44
  isLocalEndpointId: boolean;
38
45
  };
39
- export declare type ClientInfo = Omit<ClientIdentity, 'isLocalEndpointId'> & {
46
+ /**
47
+ * Extended channel client information
48
+ */
49
+ export type ClientInfo = Omit<ClientIdentity, 'isLocalEndpointId'> & {
50
+ /**
51
+ * Indicates if the client belongs to a Window or View
52
+ */
40
53
  entityType: EntityType;
54
+ /**
55
+ * URL of the View or Window at the time of connection to the Channel Provider.
56
+ */
41
57
  connectionUrl: string;
42
58
  };
43
- export declare type ClientIdentityMultiRuntime = ClientIdentity & {
59
+ export type ClientIdentityMultiRuntime = ClientIdentity & {
44
60
  runtimeUuid: string;
45
61
  };
46
- export declare type EntityInfo = {
62
+ export type EntityInfo = {
47
63
  uuid: string;
48
64
  name: string;
49
65
  entityType: EntityType;
50
66
  };
51
- export declare type EntityType = 'window' | 'iframe' | 'external connection' | 'view' | 'unknown';
52
- export declare type Bounds = {
67
+ export type EntityType = 'window' | 'iframe' | 'external connection' | 'view' | 'unknown';
68
+ export type Bounds = {
53
69
  top: number;
54
70
  left: number;
55
71
  height: number;
@@ -58,53 +74,165 @@ export declare type Bounds = {
58
74
  /**
59
75
  * Returned from getBounds call. bottom and right are never used for setting.
60
76
  */
61
- export declare type WindowBounds = Bounds & {
77
+ export type WindowBounds = Bounds & {
62
78
  bottom: number;
63
79
  right: number;
64
80
  };
65
- export declare type Rectangle = {
81
+ /**
82
+ * A rectangular area on the screen.
83
+ */
84
+ export type Rectangle = {
85
+ /**
86
+ * The x coordinate of the rectangle's origin in pixels
87
+ */
66
88
  x: number;
89
+ /**
90
+ * The y coordinate of the rectangle's origin in pixels
91
+ */
67
92
  y: number;
93
+ /**
94
+ * The width of the rectangle in pixels
95
+ */
68
96
  width: number;
97
+ /**
98
+ * The height of the rectangle in pixels
99
+ */
69
100
  height: number;
70
101
  };
71
- export declare type ApplicationCreationOptions = Partial<ApplicationOptions> & {
102
+ /**
103
+ * The options object required by {@link Application.start Application.start}.
104
+ *
105
+ * The following options are required:
106
+ * * `uuid` is required in the app manifest as well as by {@link Application.start Application.start}
107
+ * * `name` is optional in the app manifest but required by {@link Application.start Application.start}
108
+ * * `url` is optional in both the app manifest {@link Application.start Application.start} and but is usually given
109
+ * (defaults to `"about:blank"` when omitted).
110
+ *
111
+ * _This jsdoc typedef mirrors the `ApplicationOption` TypeScript interface in `@types/openfin`._
112
+ *
113
+ * **IMPORTANT NOTE:**
114
+ * This object inherits all the properties of the window creation {@link Window~options options} object,
115
+ * which will take priority over those of the same name that may be provided in `mainWindowOptions`.
116
+ */
117
+ export type ApplicationCreationOptions = Partial<ApplicationOptions> & {
72
118
  name: string;
73
119
  uuid: string;
74
120
  };
75
- export declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
121
+ /**
122
+ * The complete set of options for an application.
123
+ */
124
+ export type ApplicationOptions = LegacyWinOptionsInAppOptions & {
125
+ /**
126
+ * @defaultValue false
127
+ *
128
+ * Disables IAB secure logging for the app.
129
+ */
76
130
  disableIabSecureLogging: boolean;
131
+ /**
132
+ * @defaultValue 'There was an error loading the application.'
133
+ *
134
+ * An error message to display when the application (launched via manifest) fails to load.
135
+ * A dialog box will be launched with the error message just before the runtime exits.
136
+ * Load fails such as failed DNS resolutions or aborted connections as well as cancellations, _e.g.,_ `window.stop()`,
137
+ * will trigger this dialog.
138
+ * Client response codes such as `404 Not Found` are not treated as fails as they are valid server responses.
139
+ */
77
140
  loadErrorMessage: string;
141
+ /**
142
+ * The options of the main window of the application.
143
+ */
78
144
  mainWindowOptions: WindowCreationOptions;
145
+ /**
146
+ * The name of the application (and the application's main window).
147
+ *
148
+ * If provided, _must_ match `uuid`.
149
+ */
79
150
  name: string;
151
+ /**
152
+ * @defaultValue false
153
+ *
154
+ * A flag to configure the application as non-persistent.
155
+ * Runtime exits when there are no persistent apps running.
156
+ */
80
157
  nonPersistent: boolean;
158
+ /**
159
+ * @defaultValue false
160
+ *
161
+ * Enable Flash at the application level.
162
+ */
81
163
  plugins: boolean;
164
+ /**
165
+ * @defaultValue false
166
+ * Enable spell check at the application level.
167
+ */
82
168
  spellCheck: boolean;
169
+ /**
170
+ * @defaultValue 'about:blank'
171
+ * The url to the application (specifically the application's main window).
172
+ */
83
173
  url: string;
174
+ /**
175
+ * The _Unique Universal Identifier_ (UUID) of the application, unique within the set of all other applications
176
+ * running in the OpenFin Runtime.
177
+ *
178
+ * Note that `name` and `uuid` must match.
179
+ */
84
180
  uuid: string;
181
+ /**
182
+ * @defaultValue true
183
+ *
184
+ * When set to `false` it will disable the same-origin policy for the app.
185
+ */
85
186
  webSecurity: boolean;
86
187
  commands: ShortcutOverride[];
87
188
  isPlatformController: boolean;
189
+ /**
190
+ * @defaultValue 1000
191
+ *
192
+ * Platforms Only. The maximum number of "detached" or "pooled" Views that can exist in the Platform before being closed.
193
+ * If you do not wish for views to be pooled on your platform, set this property to zero.
194
+ */
88
195
  maxViewPoolSize: number;
89
196
  defaultWindowOptions: Partial<WindowOptions>;
90
197
  defaultViewOptions: Partial<ViewOptions>;
91
198
  snapshot: Snapshot;
199
+ /**
200
+ * @defaultValue false
201
+ *
202
+ * Platforms Only. Prevent the Platform Provider from quitting automatically when the last Platform Window is closed.
203
+ * Note: if the Platform Provider is showing, it won't close automatically.
204
+ * If you want a hidden Platform Provider to remain open after the last Platform Window has been closed, set this property to true.
205
+ */
92
206
  preventQuitOnLastWindowClosed: boolean;
93
207
  interopBrokerConfiguration: InteropBrokerOptions;
94
208
  apiDiagnostics: boolean;
95
209
  defaultDomainSettings: DefaultDomainSettings;
210
+ /**
211
+ * @defaultValue false
212
+ * Enables the use of the Jumplists API and the 'pin to taskbar' functionality.
213
+ * Only relevant in Windows.
214
+ */
96
215
  enableJumpList: boolean;
97
216
  enableBeforeUnload: boolean;
98
217
  };
99
- declare type InteropBrokerOptions = {
218
+ export type InteropBrokerOptions = {
100
219
  contextGroups?: ContextGroupInfo;
101
220
  logging?: InteropLoggingOptions;
102
221
  };
103
- export declare type ContextGroupInfo = {
222
+ export type ContextGroupInfo = {
223
+ /**
224
+ * Name of the context group.
225
+ */
104
226
  id: string;
227
+ /**
228
+ * Metadata for the Context Group. Contains the group's human-readable name, color, and an image, as defined by the Interop Broker.
229
+ */
105
230
  displayMetadata?: DisplayMetadata;
106
231
  };
107
- export declare type DisplayMetadata = {
232
+ /**
233
+ * The display data for a context group.
234
+ */
235
+ export type DisplayMetadata = {
108
236
  /**
109
237
  * A user-readable name for this context group, e.g: `"Red"`
110
238
  */
@@ -118,8 +246,8 @@ export declare type DisplayMetadata = {
118
246
  */
119
247
  readonly glyph?: string;
120
248
  };
121
- export declare type LegacyWinOptionsInAppOptions = Pick<WindowCreationOptions, 'accelerator' | 'alwaysOnTop' | 'api' | 'aspectRatio' | 'autoShow' | 'backgroundColor' | 'contentNavigation' | 'contextMenu' | 'cornerRounding' | 'customData' | 'customRequestHeaders' | 'defaultCentered' | 'defaultHeight' | 'defaultLeft' | 'defaultTop' | 'defaultWidth' | 'frame' | 'hideOnClose' | 'icon' | 'maxHeight' | 'maximizable' | 'maxWidth' | 'minHeight' | 'minimizable' | 'minWidth' | 'opacity' | 'preloadScripts' | 'resizable' | 'resizeRegion' | 'saveWindowState' | 'ignoreSavedWindowState' | 'shadow' | 'showTaskbarIcon' | 'smallWindow' | 'state' | 'taskbarIconGroup' | 'waitForPageLoad'>;
122
- export declare type Snapshot = {
249
+ export type LegacyWinOptionsInAppOptions = Pick<WindowCreationOptions, 'accelerator' | 'alwaysOnTop' | 'api' | 'aspectRatio' | 'autoplayPolicy' | 'autoShow' | 'backgroundColor' | 'contentNavigation' | 'contextMenu' | 'cornerRounding' | 'customData' | 'customRequestHeaders' | 'defaultCentered' | 'defaultHeight' | 'defaultLeft' | 'defaultTop' | 'defaultWidth' | 'frame' | 'hideOnClose' | 'icon' | 'maxHeight' | 'maximizable' | 'maxWidth' | 'minHeight' | 'minimizable' | 'minWidth' | 'opacity' | 'preloadScripts' | 'resizable' | 'resizeRegion' | 'saveWindowState' | 'ignoreSavedWindowState' | 'shadow' | 'showTaskbarIcon' | 'smallWindow' | 'state' | 'taskbarIconGroup' | 'waitForPageLoad'>;
250
+ export type Snapshot = {
123
251
  windows: WindowCreationOptions[];
124
252
  snapshotDetails?: {
125
253
  monitorInfo: MonitorInfo;
@@ -130,233 +258,812 @@ export declare type Snapshot = {
130
258
  contextGroupStates: ContextGroupStates;
131
259
  };
132
260
  };
133
- export declare type ContextGroupStates = {
261
+ export type ContextGroupStates = {
134
262
  [key: string]: {
135
263
  [key: string]: Context;
136
264
  };
137
265
  };
138
- export declare type Context = {
266
+ /**
267
+ * Data passed between entities and applications.
268
+ */
269
+ export type Context = {
270
+ /**
271
+ * An object containing string key-value pairs for the bulk of the data for the context. Differs between context types.
272
+ */
139
273
  id?: {
140
274
  [key: string]: string;
141
275
  };
276
+ /**
277
+ * User-readable name for the incoming context.
278
+ */
142
279
  name?: string;
280
+ /**
281
+ * Conserved type for the context (e.g. `instrument` or `country`).
282
+ */
143
283
  type: string;
144
284
  };
145
- export declare type MonitorInfo = {
285
+ export type MonitorInfo = {
286
+ /**
287
+ * The device scale factor.
288
+ */
146
289
  deviceScaleFactor: number;
147
290
  dpi: Point;
148
291
  nonPrimaryMonitors: MonitorDetails[];
149
292
  primaryMonitor: MonitorDetails;
293
+ /**
294
+ * Always "api-query".
295
+ */
150
296
  reason: string;
151
297
  taskbar: TaskBar;
298
+ /**
299
+ * The virtual display screen coordinates.
300
+ */
152
301
  virtualScreen: DipRect;
153
302
  };
154
- export declare type Point = {
303
+ export type Point = {
304
+ /**
305
+ * The mouse x position
306
+ */
155
307
  x: number;
308
+ /**
309
+ * The mouse y position
310
+ */
156
311
  y: number;
157
312
  };
158
- export declare type PointTopLeft = {
313
+ export type PointTopLeft = {
314
+ /**
315
+ * The mouse top position in virtual screen coordinates
316
+ */
159
317
  top: number;
318
+ /**
319
+ * The mouse left position in virtual screen coordinates
320
+ */
160
321
  left: number;
161
322
  };
162
- export declare type RectangleByEdgePositions = {
323
+ export type RectangleByEdgePositions = {
163
324
  top: number;
164
325
  left: number;
165
326
  bottom: number;
166
327
  right: number;
167
328
  };
168
- export declare type MonitorDetails = {
329
+ export type MonitorDetails = {
330
+ /**
331
+ * The available DIP scale coordinates.
332
+ */
169
333
  available: DipScaleRects;
334
+ /**
335
+ * The available monitor coordinates.
336
+ */
170
337
  availableRect: RectangleByEdgePositions;
338
+ /**
339
+ * The device id of the display.
340
+ */
171
341
  deviceId: string | number;
342
+ /**
343
+ * True if the display is active.
344
+ */
172
345
  displayDeviceActive: boolean;
346
+ /**
347
+ * The device scale factor.
348
+ */
173
349
  deviceScaleFactor: number;
350
+ /**
351
+ * The monitor coordinates.
352
+ */
174
353
  monitorRect: RectangleByEdgePositions;
354
+ /**
355
+ * The name of the display.
356
+ */
175
357
  name: string | number;
176
358
  dpi: Point;
359
+ /**
360
+ * The monitor coordinates.
361
+ */
177
362
  monitor: DipScaleRects;
178
363
  };
179
- export declare type DipRect = RectangleByEdgePositions & {
364
+ export type DipRect = RectangleByEdgePositions & {
180
365
  dipRect: RectangleByEdgePositions;
181
366
  scaledRect: RectangleByEdgePositions;
182
367
  };
183
- export declare type DipScaleRects = {
368
+ export type DipScaleRects = {
184
369
  dipRect: RectangleByEdgePositions;
185
370
  scaledRect: RectangleByEdgePositions;
186
371
  };
187
- export declare type TaskBar = DipScaleRects & {
372
+ export type TaskBar = DipScaleRects & {
373
+ /**
374
+ * Which edge of a monitor the taskbar is on
375
+ */
188
376
  edge: string;
377
+ /**
378
+ * The taskbar coordinates.
379
+ */
189
380
  rect: RectangleByEdgePositions;
190
381
  };
191
- export declare type WindowCreationOptions = Partial<WindowOptions> & {
382
+ /**
383
+ * Options required to create a new window with {@link Window.create Window.create}.
384
+ *
385
+ * Note that `name` is the only required property — albeit the `url` property is usually provided as well
386
+ * (defaults to `"about:blank"` when omitted).
387
+ */
388
+ export type WindowCreationOptions = Partial<WindowOptions> & {
192
389
  name: string;
193
390
  };
194
- export declare type UpdatableWindowOptions = Partial<MutableWindowOptions>;
195
- export declare type WindowOptions = MutableWindowOptions & ConstWindowOptions;
196
- export declare type ViewVisibilityOption = {
391
+ export type UpdatableWindowOptions = Partial<MutableWindowOptions>;
392
+ export type WindowOptions = MutableWindowOptions & ConstWindowOptions;
393
+ /**
394
+ * Configuration for view visibility settings
395
+ */
396
+ export type ViewVisibilityOption = {
197
397
  enabled?: boolean;
198
398
  };
199
- export declare type ShowViewOnWindowResizeOptions = ViewVisibilityOption & {
399
+ /**
400
+ * _Platform Windows Only_. Enables views to be shown when a Platform Window is being resized by the user.
401
+ */
402
+ export type ShowViewOnWindowResizeOptions = ViewVisibilityOption & {
403
+ /**
404
+ * @defaultValue false
405
+ *
406
+ * Enables showing Views when a Platform Window is being resized.
407
+ */
408
+ enabled?: boolean;
409
+ /**
410
+ * @defaultValue 0
411
+ *
412
+ * Number of milliseconds to wait between view repaints.
413
+ */
200
414
  paintIntervalMs?: number;
201
415
  };
202
- export declare type ViewVisibilityOptions = {
416
+ /**
417
+ * _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
418
+ */
419
+ export type ViewVisibilityOptions = {
420
+ /**
421
+ * Enables views to be shown when a Platform Window is being resized by the user.
422
+ */
203
423
  showViewsOnWindowResize?: ShowViewOnWindowResizeOptions;
424
+ /**
425
+ * Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
426
+ */
204
427
  showViewsOnSplitterDrag?: ViewVisibilityOption;
428
+ /**
429
+ * _Supported on Windows Operating Systems only_. Allows views to be shown when the user is dragging a tab around a layout.
430
+ */
205
431
  showViewsOnTabDrag?: ViewVisibilityOption;
206
432
  };
207
- export declare type WindowState = 'maximized' | 'minimized' | 'normal';
208
- export declare type ConstWindowOptions = {
433
+ /**
434
+ * Visibility state of a window.
435
+ */
436
+ export type WindowState = 'maximized' | 'minimized' | 'normal';
437
+ export type AutoplayPolicyOptions = 'no-user-gesture-required' | 'user-gesture-required' | 'document-user-activation-required';
438
+ /**
439
+ * Window options that cannot be changed after creation.
440
+ */
441
+ export type ConstWindowOptions = {
442
+ /**
443
+ * Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
444
+ */
209
445
  accelerator: Partial<Accelerator>;
446
+ /**
447
+ * Configurations for API injection.
448
+ */
210
449
  api: Api;
450
+ /**
451
+ * @deprecated use `icon` instead.
452
+ */
211
453
  applicationIcon: string;
454
+ autoplayPolicy: AutoplayPolicyOptions;
455
+ /**
456
+ * Automatically show the window when it is created.
457
+ */
212
458
  autoShow: boolean;
459
+ /**
460
+ * The window’s _backfill_ color as a hexadecimal value. Not to be confused with the content background color
461
+ * (`document.body.style.backgroundColor`),
462
+ * this color briefly fills a window’s (a) content area before its content is loaded as well as (b) newly exposed
463
+ * areas when growing a window. Setting
464
+ * this value to the anticipated content background color can help improve user experience.
465
+ * Default is white.
466
+ */
213
467
  backgroundColor: string;
468
+ /**
469
+ * Configures how new content (e,g, from `window.open` or a link) is opened.
470
+ */
214
471
  contentCreation: ContentCreationOptions;
472
+ /**
473
+ * Restrict navigation to URLs that match a whitelisted pattern.
474
+ * In the lack of a whitelist, navigation to URLs that match a blacklisted pattern would be prohibited.
475
+ * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
476
+ */
215
477
  contentNavigation: ContentNavigation;
478
+ /**
479
+ * Restrict redirects to URLs that match a whitelisted pattern.
480
+ * In the lack of a whitelist, redirects to URLs that match a blacklisted pattern would be prohibited.
481
+ * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
482
+ */
216
483
  contentRedirect: Partial<ContentRedirect>;
484
+ /**
485
+ * Custom headers for requests sent by the window.
486
+ */
217
487
  customRequestHeaders: CustomRequestHeaders[];
488
+ /**
489
+ * @defaultValue true
490
+ *
491
+ * Toggling off would keep the Window alive even if all its Views were closed.
492
+ * This is meant for advanced users and should be used with caution.
493
+ * Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
494
+ * Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
495
+ * ** note ** - This option is ignored in non-Platforms apps.
496
+ */
218
497
  closeOnLastViewRemoved: boolean;
498
+ /**
499
+ * Centers the window in the primary monitor. This option overrides `defaultLeft` and `defaultTop`. When `saveWindowState` is `true`,
500
+ * this value will be ignored for subsequent launches in favor of the cached value. **NOTE:** On macOS _defaultCenter_ is
501
+ * somewhat above center vertically.
502
+ */
219
503
  defaultCentered: boolean;
504
+ /**
505
+ * @defaultValue 500
506
+ *
507
+ * The default height of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent launches
508
+ * in favor of the cached value.
509
+ */
220
510
  defaultHeight: number;
511
+ /**
512
+ * @defaultValue 100
513
+ *
514
+ * The default left position of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
515
+ * launches in favor of the cached value.
516
+ */
221
517
  defaultLeft: number;
518
+ /**
519
+ * @defaultValue 100
520
+ *
521
+ * The default top position of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
522
+ * launches in favor of the cached value.
523
+ */
222
524
  defaultTop: number;
525
+ /**
526
+ * @defaultValue 800
527
+ *
528
+ * The default width of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
529
+ * launches in favor of the cached value.
530
+ */
223
531
  defaultWidth: number;
224
532
  height: number;
225
533
  layout: any;
534
+ /**
535
+ * Parent identity of a modal window. It will create a modal child window when this option is set.
536
+ */
226
537
  modalParentIdentity: Identity;
538
+ /**
539
+ * The name of the window.
540
+ */
227
541
  name: string;
228
542
  permissions: Partial<Permissions>;
543
+ /**
544
+ * Scripts that run before page load. When omitted, inherits from the parent application.
545
+ */
229
546
  preloadScripts: PreloadScript[];
547
+ /**
548
+ * String tag that attempts to group like-tagged renderers together. Will only be used if pages are on the same origin.
549
+ */
230
550
  processAffinity: string;
231
- saveWindowState: boolean;
551
+ /**
552
+ * @defaultValue false
553
+ *
554
+ * Displays a shadow on frameless windows.
555
+ * `shadow` and `cornerRounding` are mutually exclusive.
556
+ * On Windows 7, Aero theme is required.
557
+ */
232
558
  shadow: boolean;
559
+ /**
560
+ * @defaultValue true
561
+ *
562
+ * Caches the location of the window.
563
+ * Note: this option is ignored in Platforms as it would cause inconsistent {@link Platform#applySnapshot applySnapshot} behavior.
564
+ */
565
+ saveWindowState: boolean;
566
+ /**
567
+ * Ignores the cached state of the window.
568
+ * Defaults the opposite value of `saveWindowState` to maintain backwards compatibility.
569
+ */
233
570
  ignoreSavedWindowState: boolean;
571
+ /**
572
+ * @defaultValue false
573
+ *
574
+ * Makes this window a frameless window that can be created and resized to less than 41x36 px (width x height).
575
+ * _Note: Caveats of small windows are no Aero Snap and drag to/from maximize._
576
+ * _Windows 10: Requires `maximizable` to be false. Resizing with the mouse is only possible down to 38x39 px._
577
+ */
234
578
  smallWindow: boolean;
579
+ /**
580
+ * @defaultValue "normal"
581
+ *
582
+ * The visible state of the window on creation.
583
+ * One of:
584
+ * * `"maximized"`
585
+ * * `"minimized"`
586
+ * * `"normal"`
587
+ */
235
588
  state: WindowState;
589
+ /**
590
+ * @Deprecated - use `icon` instead.
591
+ */
236
592
  taskbarIcon: string;
593
+ /**
594
+ * Specify a taskbar group for the window.
595
+ * _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
596
+ */
237
597
  taskbarIconGroup: string;
598
+ /**
599
+ * @defaultValue "about:blank"
600
+ *
601
+ * The URL of the window
602
+ */
238
603
  url: string;
604
+ /**
605
+ * @defaultValue <application UUID>
606
+ *
607
+ * The `uuid` of the application, unique within the set of all `Application`s running in OpenFin Runtime.
608
+ * If omitted, defaults to the `uuid` of the application spawning the window.
609
+ * If given, must match the `uuid` of the application spawning the window.
610
+ * In other words, the application's `uuid` is the only acceptable value, but is the default, so there's
611
+ * really no need to provide it.
612
+ */
239
613
  uuid: string;
614
+ /**
615
+ * @defaultValue false
616
+ *
617
+ * When set to `true`, the window will not appear until the `window` object's `load` event fires.
618
+ * When set to `false`, the window will appear immediately without waiting for content to be loaded.
619
+ */
240
620
  waitForPageLoad: boolean;
241
621
  width: number;
242
622
  x: number;
243
623
  y: number;
244
624
  experimental?: any;
245
625
  fdc3InteropApi?: string;
626
+ /**
627
+ * _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
628
+ */
246
629
  viewVisibility?: ViewVisibilityOptions;
247
630
  };
248
- export declare type MutableWindowOptions = {
631
+ /**
632
+ * Window options that can be changed after window creation.
633
+ */
634
+ export type MutableWindowOptions = {
635
+ /**
636
+ * Turns anything of matching RGB value transparent.
637
+ *
638
+ * Caveats:
639
+ * * runtime key --disable-gpu is required. Note: Unclear behavior on remote Desktop support
640
+ * * User cannot click-through transparent regions
641
+ * * Not supported on Mac
642
+ * * Windows Aero must be enabled
643
+ * * Won't make visual sense on Pixel-pushed environments such as Citrix
644
+ * * Not supported on rounded corner windows
645
+ */
249
646
  alphaMask: RGB;
647
+ /**
648
+ * @defaultValue false
649
+ *
650
+ * Always position the window at the top of the window stack.
651
+ */
250
652
  alwaysOnTop: boolean;
653
+ /**
654
+ * @defaultValue 0
655
+ *
656
+ * The aspect ratio of width to height to enforce for the window. If this value is equal to or less than zero,
657
+ * an aspect ratio will not be enforced.
658
+ */
251
659
  aspectRatio: number;
660
+ /**
661
+ * @deprecated Superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
662
+ *
663
+ * @defaultValue true
664
+ *
665
+ * Show the context menu when right-clicking on the window.
666
+ * Gives access to the devtools for the window.
667
+ */
252
668
  contextMenu: boolean;
669
+ /**
670
+ * @deprecated Superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
671
+ *
672
+ * Configure the context menu when right-clicking on a window.
673
+ */
253
674
  contextMenuSettings: ContextMenuSettings;
675
+ /**
676
+ * Configure the context menu when right-clicking on a window.
677
+ */
254
678
  contextMenuOptions: ContextMenuOptions;
679
+ /**
680
+ * Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
681
+ * average of _height_ and _width_.
682
+ */
255
683
  cornerRounding: Partial<CornerRounding>;
684
+ /**
685
+ * A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
686
+ * is called. If a window in a Platform is trying to update or retrieve its own context, it can use the
687
+ * {@link Platform#setWindowContext Platform.setWindowContext} and {@link Platform#getWindowContext Platform.getWindowContext} calls.
688
+ * _When omitted, _inherits_ from the parent application._
689
+ * As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
690
+ */
256
691
  customContext: any;
692
+ /**
693
+ * A field that the user can attach serializable data to be ferried around with the window options.
694
+ * _When omitted, _inherits_ from the parent application._
695
+ */
257
696
  customData: any;
697
+ /**
698
+ * @defaultValue true
699
+ *
700
+ * Show the window's frame.
701
+ */
258
702
  frame: boolean;
703
+ /**
704
+ * @defaultValue false
705
+ *
706
+ * Hides the window instead of closing it when the close button is pressed.
707
+ */
259
708
  hideOnClose: boolean;
709
+ /**
710
+ * Defines the hotkeys that will be emitted as a `hotkey` event on the window. For usage example see [example]{@tutorial hotkeys}.
711
+ * Within Platform, OpenFin also implements a set of pre-defined actions called
712
+ * [keyboard commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}
713
+ * that can be assigned to a specific hotkey in the platform manifest.
714
+ */
260
715
  hotkeys: Hotkey[];
716
+ /**
717
+ * A URL for the icon to be shown in the window title bar and the taskbar.
718
+ * When omitted, inherits from the parent application._
719
+ * note: Window OS caches taskbar icons, therefore an icon change might only be visible after the cache is removed or the uuid is changed.
720
+ */
261
721
  icon: string;
722
+ /**
723
+ * @defaultValue true
724
+ *
725
+ * Include window in snapshots returned by Platform.getSnapshot(). Turning this off may be desirable when dealing with
726
+ * inherently temporary windows whose state shouldn't be preserved, such as modals, menus, or popups.
727
+ */
262
728
  includeInSnapshots: boolean;
729
+ /**
730
+ * @defaultValue -1
731
+ *
732
+ * The maximum height of a window. Will default to the OS defined value if set to -1.
733
+ */
263
734
  maxHeight: number;
735
+ /**
736
+ * @defaultValue true
737
+ *
738
+ * Allows the window to be maximized.
739
+ */
264
740
  maximizable: boolean;
741
+ /**
742
+ * @defaultValue -1
743
+ *
744
+ * The maximum width of a window. Will default to the OS defined value if set to -1.
745
+ */
265
746
  maxWidth: number;
747
+ /**
748
+ * @defaultValue 0
749
+ *
750
+ * The minimum height of the window.
751
+ */
266
752
  minHeight: number;
753
+ /**
754
+ * @defaultValue true
755
+ *
756
+ * Allows the window to be minimized.
757
+ */
267
758
  minimizable: boolean;
759
+ /**
760
+ * @defaultValue true
761
+ *
762
+ * The minimum width of the window.
763
+ */
268
764
  minWidth: number;
765
+ /**
766
+ * @defaultValue 1
767
+ *
768
+ * A flag that specifies how transparent the window will be.
769
+ * Changing opacity doesn't work on Windows 7 without Aero so setting this value will have no effect there.
770
+ * This value is clamped between `0.0` and `1.0`.
771
+ */
269
772
  opacity: number;
773
+ /**
774
+ * @defaultValue true
775
+ *
776
+ * A flag to allow the user to resize the window.
777
+ */
270
778
  resizable: boolean;
779
+ /**
780
+ * Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window.
781
+ */
271
782
  resizeRegion: ResizeRegion;
783
+ /**
784
+ * @defaultValue false
785
+ *
786
+ * Platforms Only. If true, will show background images in the layout when the Views are hidden.
787
+ * This occurs when the window is resizing or a tab is being dragged within the layout.
788
+ */
272
789
  showBackgroundImages: boolean;
790
+ /**
791
+ * @defaultValue true
792
+ *
793
+ * Shows the window's icon in the taskbar.
794
+ */
273
795
  showTaskbarIcon: boolean;
274
796
  interop: InteropConfig;
275
797
  workspacePlatform: WorkspacePlatformOptions;
276
798
  };
277
- export declare type WorkspacePlatformOptions = {
799
+ export type WorkspacePlatformOptions = {
278
800
  /** Leaving this as any for now until we figure out what the shape should look like in Workspace */
279
801
  [key: string]: any;
280
802
  };
281
- export declare type WebRequestHeader = {
803
+ /**
804
+ * Object representing headers and their values, where the
805
+ * object key is the name of header and value key is the value of the header
806
+ */
807
+ export type WebRequestHeader = {
282
808
  [key: string]: string;
283
809
  };
284
- export declare type CustomRequestHeaders = {
810
+ /**
811
+ * Custom headers for requests sent by the window.
812
+ */
813
+ export type CustomRequestHeaders = {
814
+ /**
815
+ * The URL patterns for which the headers will be applied.
816
+ */
285
817
  urlPatterns: string[];
818
+ /**
819
+ * Headers for requests sent by window; {key: value} results
820
+ * in a header of `key=value`.
821
+ */
286
822
  headers: WebRequestHeader[];
287
823
  };
288
- export declare type WindowOptionDiff = {
824
+ export type WindowOptionDiff = {
289
825
  [key in keyof WindowOptions]: {
290
826
  oldVal: WindowOptions[key];
291
827
  newVal: WindowOptions[key];
292
828
  };
293
829
  };
294
- export declare type ResizeRegion = {
830
+ /**
831
+ * Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window.
832
+ */
833
+ export type ResizeRegion = {
834
+ /**
835
+ * @defaultValue 7
836
+ *
837
+ * The size of the resize region in pixels.
838
+ */
295
839
  size?: number;
840
+ /**
841
+ * @defaultValue 9
842
+ *
843
+ * The size in pixels of an additional square resizable region located at the bottom right corner of a frameless window.
844
+ */
296
845
  bottomRightCorner?: number;
846
+ /**
847
+ * Enables resizing interaction for each side of the window.
848
+ */
297
849
  sides?: {
850
+ /**
851
+ * @defaultValue true
852
+ *
853
+ * Enables resizing from the top of the window.
854
+ */
298
855
  top?: boolean;
856
+ /**
857
+ * @defaultValue true
858
+ *
859
+ * Enables resizing from the bottom of the window.
860
+ */
299
861
  bottom?: boolean;
862
+ /**
863
+ * @defaultValue true
864
+ *
865
+ * Enables resizing from the left side of the window.
866
+ */
300
867
  left?: boolean;
868
+ /**
869
+ * @defaultValue true
870
+ *
871
+ * Enables resizing from the right side of the window.
872
+ */
301
873
  right?: boolean;
302
874
  };
303
875
  };
304
- export declare type Accelerator = {
876
+ /**
877
+ * Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
878
+ */
879
+ export type Accelerator = {
880
+ /**
881
+ * If `true`, enables the devtools keyboard shortcut:<br>
882
+ * `Ctrl` + `Shift` + `I` _(Toggles Devtools)_
883
+ */
305
884
  devtools: boolean;
885
+ /**
886
+ * If `true`, enables the reload keyboard shortcuts:<br>
887
+ * `Ctrl` + `R` _(Windows)_<br>
888
+ * `F5` _(Windows)_<br>
889
+ * `Command` + `R` _(Mac)_
890
+ */
306
891
  reload: boolean;
892
+ /**
893
+ * If `true`, enables the reload-from-source keyboard shortcuts:<br>
894
+ * `Ctrl` + `Shift` + `R` _(Windows)_<br>
895
+ * `Shift` + `F5` _(Windows)_<br>
896
+ * `Command` + `Shift` + `R` _(Mac)_
897
+ */
307
898
  reloadIgnoringCache: boolean;
899
+ /**
900
+ * 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.
901
+ * If `true`, enables the zoom keyboard shortcuts:<br>
902
+ * `Ctrl` + `+` _(Zoom In)_<br>
903
+ * `Ctrl` + `Shift` + `+` _(Zoom In)_<br>
904
+ * `Ctrl` + `NumPad+` _(Zoom In)_<br>
905
+ * `Ctrl` + `-` _(Zoom Out)_<br>
906
+ * `Ctrl` + `Shift` + `-` _(Zoom Out)_<br>
907
+ * `Ctrl` + `NumPad-` _(Zoom Out)_<br>
908
+ * `Ctrl` + `Scroll` _(Zoom In & Out)_<br>
909
+ * `Ctrl` + `0` _(Restore to 100%)_
910
+ */
308
911
  zoom: boolean;
309
912
  };
310
- export declare type Api = {
913
+ /**
914
+ * Configurations for API injection.
915
+ */
916
+ export type Api = {
917
+ /**
918
+ * Configure injection of OpenFin API into iframes based on domain
919
+ */
311
920
  iframe?: {
921
+ /**
922
+ * Inject OpenFin API into cross-origin iframes
923
+ */
312
924
  crossOriginInjection?: boolean;
925
+ /**
926
+ * Inject OpenFin API into same-origin iframes
927
+ */
313
928
  sameOriginInjection?: boolean;
314
929
  enableDeprecatedSharedName?: boolean;
315
930
  };
316
931
  };
317
- export declare type ContentNavigation = {
932
+ /**
933
+ * Restrict navigation to URLs that match a whitelisted pattern.
934
+ * In the lack of a whitelist, navigation to URLs that match a blacklisted pattern would be prohibited.
935
+ * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
936
+ */
937
+ export type ContentNavigation = {
938
+ /**
939
+ * Allowed URLs for navigation.
940
+ */
318
941
  whitelist?: string[];
942
+ /**
943
+ * Forbidden URLs for navigation.
944
+ */
319
945
  blacklist?: string[];
320
946
  };
321
- export declare type ContentRedirect = {
947
+ /**
948
+ * Restrict redirects to URLs that match a whitelisted pattern.
949
+ * In the lack of a whitelist, redirects to URLs that match a blacklisted pattern would be prohibited.
950
+ * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
951
+ */
952
+ export type ContentRedirect = {
953
+ /**
954
+ * Allowed URLs for redirects.
955
+ */
322
956
  whitelist: string[];
957
+ /**
958
+ * Forbidden URLs for redirects.
959
+ */
323
960
  blacklist: string[];
324
961
  };
325
- export declare type CornerRounding = {
962
+ /**
963
+ * Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
964
+ * average of _height_ and _width_.
965
+ */
966
+ export type CornerRounding = {
967
+ /**
968
+ * @defaultValue 0
969
+ *
970
+ * The height in pixels.
971
+ */
326
972
  height: number;
973
+ /**
974
+ * @defaultValue 0
975
+ *
976
+ * The width in pixels.
977
+ */
327
978
  width: number;
328
979
  };
329
- export declare type DownloadPreloadOption = {
980
+ /**
981
+ * Options for downloading a preload script.
982
+ */
983
+ export type DownloadPreloadOption = {
984
+ /**
985
+ * URL from which to download the preload script.
986
+ */
330
987
  url: string;
331
988
  };
332
- export declare type DownloadPreloadInfo = {
989
+ /**
990
+ * Metadata returned from a preload script download request.
991
+ */
992
+ export type DownloadPreloadInfo = {
993
+ /**
994
+ * Whether the download was successful.
995
+ */
333
996
  success: boolean;
997
+ /**
998
+ * URL from which the preload script should be downloaded.
999
+ */
334
1000
  url?: string;
1001
+ /**
1002
+ * Error during preload script download.
1003
+ */
335
1004
  error: string;
336
1005
  };
337
- export declare type RGB = {
1006
+ export type RGB = {
338
1007
  red: number;
339
1008
  blue: number;
340
1009
  green: number;
341
1010
  };
342
- export declare type ContextMenuSettings = {
1011
+ /**
1012
+ * @deprecated Superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
1013
+ * Configure the context menu when right-clicking on a window.
1014
+ */
1015
+ export type ContextMenuSettings = {
1016
+ /**
1017
+ * Should the context menu display on right click.
1018
+ */
343
1019
  enable: boolean;
1020
+ /**
1021
+ * Should the context menu contain a button for opening devtools.
1022
+ */
344
1023
  devtools?: boolean;
1024
+ /**
1025
+ * Should the context menu contain a button for reloading the page.
1026
+ */
345
1027
  reload?: boolean;
346
1028
  };
347
- export declare type Hotkey = {
1029
+ /**
1030
+ * A hotkey binding.
1031
+ */
1032
+ export type Hotkey = {
1033
+ /**
1034
+ * The key combination of the hotkey, i.e. "Ctrl+T".
1035
+ */
348
1036
  keys: string;
1037
+ /**
1038
+ * @defaultValue false
1039
+ *
1040
+ * Prevent default key handling before emitting the event.
1041
+ */
349
1042
  preventDefault?: boolean;
350
1043
  };
351
- export declare type ShortcutOverride = Hotkey & {
1044
+ export type ShortcutOverride = Hotkey & {
352
1045
  command: string;
353
1046
  };
354
- export declare type PreloadScript = {
1047
+ /**
1048
+ * A script that is run before page load.
1049
+ */
1050
+ export type PreloadScript = {
1051
+ /**
1052
+ * @defaultValue false
1053
+ *
1054
+ * Fail to load the window if this preload script fails
1055
+ */
355
1056
  mandatory?: boolean;
1057
+ /**
1058
+ * Preload script execution state.
1059
+ */
356
1060
  state?: 'load-started' | 'load-failed' | 'load-succeeded' | 'failed' | 'succeeded';
1061
+ /**
1062
+ * The URL from which the script was loaded.
1063
+ */
357
1064
  url: string;
358
1065
  };
359
- export declare type AutoResizeOptions = {
1066
+ export type AutoResizeOptions = {
360
1067
  /**
361
1068
  * If true, the view's width will grow and shrink together with the window. false
362
1069
  * by default.
@@ -378,11 +1085,17 @@ export declare type AutoResizeOptions = {
378
1085
  */
379
1086
  vertical?: boolean;
380
1087
  };
381
- export declare type InteropConfig = {
1088
+ export type InteropConfig = {
1089
+ /**
1090
+ * Context Group for the client. (green, yellow, red, etc.).
1091
+ */
382
1092
  currentContextGroup?: string | null;
1093
+ /**
1094
+ * When provided, automatically connects the client to the specified provider uuid.
1095
+ */
383
1096
  providerId?: string;
384
1097
  };
385
- export declare type ViewInfo = {
1098
+ export type ViewInfo = {
386
1099
  canNavigateBack: boolean;
387
1100
  canNavigateForward: boolean;
388
1101
  processAffinity: string;
@@ -390,53 +1103,169 @@ export declare type ViewInfo = {
390
1103
  url: string;
391
1104
  favicons: string[];
392
1105
  };
393
- export declare type UpdatableViewOptions = Partial<MutableViewOptions>;
394
- export declare type ViewCreationOptions = Partial<ViewOptions> & {
1106
+ /**
1107
+ * View options that can be updated after creation.
1108
+ */
1109
+ export type UpdatableViewOptions = Partial<MutableViewOptions>;
1110
+ /**
1111
+ * The options object required by {@link View.create View.create}.
1112
+ *
1113
+ * Note that `name` and `target` are the only required properties — albeit the `url` property is usually provided as well
1114
+ * (defaults to `"about:blank"` when omitted).
1115
+ */
1116
+ export type ViewCreationOptions = Partial<ViewOptions> & {
395
1117
  name: string;
396
1118
  url: string;
397
1119
  target: Identity;
398
1120
  };
399
- export declare type MutableViewOptions = {
1121
+ export type MutableViewOptions = {
400
1122
  autoResize: AutoResizeOptions;
1123
+ /**
1124
+ * @deprecated Superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
1125
+ *
1126
+ * @defaultValue true
1127
+ *
1128
+ * Show the context menu when right-clicking on the view.
1129
+ * Gives access to the devtools for the view.
1130
+ */
401
1131
  contextMenu: boolean;
1132
+ /**
1133
+ * @deprecated Superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
1134
+ *
1135
+ * Configure the context menu when right-clicking on a window.
1136
+ */
402
1137
  contextMenuSettings: ContextMenuSettings;
1138
+ /**
1139
+ * Configure the context menu when right-clicking on a window.
1140
+ */
403
1141
  contextMenuOptions: ContextMenuOptions;
1142
+ /**
1143
+ * The view’s _backfill_ color as a hexadecimal value. Not to be confused with the content background color
1144
+ * (`document.body.style.backgroundColor`),
1145
+ * this color briefly fills a view’s (a) content area before its content is loaded as well as (b) newly exposed
1146
+ * areas when growing a view. Setting
1147
+ * this value to the anticipated content background color can help improve user experience.
1148
+ * Default is white.
1149
+ */
404
1150
  backgroundColor: string;
1151
+ /**
1152
+ * A field that the user can attach serializable data to be ferried around with the window options.
1153
+ * _When omitted, _inherits_ from the parent application._
1154
+ */
405
1155
  customData: any;
1156
+ /**
1157
+ * A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
1158
+ * is called. If a window in a Platform is trying to update or retrieve its own context, it can use the
1159
+ * {@link Platform#setWindowContext Platform.setWindowContext} and {@link Platform#getWindowContext Platform.getWindowContext} calls.
1160
+ * _When omitted, _inherits_ from the parent application._
1161
+ * As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
1162
+ */
406
1163
  customContext: any;
1164
+ /**
1165
+ * Configurations for API injection.
1166
+ */
407
1167
  api: Api;
1168
+ /**
1169
+ * Restrict navigation to URLs that match a whitelisted pattern.
1170
+ * In the lack of a whitelist, navigation to URLs that match a blacklisted pattern would be prohibited.
1171
+ * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
1172
+ */
408
1173
  contentNavigation: ContentNavigation;
1174
+ /**
1175
+ * @defaultValue false
1176
+ *
1177
+ * Platforms Only. If true, will hide and detach the View from the window for later use instead of closing,
1178
+ * allowing the state of the View to be saved and the View to be immediately shown in a new Layout.
1179
+ */
409
1180
  detachOnClose: boolean;
1181
+ /**
1182
+ * @defaultValue true
1183
+ *
1184
+ * **Platforms Only.** If false, the view will be persistent and can't be closed through
1185
+ * either UI or `Platform.closeView`. Note that the view will still be closed if the host window is closed or
1186
+ * if the view isn't part of the new layout when running `Layout.replace`.
1187
+ */
410
1188
  isClosable: boolean;
1189
+ /**
1190
+ * @defaultValue false
1191
+ *
1192
+ * @property {boolean} [preventDragOut=false] **Platforms Only.** If true, the tab of the view can't be dragged out of its host window.
1193
+ */
411
1194
  preventDragOut: boolean;
412
1195
  interop?: InteropConfig;
413
1196
  };
414
- export declare type ViewOptions = ConstViewOptions & MutableViewOptions;
415
- export declare type ConstViewOptions = {
1197
+ /**
1198
+ * User-facing options for a view.
1199
+ */
1200
+ export type ViewOptions = ConstViewOptions & MutableViewOptions;
1201
+ /**
1202
+ * View options that cannot be updated after creation.
1203
+ */
1204
+ export type ConstViewOptions = {
1205
+ /**
1206
+ * The name of the view.
1207
+ */
416
1208
  name: string;
1209
+ /**
1210
+ * @defaultValue "about:blank"
1211
+ *
1212
+ * The URL of the window
1213
+ */
417
1214
  url: string;
1215
+ /**
1216
+ * The identity of the window this view should be attached to.
1217
+ */
418
1218
  target: Identity;
1219
+ /**
1220
+ * Configures how new content (e,g, from `window.open` or a link) is opened.
1221
+ */
419
1222
  contentCreation: ContentCreationOptions;
1223
+ /**
1224
+ * Custom headers for requests sent by the view.
1225
+ */
420
1226
  customRequestHeaders: CustomRequestHeaders[];
1227
+ /**
1228
+ * Initial bounds given relative to the window.
1229
+ */
421
1230
  bounds: Bounds;
422
1231
  permissions: Partial<Permissions>;
1232
+ /**
1233
+ * String tag that attempts to group like-tagged renderers together. Will only be used if pages are on the same origin.
1234
+ */
423
1235
  processAffinity: string;
1236
+ /**
1237
+ * Defines the hotkeys that will be emitted as a `hotkey` event on the view. For usage example see [example]{@tutorial hotkeys}.
1238
+ * Within Platform, OpenFin also implements a set of pre-defined actions called
1239
+ * [keyboard commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}
1240
+ * that can be assigned to a specific hotkey in the platform manifest.
1241
+ */
424
1242
  hotkeys: Hotkey[];
1243
+ /**
1244
+ * Scripts that run before page load. When omitted, inherits from the parent application.
1245
+ */
425
1246
  preloadScripts: PreloadScript[];
1247
+ /**
1248
+ * **Platforms Only.** Url to a manifest that contains View Options. Properties other than manifestUrl can still be used
1249
+ * but the properties in the manifest will take precedence if there is any collision.
1250
+ */
426
1251
  manifestUrl: string;
427
1252
  zoomLevel: number;
428
1253
  experimental: any;
429
1254
  fdc3InteropApi?: string;
430
1255
  enableBeforeUnload: boolean;
1256
+ /**
1257
+ * Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
1258
+ */
431
1259
  accelerator?: Partial<Accelerator>;
1260
+ autoplayPolicy: AutoplayPolicyOptions;
432
1261
  };
433
- export declare type ViewState = ViewCreationOptions & {
1262
+ export type ViewState = ViewCreationOptions & {
434
1263
  backgroundThrottling: boolean;
435
1264
  componentName: 'view';
436
1265
  initialUrl: string;
437
1266
  minWidth?: number;
438
1267
  };
439
- export declare type Certificate = {
1268
+ export type Certificate = {
440
1269
  data: string;
441
1270
  fingerprint: string;
442
1271
  issuer: CertificatePrincipal;
@@ -448,7 +1277,7 @@ export declare type Certificate = {
448
1277
  validExpiry: number;
449
1278
  validStart: number;
450
1279
  };
451
- declare type CertificatePrincipal = {
1280
+ type CertificatePrincipal = {
452
1281
  commonName: string;
453
1282
  country: string;
454
1283
  locality: string;
@@ -456,74 +1285,161 @@ declare type CertificatePrincipal = {
456
1285
  organizationUnits: string[];
457
1286
  state: string;
458
1287
  };
459
- export declare type HostContextChangedPayload = {
1288
+ export type HostContextChangedPayload = {
1289
+ /**
1290
+ * The new context object
1291
+ */
460
1292
  context: any;
1293
+ /**
1294
+ * The reason for the update.
1295
+ */
461
1296
  reason: HostContextChangedReasons;
462
1297
  };
463
- export declare type ApplySnapshotOptions = {
1298
+ export type ApplySnapshotOptions = {
1299
+ /**
1300
+ * @defaultValue false
1301
+ *
1302
+ * When true, applySnapshot will close existing windows,
1303
+ * replacing current Platform state with the given snapshot.
1304
+ */
464
1305
  closeExistingWindows?: boolean;
1306
+ /**
1307
+ * @defaultValue false
1308
+ *
1309
+ * When true, applySnapshot will close existing includeInSnapshots: true windows,
1310
+ * replacing current Platform state with the given snapshot.
1311
+ */
465
1312
  closeSnapshotWindows?: boolean;
1313
+ /**
1314
+ * @defaultValue false
1315
+ *
1316
+ * When true, applySnapshot will not check whether any windows in a
1317
+ * snapshot are off-screen. By default, such windows will be repositioned to be on-screen,
1318
+ * as defined by {@link PlatformProvider#positionOutOfBoundsWindows PlatformProvider.positionOutOfBoundsWindows}.
1319
+ */
466
1320
  skipOutOfBoundsCheck?: boolean;
467
1321
  };
468
- export declare type ApplySnapshotPayload = {
1322
+ /**
1323
+ * Payload sent to Platform Provider when {@link Platform#applySnapshot Platform.applySnapshot} is called.
1324
+ */
1325
+ export type ApplySnapshotPayload = {
1326
+ /**
1327
+ * TThe snapshot to be applied.
1328
+ */
469
1329
  snapshot: Snapshot;
1330
+ /**
1331
+ * Options to customize snapshot application.
1332
+ */
470
1333
  options?: ApplySnapshotOptions;
471
1334
  };
472
- export declare type CreateViewPayload = {
1335
+ export type AddViewToStackOptions = {
1336
+ /**
1337
+ * Optional index within the stack to insert the view. Defaults to 0
1338
+ */
1339
+ index?: number;
1340
+ };
1341
+ export type CreateViewTarget = Identity & {
1342
+ /**
1343
+ * If specified, view creation will not attach to a window and caller must
1344
+ * insert the view into the layout explicitly
1345
+ */
1346
+ location?: {
1347
+ id: string;
1348
+ index?: number;
1349
+ };
1350
+ };
1351
+ export type CreateViewPayload = {
1352
+ /**
1353
+ * Options for the view to be added.
1354
+ */
473
1355
  opts: Partial<ViewOptions>;
474
- target: Identity;
1356
+ /**
1357
+ * Window the view will be added to. If no target is provided, a new window will be created.
1358
+ */
1359
+ target?: CreateViewTarget;
475
1360
  targetView?: Identity;
476
1361
  };
477
- export declare type ReplaceViewPayload = {
1362
+ export type ReplaceViewPayload = {
478
1363
  opts: {
479
1364
  viewToReplace: Identity;
480
1365
  newView: Partial<ViewOptions>;
481
1366
  };
482
1367
  target: Identity;
483
1368
  };
484
- export declare type CloseViewPayload = {
1369
+ export type CloseViewPayload = {
1370
+ /**
1371
+ *View to be closed.
1372
+ */
485
1373
  view: Identity;
486
1374
  };
487
- export declare type FetchManifestPayload = {
1375
+ export type FetchManifestPayload = {
1376
+ /**
1377
+ * The URL of the manifest to fetch.
1378
+ */
488
1379
  manifestUrl: string;
489
1380
  };
490
- export declare type ReplaceLayoutOpts = {
1381
+ export type ReplaceLayoutOpts = {
1382
+ /**
1383
+ * Layout config to be applied.
1384
+ */
491
1385
  layout: LayoutOptions;
492
1386
  };
493
- export declare type ReplaceLayoutPayload = {
1387
+ export type ReplaceLayoutPayload = {
1388
+ /**
1389
+ * Object containing the layout to be applied.
1390
+ */
494
1391
  opts: ReplaceLayoutOpts;
1392
+ /**
1393
+ * Identity of the window whose layout will be replace.
1394
+ */
495
1395
  target: Identity;
496
1396
  };
497
- export declare type SetWindowContextPayload = {
1397
+ export type SetWindowContextPayload = {
1398
+ /**
1399
+ * The requested context update.
1400
+ */
498
1401
  context: any;
1402
+ /**
1403
+ * Entity type of the target of the context update ('view' or 'window').
1404
+ */
499
1405
  entityType: EntityType;
1406
+ /**
1407
+ * Identity of the entity targeted by the call to {@link Platform#setWindowContext Platform.setWindowContext}.
1408
+ */
500
1409
  target: Identity;
501
1410
  };
502
- export declare type LaunchIntoPlatformPayload = {
1411
+ export type LaunchIntoPlatformPayload = {
503
1412
  manifest: any;
504
1413
  };
505
- export declare type GetWindowContextPayload = {
1414
+ export type GetWindowContextPayload = {
1415
+ /**
1416
+ * Entity type of the target of the context update ('view' or 'window').
1417
+ */
506
1418
  entityType: EntityType;
1419
+ /**
1420
+ * Identity of the entity targeted by the call to {@link Platform#setWindowContext Platform.setWindowContext}.
1421
+ */
507
1422
  target: Identity;
508
1423
  };
509
- export declare type ApplicationPermissions = {
1424
+ export type ApplicationPermissions = {
510
1425
  setFileDownloadLocation: boolean;
511
1426
  };
512
- export declare type LaunchExternalProcessRule = {
1427
+ export type LaunchExternalProcessRule = {
513
1428
  behavior: 'allow' | 'block';
514
1429
  match: string[];
515
1430
  };
516
- export declare type SystemPermissions = {
1431
+ export type SystemPermissions = {
517
1432
  getAllExternalWindows: boolean;
518
1433
  launchExternalProcess: boolean | {
519
- assets: {
1434
+ enabled: boolean;
1435
+ assets?: {
520
1436
  enabled: boolean;
521
1437
  srcRules?: LaunchExternalProcessRule[];
522
1438
  };
523
- downloads: {
1439
+ downloads?: {
524
1440
  enabled: boolean;
525
1441
  };
526
- executables: {
1442
+ executables?: {
527
1443
  enabled: boolean;
528
1444
  pathRules?: LaunchExternalProcessRule[];
529
1445
  };
@@ -538,33 +1454,60 @@ export declare type SystemPermissions = {
538
1454
  protocols: string[];
539
1455
  };
540
1456
  };
541
- export declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write';
542
- export declare type Permissions = {
1457
+ export type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write';
1458
+ export type Permissions = {
543
1459
  Application?: Partial<ApplicationPermissions>;
544
1460
  System?: Partial<SystemPermissions>;
545
1461
  webAPIs?: WebPermission[];
546
1462
  };
547
- export declare type PlatformWindowCreationOptions = Partial<WindowCreationOptions> & {
1463
+ export type PlatformWindowCreationOptions = Partial<WindowCreationOptions> & {
548
1464
  updateStateIfExists?: boolean;
549
1465
  reason?: WindowCreationReason;
550
1466
  };
551
- export declare type PlatformWindowOptions = WindowCreationOptions & {
1467
+ /**
1468
+ * Window options apply to all platform windows.
1469
+ * Any {@link Window~options Window option} is also a valid Default Window option
1470
+ * used by default in any window that is created in the current platform's scope.
1471
+ * Individual window options will override these defaults.
1472
+ */
1473
+ export type PlatformWindowOptions = WindowCreationOptions & {
1474
+ /**
1475
+ * Specify a path of a custom CSS file to be injected to all of the platform's windows.
1476
+ * _note_: this option is only applied to windows that use the Default OpenFin Window.
1477
+ * Windows with a specified url (Custom Windows) will not be affected by this option.
1478
+ */
552
1479
  stylesheetUrl: string;
553
1480
  };
554
- export declare type PlatformViewCreationOptions = Partial<ViewOptions> & {
555
- url: string;
556
- target: Identity;
557
- };
558
- export declare type ProcessAffinityStrategy = 'same' | 'different';
559
- export declare type PlatformOptions = ApplicationCreationOptions & {
1481
+ export type PlatformViewCreationOptions = Partial<ViewOptions>;
1482
+ /**
1483
+ * Strategy to assign views to process affinity by domain.
1484
+ *
1485
+ * `same`: views in the same domain will have the same process affinity.
1486
+ * `different`: views in the same domain will have different process affinities.
1487
+ */
1488
+ export type ProcessAffinityStrategy = 'same' | 'different';
1489
+ /**
1490
+ * The options object required by {@link Platform#start Platform.start}
1491
+ * Any {@link ApplicationOptions Application option} is also a valid platform option
1492
+ */
1493
+ export type PlatformOptions = ApplicationCreationOptions & {
1494
+ /**
1495
+ * Default window options apply to all platform windows.
1496
+ */
560
1497
  defaultWindowOptions?: Partial<PlatformWindowOptions>;
1498
+ /**
1499
+ * Default view options apply to all platform views.
1500
+ */
561
1501
  defaultViewOptions?: Partial<PlatformViewCreationOptions>;
562
1502
  disableDefaultCommands?: boolean;
1503
+ /**
1504
+ * Strategy to assign views to process affinity by domain.
1505
+ */
563
1506
  viewProcessAffinityStrategy?: ProcessAffinityStrategy;
564
1507
  providerUrl?: string;
565
1508
  permissions?: Partial<Permissions>;
566
1509
  };
567
- export declare type Manifest = {
1510
+ export type Manifest = {
568
1511
  appAssets?: {
569
1512
  alias: string;
570
1513
  args?: string;
@@ -620,9 +1563,20 @@ export declare type Manifest = {
620
1563
  };
621
1564
  interopBrokerConfiguration: InteropBrokerOptions;
622
1565
  };
623
- export declare type LayoutContent = (LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent)[];
624
- export declare type LayoutItemConfig = {
1566
+ export type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
1567
+ /**
1568
+ * Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
1569
+ * to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot} or our
1570
+ * {@link https://openfin.github.io/golden-prototype/config-gen Layout Config Generation Tool }..
1571
+ */
1572
+ export type LayoutItemConfig = {
1573
+ /**
1574
+ * The type of the item. Possible values are 'row', 'column', 'stack', and 'component'.
1575
+ */
625
1576
  type: string;
1577
+ /**
1578
+ * Array of configurations for items that will be created as children of this item.
1579
+ */
626
1580
  content?: LayoutContent;
627
1581
  width?: number;
628
1582
  height?: number;
@@ -640,17 +1594,73 @@ export interface LayoutComponent extends LayoutItemConfig {
640
1594
  componentName: 'view';
641
1595
  componentState?: Partial<ViewCreationOptions>;
642
1596
  }
643
- export declare type LayoutOptions = {
1597
+ export type LayoutOptions = {
1598
+ /**
1599
+ * Represents a potential ways to customize behavior of your Layout
1600
+ */
644
1601
  settings?: {
1602
+ /**
1603
+ * @defaultValue false
1604
+ *
1605
+ * Whether the popout button will only act on the entire stack,
1606
+ * as opposed to only the active tab.
1607
+ */
645
1608
  popoutWholeStack?: boolean;
1609
+ /**
1610
+ * @defaultValue false
1611
+ *
1612
+ * Limits the area to which tabs can be dragged.
1613
+ * If true, stack headers are the only areas where tabs can be dropped.
1614
+ */
646
1615
  constrainDragToContainer?: boolean;
1616
+ /**
1617
+ * @defaultValue false
1618
+ *
1619
+ * Whether to show the popout button on stack header.
1620
+ * The button will create a new window with current tab as its content.
1621
+ * In case `popoutWholeStack` is set to true, all tabs in the stack will be in the new window.
1622
+ */
647
1623
  showPopoutIcon?: boolean;
1624
+ /**
1625
+ * @defaultValue false
1626
+ *
1627
+ * Whether to show the maximize button on stack header.
1628
+ * The button will maximize the current tab to fill the entire window.
1629
+ */
648
1630
  showMaximiseIcon?: boolean;
1631
+ /**
1632
+ * @defaultValue false
1633
+ *
1634
+ * Whether to show the close button on stack header
1635
+ * (not to be confused with close button on every tab).
1636
+ */
649
1637
  showCloseIcon?: boolean;
650
1638
  constrainDragToHeaders?: boolean;
1639
+ /**
1640
+ * @defaultValue true
1641
+ *
1642
+ * Turns tab headers on or off.
1643
+ * If false, the layout will be displayed with splitters only.
1644
+ */
651
1645
  hasHeaders?: boolean;
1646
+ /**
1647
+ * @defaultValue true
1648
+ *
1649
+ * If true, the user can re-arrange the layout by
1650
+ * dragging items by their tabs to the desired location.
1651
+ */
652
1652
  reorderEnabled?: boolean;
1653
+ /**
1654
+ * @defaultValue false
1655
+ *
1656
+ * If true, tabs can't be dragged out of the window.
1657
+ */
653
1658
  preventDragOut?: boolean;
1659
+ /**
1660
+ * @defaultValue=false
1661
+ *
1662
+ * If true, tabs can't be dragged into the window.
1663
+ */
654
1664
  preventDragIn?: boolean;
655
1665
  };
656
1666
  content?: LayoutContent;
@@ -661,280 +1671,315 @@ export declare type LayoutOptions = {
661
1671
  headerHeight?: number;
662
1672
  };
663
1673
  };
664
- export declare type OverrideCallback<T extends any = PlatformProvider, U extends T = T> = (arg: Constructor<T>, ...args: ConstructorParameters<Constructor<T>>) => U | Promise<U>;
665
- export declare type Constructor<T = {}> = new (...args: any[]) => T;
666
- export declare type HostContextChangedReasons = 'updated' | 'reparented';
667
- export declare type WindowCreationReason = 'tearout' | 'create-view-without-target' | 'api-call' | 'app-creation' | 'restore' | 'apply-snapshot';
668
- export declare type PlatformProvider = {
669
- /**
670
- * Handles requests to create a window in the current platform.
671
- * @param { WindowOption } payload Window options for the window to be created.
672
- * @param { Identity } [identity] If {@link Platform#createWindow Platform.createWindow} was called, the identity of the caller will be here.
673
- * If `createWindow` was called as part of applying a snapshot or creating a view without a target window, `identity` will be undefined.
674
- */
675
- createWindow(options: PlatformWindowCreationOptions, identity?: Identity): Promise<_Window>;
676
- /**
677
- * Gets the current state of windows and their views and returns a snapshot object containing that info.
678
- * @param { undefined } payload Undefined unless you've defined a custom `getSnapshot` protocol.
679
- * @param { Identity } identity Identity of the entity that called {@link Platform#getSnapshot Platform.getSnapshot}.
680
- * @return { Promise<Snapshot> } Snapshot of current platform state.
681
- */
682
- getSnapshot(payload: undefined, identity: Identity): Promise<Snapshot>;
683
- /**
684
- * 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.
685
- * @param { Identity } payload Identity of the view.
686
- * @return { Promise<ViewState> }
687
- */
688
- getViewSnapshot(payload: {
689
- viewIdentity: Identity;
690
- }): Promise<ViewState>;
691
- /**
692
- * Called when a snapshot is being applied and some windows in that snapshot would be fully or partially off-screen.
693
- * Returns an array of windows with modified positions, such that any off-screen windows are positioned in the top left
694
- * corner of the main monitor.
695
- * @param { Snapshot } snapshot The snapshot to be applied.
696
- * @param { WindowOptions[] } outOfBoundsWindows An array of WindowOptions for any windows that would be off-screen.
697
- * @return { Promise<WindowOptions[]> } An array of WindowOptions with their position modified to fit on screen.
698
- */
699
- positionOutOfBoundsWindows(snapshot: Snapshot, outOfBoundsWindows: WindowCreationOptions[]): Promise<WindowCreationOptions[]>;
700
- /**
701
- * Handles requests to apply a snapshot to the current Platform.
702
- * @param { ApplySnapshotPayload } payload Payload containing the snapshot to be applied, as well as any options.
703
- * @param { Identity } [identity] Identity of the entity that called {@link Platform#applySnapshot Platform.applySnapshot}.
704
- * Undefined if called internally (e.g. when opening the initial snapshot).
705
- * @return { Promise<void> }
706
- */
707
- applySnapshot(payload: ApplySnapshotPayload, identity?: Identity): Promise<void>;
708
- /**
709
- * Closes the current Platform and all child windows and views.
710
- * @param { undefined } payload Undefined unless you have implemented a custom quite protocol.
711
- * @param { Identity } identity Identity of the entity that called {@link Platform#quit Platform.quit}.
712
- * @return { Promise<void> }
713
- */
714
- quit(payload: undefined, identity: Identity): Promise<void>;
715
- /**
716
- * Closes a view
717
- * @param { CloseViewPayload } payload Specifies the `target` view to be closed.
718
- * @param { Identity } identity Identity of the entity that called {@link Platform#closeView Platform.closeView}.
719
- */
720
- closeView(payload: CloseViewPayload, identity?: Identity): Promise<any>;
721
- /**
722
- * Creates a new view and attaches it to a specified target window.
723
- * @param { CreateViewPayload } payload Creation options for the new view.
724
- * @param { Identity } identity Identity of the entity that called {@link Platform#createView Platform.createView}.
725
- * @return { Promise<void> }
726
- */
727
- createView(payload: CreateViewPayload, identity: Identity): Promise<View>;
728
- /** Handles requests to fetch manifests in the current platform.
729
- * @param { FetchManifestPayload } payload Payload containing the manifestUrl to be fetched.
730
- * @param { Identity } callerIdentity If {@link Platform#fetchManifest Platform.fetchManifest}
731
- * was called, the identity of the caller will be here.
732
- * If `fetchManifest` was called internally, `callerIdentity` will be the provider's identity.
733
- */
734
- fetchManifest(payload: FetchManifestPayload, callerIdentity: Identity): Promise<any>;
735
- /**
736
- * Replaces a Platform window's layout with a new layout. Any views that were in the old layout but not the new layout will be destroyed.
737
- * @param { ReplaceLayoutPayload } payload Contains the `target` window and an `opts` object with a `layout` property to apply.
738
- * @param { Identity } [identity] Identity of the entity that called {@link Platform#replaceLayout Platform.replaceLayout}.
739
- * Undefined if `replaceLayout` is called internally (e.g. while applying a snapshot).
740
- * @return { Promise<void> }
741
- */
742
- replaceLayout(payload: ReplaceLayoutPayload, identity?: Identity): Promise<void>;
743
- replaceView(payload: ReplaceViewPayload, identity?: Identity): Promise<void>;
744
- launchIntoPlatform(payload: LaunchIntoPlatformPayload): Promise<void>;
745
- /**
746
- * Handles requests to set a window's context. `target` may be a window or a view.
747
- * If it is a window, that window's `customContext` will be updated.
748
- * If it is a view, the `customContext` of that view's current host window will be updated.
749
- * @param { SetWindowContextPayload } payload Object containing the requested `context` update,
750
- * the `target`'s identity, and the target's `entityType`.
751
- * @param { Identity } [identity] Identity of the entity that called {@link Platform#setWindowContext Platform.setWindowContext}.
752
- * Undefined if `setWindowContext` is called internally (e.g. while applying a snapshot).
753
- * @return { Promise<any> } The new context.
754
- */
755
- setWindowContext(payload: SetWindowContextPayload, identity?: Identity): Promise<any>;
756
- /**
757
- * Handles requests to get a window's context. `target` may be a window or a view.
758
- * If it is a window, that window's `customContext` will be returned.
759
- * If it is a view, the `customContext` of that view's current host window will be returned.
760
- * @param { GetWindowContextPayload } payload Object containing the requested `context` update,
761
- * the `target`'s identity, and the target's `entityType`.
762
- * @param { Identity } [identity] Identity of the entity that called {@link Platform#getWindowContext Platform.getWindowContext}.
763
- * Undefined when `getWindowContext` is called internally
764
- * (e.g. when getting a window's context for the purpose of raising a "host-context-changed" event on a reparented view).
765
- * @return { Promise<any> } The new context.
766
- */
767
- getWindowContext(payload: GetWindowContextPayload, identity?: Identity): Promise<any>;
768
- /**
769
- * Called when a window's `customContext` is updated. Responsible for raising the `host-context-updated` event on that window's child views.
770
- * @param { WindowOptionsChangedEvent<'window', 'options-changed'> } payload The event payload for the window whose context has changed.
771
- * The new context will be contained as `payload.diff.customContext.newVal`.
772
- * @return { Promise<HostContextChangedPayload> } The event that it raised.
773
- */
774
- onWindowContextUpdated(payload: WindowOptionsChangedEvent): Promise<HostContextChangedPayload | undefined>;
775
- /**
776
- * Closes a Window.
777
- * By default it will fire any before unload handler set by a View in the Window.
778
- * This can be disabled by setting skipBeforeUnload in the options object of the payload.
779
- * This method is called by {@link Platform#closeWindow Platform.closeWindow}.
780
- * @param {CloseWindowPayload} payload Object that contains the Window Identity and related options.
781
- * @param {Identity} callerIdentity
782
- * @returns {Promise<void>}
783
- */
784
- closeWindow(payload: CloseWindowPayload, callerIdentity: Identity): Promise<void>;
785
- /**
786
- * Gets all the Views attached to a Window that should close along with it. This is meant to be overridable
787
- * in the case where you want to return other Views that may not be attached to the Window that is closing.
788
- * @param winId Identity of the Window that is closing
789
- * @returns { Promise<View> }
790
- */
791
- getViewsForWindowClose(windowId: Identity): Promise<View[]>;
792
- /**
793
- * It takes in an array of Views and returns an object specifying which of them are trying to prevent an unload and which are not.
794
- * @param {View[]} views Array of Views
795
- * @returns { Promise<ViewStatuses> }
796
- */
797
- checkViewsForPreventUnload(views: View[]): Promise<ViewStatuses>;
798
- /**
799
- * Handle the decision of whether a Window or specific View should close when trying to prevent an unload. This is meant to be overridden.
800
- * Called in {@link PlatformProvider#closeWindow PlatformProvider.closeWindow}.
801
- * Normally you would use this method to show a dialog indicating that there are Views that are trying to prevent an unload.
802
- * By default it will always return all Views passed into it as meaning to close.
803
- * @param {ViewsPreventingUnloadPayload} payload
804
- * @tutorial PlatformProvider.getUserDecisionForBeforeUnload
805
- * @returns {Promise<BeforeUnloadUserDecision>}
806
- */
807
- getUserDecisionForBeforeUnload(payload: ViewsPreventingUnloadPayload): Promise<BeforeUnloadUserDecision>;
808
- /**
809
- * Handles the closing of a Window and/or its Views. Called in {@link PlatformProvider#closeWindow PlatformProvider.closeWindow}.
810
- * The return of {@link PlatformProvider#getUserDecisionForBeforeUnload PlatformProvider.getUserDecisionForBeforeUnload} is passed into this method.
811
- * @param {Identity} winId Identity of the Window
812
- * @param {BeforeUnloadUserDecision} userDecision Decision object
813
- * @returns {Promise<void>}
814
- */
815
- handleViewsAndWindowClose(windowId: Identity, userDecision: BeforeUnloadUserDecision): Promise<void>;
816
- };
817
- export declare type InitPlatformOptions = {
1674
+ export type OverrideCallback<T extends any = PlatformProvider, U extends T = T> = (arg: Constructor<T>) => U | Promise<U>;
1675
+ export type Constructor<T = {}> = new () => T;
1676
+ export type HostContextChangedReasons = 'updated' | 'reparented';
1677
+ export type WindowCreationReason = 'tearout' | 'create-view-without-target' | 'api-call' | 'app-creation' | 'restore' | 'apply-snapshot';
1678
+ export type InitPlatformOptions = {
818
1679
  overrideCallback?: OverrideCallback<PlatformProvider>;
1680
+ /**
1681
+ * A callback function that can be used to extend or replace default Provider behavior.
1682
+ */
819
1683
  interopOverride?: OverrideCallback<InteropBroker>;
820
1684
  };
821
- export declare type ProcessDetails = {
1685
+ export type ProcessDetails = {
1686
+ /**
1687
+ * The percentage of total CPU usage.
1688
+ */
822
1689
  cpuUsage: number;
1690
+ /**
1691
+ * The current nonpaged pool usage in bytes.
1692
+ */
823
1693
  nonPagedPoolUsage: number;
824
1694
  pageFaultCount: number;
1695
+ /**
1696
+ * The current paged pool usage in bytes.
1697
+ */
825
1698
  pagedPoolUsage: number;
1699
+ /**
1700
+ * The total amount of memory in bytes that the memory manager has committed
1701
+ */
826
1702
  pagefileUsage: number;
1703
+ /**
1704
+ * The peak nonpaged pool usage in bytes.
1705
+ */
827
1706
  peakNonPagedPoolUsage: number;
1707
+ /**
1708
+ * The peak paged pool usage in bytes.
1709
+ */
828
1710
  peakPagedPoolUsage: number;
1711
+ /**
1712
+ * The peak value in bytes of pagefileUsage during the lifetime of this process.
1713
+ */
829
1714
  peakPagefileUsage: number;
1715
+ /**
1716
+ * The peak working set size in bytes.
1717
+ */
830
1718
  peakWorkingSetSize: number;
1719
+ /**
1720
+ * The current working set size (both shared and private data) in bytes.
1721
+ */
831
1722
  workingSetSize: number;
832
1723
  privateSetSize: number;
1724
+ /**
1725
+ * The native process identifier.
1726
+ */
833
1727
  pid: number;
834
1728
  };
835
- export declare type FrameProcessDetails = ProcessDetails & {
1729
+ export type FrameProcessDetails = ProcessDetails & {
1730
+ /**
1731
+ * Current URL associated with the process.
1732
+ */
836
1733
  url: string;
1734
+ /**
1735
+ * Type for the frame.
1736
+ */
837
1737
  entityType: string;
838
1738
  };
839
- export declare type EntityProcessDetails = FrameProcessDetails & {
1739
+ export type EntityProcessDetails = FrameProcessDetails & {
840
1740
  name: string;
841
1741
  uuid: string;
842
1742
  iframes: FrameProcessDetails[];
843
1743
  };
844
- export declare type AppProcessInfo = {
1744
+ export type AppProcessInfo = {
1745
+ /**
1746
+ * The uuid of the application.
1747
+ */
845
1748
  uuid: string;
1749
+ /**
1750
+ * Process info for each window and view for the application.
1751
+ */
846
1752
  entities: EntityProcessDetails[];
847
1753
  };
848
- export declare type NonAppProcessDetails = ProcessDetails & {
1754
+ export type NonAppProcessDetails = ProcessDetails & {
849
1755
  name: string;
850
1756
  };
851
- export declare type SystemProcessInfo = {
1757
+ export type SystemProcessInfo = {
852
1758
  apps: AppProcessInfo[];
853
1759
  browserProcess: NonAppProcessDetails;
854
1760
  nonApps: NonAppProcessDetails[];
855
1761
  };
856
- export declare type ClearCacheOption = {
1762
+ export type ClearCacheOption = {
1763
+ /**
1764
+ * html5 application cache
1765
+ */
857
1766
  appcache?: boolean;
1767
+ /**
1768
+ * browser data cache for html files and images
1769
+ */
858
1770
  cache?: boolean;
1771
+ /**
1772
+ * browser cookies
1773
+ */
859
1774
  cookies?: boolean;
1775
+ /**
1776
+ * browser data that can be used across sessions
1777
+ */
860
1778
  localStorage?: boolean;
861
1779
  };
862
- export declare type CookieInfo = {
1780
+ export type CookieInfo = {
863
1781
  name: string;
864
1782
  domain: string;
865
1783
  path: string;
866
1784
  };
867
- export declare type CookieOption = {
1785
+ export type CookieOption = {
868
1786
  name: string;
869
1787
  };
870
- export declare type CrashReporterOptions = {
1788
+ export type CrashReporterOptions = {
1789
+ /**
1790
+ * In diagnostics mode the crash reporter will send diagnostic logs to
1791
+ * the OpenFin reporting service on runtime shutdown
1792
+ */
871
1793
  diagnosticsMode: boolean;
872
1794
  };
873
- export declare type CrashReporterState = CrashReporterOptions & {
1795
+ export type CrashReporterState = CrashReporterOptions & {
1796
+ /**
1797
+ * Whether the crash reporter is running
1798
+ */
874
1799
  isRunning: boolean;
875
1800
  diagnosticMode: boolean;
876
1801
  };
877
- export declare type Time = {
1802
+ export type Time = {
1803
+ /**
1804
+ * The number of milliseconds the CPU has spent in user mode.
1805
+ */
878
1806
  user: number;
1807
+ /**
1808
+ * The number of milliseconds the CPU has spent in nice mode.
1809
+ */
879
1810
  nice: number;
1811
+ /**
1812
+ * The number of milliseconds the CPU has spent in sys mode.
1813
+ */
880
1814
  sys: number;
1815
+ /**
1816
+ * The number of milliseconds the CPU has spent in idle mode.
1817
+ */
881
1818
  idle: number;
1819
+ /**
1820
+ * The number of milliseconds the CPU has spent in irq mode.
1821
+ */
882
1822
  irq: number;
883
1823
  };
884
- export declare type CpuInfo = {
1824
+ export type CpuInfo = {
1825
+ /**
1826
+ * The model of the cpu
1827
+ */
885
1828
  model: string;
1829
+ /**
1830
+ * The CPU clock speed in MHz
1831
+ */
886
1832
  speed: number;
1833
+ /**
1834
+ * The numbers of milliseconds the CPU has spent in different modes.
1835
+ */
887
1836
  times: Time;
888
1837
  };
889
- export declare type GpuInfo = {
1838
+ export type GpuInfo = {
890
1839
  name: string;
891
1840
  };
892
- export declare type HostSpecs = {
1841
+ export type HostSpecs = {
1842
+ /**
1843
+ * True if Aero Glass theme is supported on Windows platforms
1844
+ */
893
1845
  aeroGlassEnabled?: boolean;
1846
+ /**
1847
+ * "x86" for 32-bit or "x86_64" for 64-bit
1848
+ */
894
1849
  arch: string;
1850
+ /**
1851
+ * The same payload as Node's os.cpus()
1852
+ */
895
1853
  cpus: CpuInfo[];
1854
+ /**
1855
+ * The graphics card name
1856
+ */
896
1857
  gpu: GpuInfo;
1858
+ /**
1859
+ * The same payload as Node's os.totalmem()
1860
+ */
897
1861
  memory: number;
1862
+ /**
1863
+ * The OS name and version/edition
1864
+ */
898
1865
  name: string;
1866
+ /**
1867
+ * True if screensaver is running. Supported on Windows only.
1868
+ */
899
1869
  screenSaver?: boolean;
900
1870
  };
901
- export declare type PrinterInfo = {
1871
+ export type PrinterInfo = {
902
1872
  name: string;
903
1873
  description: string;
904
1874
  status: number;
905
1875
  isDefault: boolean;
906
1876
  };
907
- export declare type Dpi = {
1877
+ /**
1878
+ * DPI (dots per inch) configuration for printing.
1879
+ */
1880
+ export type Dpi = {
1881
+ /**
1882
+ * DPI (dots per inch) in the horizontal direction.
1883
+ */
908
1884
  horizontal?: number;
1885
+ /**
1886
+ * DPI (dots per inch) in the vertical direction.
1887
+ */
909
1888
  vertical?: number;
910
1889
  };
911
- export declare type Margins = {
1890
+ /**
1891
+ * Margins configuration for printing.
1892
+ */
1893
+ export type Margins = {
912
1894
  marginType?: 'default' | 'none' | 'printableArea' | 'custom';
1895
+ /**
1896
+ * The top margin of the printed webpage, in pixels.
1897
+ */
913
1898
  top?: number;
1899
+ /**
1900
+ * The bottom margin of the printed webpage, in pixels.
1901
+ */
914
1902
  bottom?: number;
1903
+ /**
1904
+ * The left margin of the printed webpage, in pixels.
1905
+ */
915
1906
  left?: number;
1907
+ /**
1908
+ * The right margin of the printed webpage, in pixels.
1909
+ */
916
1910
  right?: number;
917
1911
  };
918
- export declare type PrintOptions = {
1912
+ /**
1913
+ * Options for printing a webpage in OpenFin.
1914
+ */
1915
+ export type PrintOptions = {
1916
+ /**
1917
+ * Disables prompting the user for print settings.
1918
+ */
919
1919
  silent?: boolean;
1920
+ /**
1921
+ * Includes the webpage background color and image when printing.
1922
+ */
920
1923
  printBackground?: boolean;
1924
+ /**
1925
+ * Name of the printer device to use.
1926
+ */
921
1927
  deviceName?: string;
1928
+ /**
1929
+ * Prints in full color (greyscale otherwise).
1930
+ */
922
1931
  color?: boolean;
1932
+ /**
1933
+ * Margins for printed webpage.
1934
+ */
923
1935
  margins?: Margins;
1936
+ /**
1937
+ * Prints in landscape mode (portrait otherwise).
1938
+ */
924
1939
  landscape?: boolean;
1940
+ /**
1941
+ * Scale factor of the printer webpage.
1942
+ */
925
1943
  scaleFactor?: number;
1944
+ /**
1945
+ * Number of webpage pages to print per printer sheet.
1946
+ */
926
1947
  pagesPerSheet?: number;
1948
+ /**
1949
+ * Collates the webpage before printing.
1950
+ */
927
1951
  collate?: boolean;
1952
+ /**
1953
+ * Number of copies to be printed.
1954
+ */
928
1955
  copies?: number;
929
- pageRanges?: Record<string, number>;
1956
+ /**
1957
+ * Page range to print.
1958
+ */
1959
+ pageRanges?: Record<'from' | 'to', number>;
1960
+ /**
1961
+ * Duplex mode of the printed webpage.
1962
+ */
930
1963
  duplexMode?: 'simplex' | 'shortEdge' | 'longEdge';
1964
+ /**
1965
+ * Dots per inch of the printed webpage.
1966
+ */
931
1967
  dpi?: Dpi;
932
1968
  };
933
- export declare type WriteRequestType = {
1969
+ /**
1970
+ * A request to write data to the clipboard.
1971
+ */
1972
+ export type WriteRequestType = {
1973
+ /**
1974
+ * Data to write to the clipboard.
1975
+ */
934
1976
  data: string;
1977
+ /**
1978
+ * The type of clipboard to write to.
1979
+ */
935
1980
  type?: string;
936
1981
  };
937
- export declare type WriteAnyRequestType = {
1982
+ export type WriteAnyRequestType = {
938
1983
  data: {
939
1984
  text?: string;
940
1985
  html?: string;
@@ -942,37 +1987,64 @@ export declare type WriteAnyRequestType = {
942
1987
  };
943
1988
  type?: string;
944
1989
  };
945
- export declare type SubscriptionOptions = {
1990
+ export type SubscriptionOptions = {
1991
+ /**
1992
+ * The event timestamp.
1993
+ */
946
1994
  timestamp?: number;
947
1995
  };
948
- export declare type SharedWorkerInfo = {
1996
+ export type SharedWorkerInfo = {
949
1997
  id: string;
950
1998
  url: string;
951
1999
  };
952
- export declare type ServiceIdentifier = {
2000
+ export type ServiceIdentifier = {
2001
+ /**
2002
+ * The name of the service.
2003
+ */
953
2004
  name: string;
954
2005
  };
955
- export declare type ServiceConfiguration = {
2006
+ export type ServiceConfiguration = {
956
2007
  config: object;
2008
+ /**
2009
+ * The name of the service.
2010
+ */
957
2011
  name: string;
958
2012
  };
959
- export declare type RVMInfo = {
2013
+ export type RVMInfo = {
2014
+ /**
2015
+ * The name of action: "get-rvm-info".
2016
+ */
960
2017
  'action': string;
2018
+ /**
2019
+ * The app log directory.
2020
+ */
961
2021
  'appLogDirectory': string;
2022
+ /**
2023
+ * The path of OpenfinRVM.exe.
2024
+ */
962
2025
  'path': string;
2026
+ /**
2027
+ * The start time of RVM.
2028
+ */
963
2029
  'start-time': string;
2030
+ /**
2031
+ * The version of RVM.
2032
+ */
964
2033
  'version': string;
2034
+ /**
2035
+ * The path to the working directory.
2036
+ */
965
2037
  'working-dir': string;
966
2038
  };
967
- export declare type AppVersionProgress = {
2039
+ export type AppVersionProgress = {
968
2040
  manifest: string | null;
969
2041
  srcManifest: string;
970
2042
  };
971
- export declare type AppVersionError = {
2043
+ export type AppVersionError = {
972
2044
  error: string;
973
2045
  srcManifest: string;
974
2046
  };
975
- export declare type AppVersionRuntimeInfo = {
2047
+ export type AppVersionRuntimeInfo = {
976
2048
  version: string | null;
977
2049
  exists: boolean | null;
978
2050
  writeAccess: boolean | null;
@@ -980,147 +2052,343 @@ export declare type AppVersionRuntimeInfo = {
980
2052
  healthCheck: boolean | null;
981
2053
  error: string | null;
982
2054
  };
983
- export declare type LaunchEmitter = TypedEventEmitter<AppVersionEvent>;
984
- export declare type RvmLaunchOptions = {
2055
+ export type LaunchEmitter = TypedEventEmitter<AppVersionEvent>;
2056
+ export type RvmLaunchOptions = {
2057
+ /**
2058
+ * True if no UI when launching
2059
+ */
985
2060
  noUi?: boolean;
986
2061
  userAppConfigArgs?: object;
2062
+ /**
2063
+ * Timeout in seconds until RVM launch request expires.
2064
+ */
987
2065
  timeToLive?: number;
2066
+ /**
2067
+ * Called whenever app version resolver events occur.
2068
+ */
988
2069
  subscribe?: (launch: LaunchEmitter) => void;
989
2070
  };
990
- export declare type ShortCutConfig = {
2071
+ export type ShortCutConfig = {
2072
+ /**
2073
+ * True if application has a shortcut on the desktop.
2074
+ */
991
2075
  desktop?: boolean;
2076
+ /**
2077
+ * True if application has shortcut in the start menu.
2078
+ */
992
2079
  startMenu?: boolean;
2080
+ /**
2081
+ * True if application will be launched on system startup.
2082
+ */
993
2083
  systemStartup?: boolean;
994
2084
  };
995
- export declare type TerminateExternalRequestType = {
2085
+ export type TerminateExternalRequestType = {
2086
+ /**
2087
+ * The uuid of the running application.
2088
+ */
996
2089
  uuid: string;
2090
+ /**
2091
+ * Time out period before the running application terminates.
2092
+ */
997
2093
  timeout: number;
2094
+ /**
2095
+ * Value to terminate the running application.
2096
+ */
998
2097
  killTree: boolean;
999
2098
  };
1000
- export declare type TrayInfo = {
2099
+ export type TrayInfo = {
2100
+ /**
2101
+ * The bound of tray icon in virtual screen pixels.
2102
+ */
1001
2103
  bounds: Rectangle;
2104
+ /**
2105
+ * Please see fin.System.getMonitorInfo for more information.
2106
+ */
1002
2107
  monitorInfo: MonitorInfo;
2108
+ /**
2109
+ * Copy of `bounds.x`.
2110
+ */
1003
2111
  x: number;
2112
+ /**
2113
+ * Copy of `bounds.y`.
2114
+ */
1004
2115
  y: number;
1005
2116
  };
1006
- export declare type Transition = {
2117
+ export type Transition = {
1007
2118
  opacity?: Opacity;
1008
2119
  position?: Position;
1009
2120
  size?: Size;
1010
2121
  };
1011
- export declare type Size = TransitionBase & {
2122
+ export type Size = TransitionBase & {
2123
+ /**
2124
+ * Optional if height is present. Defaults to the window's current width.
2125
+ */
1012
2126
  width: number;
2127
+ /**
2128
+ * Optional if width is present. Defaults to the window's current height.
2129
+ */
1013
2130
  height: number;
1014
2131
  };
1015
- export declare type Opacity = TransitionBase & {
2132
+ export type Opacity = TransitionBase & {
2133
+ /**
2134
+ * The opacity from 0.0 (transparent) to 1.0 (normal).
2135
+ */
1016
2136
  opacity: number;
1017
2137
  };
1018
- export declare type TransitionBase = {
2138
+ /**
2139
+ * Base configuration options needed for all types of transitions.
2140
+ */
2141
+ export type TransitionBase = {
2142
+ /**
2143
+ * The total time in milliseconds this transition should take.
2144
+ */
1019
2145
  duration: number;
2146
+ /**
2147
+ * @defaultValue false
2148
+ *
2149
+ * Treats 'opacity' as absolute or as a delta. Defaults to false.
2150
+ */
1020
2151
  relative?: boolean;
1021
2152
  };
1022
- export declare type Position = TransitionBase & {
2153
+ export type Position = TransitionBase & {
2154
+ /**
2155
+ * Defaults to the window's current left position in virtual screen coordinates.
2156
+ */
1023
2157
  left: number;
2158
+ /**
2159
+ * Defaults to the window's current top position in virtual screen coordinates.
2160
+ */
1024
2161
  top: number;
1025
2162
  };
1026
- export declare type AnchorType = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
1027
- export declare type TransitionOptions = {
2163
+ export type AnchorType = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
2164
+ /**
2165
+ * Configuration for transition between windows.
2166
+ */
2167
+ export type TransitionOptions = {
2168
+ /**
2169
+ * Interrupts the current animation (otherwise, the animation is added to the end of the queue).
2170
+ */
1028
2171
  interrupt: boolean;
2172
+ /**
2173
+ * @defaultValue false
2174
+ *
2175
+ * Treats 'opacity' as absolute or as a delta. Defaults to false.
2176
+ */
2177
+ relative?: boolean;
1029
2178
  tween?: tween;
1030
2179
  };
1031
- export declare type tween = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'ease-in-quad' | 'ease-out-quad' | 'ease-in-out-quad' | 'ease-in-cubic' | 'ease-out-cubic' | 'ease-in-out-cubic' | 'ease-out-bounce' | 'ease-in-back' | 'ease-out-back' | 'ease-in-out-back' | 'ease-in-elastic' | 'ease-out-elastic' | 'ease-in-out-elastic';
1032
- export declare type FindInPageOptions = {
2180
+ export type tween = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'ease-in-quad' | 'ease-out-quad' | 'ease-in-out-quad' | 'ease-in-cubic' | 'ease-out-cubic' | 'ease-in-out-cubic' | 'ease-out-bounce' | 'ease-in-back' | 'ease-out-back' | 'ease-in-out-back' | 'ease-in-elastic' | 'ease-out-elastic' | 'ease-in-out-elastic';
2181
+ /**
2182
+ * Configuration for find-in-page requests.
2183
+ */
2184
+ export type FindInPageOptions = {
2185
+ /**
2186
+ * @defaultValue true
2187
+ *
2188
+ * Searches in the forward direction (backward otherwise)
2189
+ */
1033
2190
  forward?: boolean;
2191
+ /**
2192
+ * @defaultValue false
2193
+ *
2194
+ * Begins a new text-finding session; should be true for first request only, and false on subsequent requests.
2195
+ */
1034
2196
  findNext?: boolean;
2197
+ /**
2198
+ * @defaultValue false
2199
+ *
2200
+ * Enables case-sensitive searching.
2201
+ */
1035
2202
  matchCase?: boolean;
2203
+ /**
2204
+ * @defaultValue false
2205
+ *
2206
+ * Only searches from the start of words.
2207
+ */
1036
2208
  wordStart?: boolean;
2209
+ /**
2210
+ * @defaultValue false
2211
+ *
2212
+ * 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>
2213
+ * lowercase or non-letter. Accepts several other intra-word matches.
2214
+ */
1037
2215
  medialCapitalAsWordStart?: boolean;
1038
2216
  };
1039
- export declare type FrameInfo = {
2217
+ export type FindInPageResult = {
2218
+ requestId: number;
2219
+ /**
2220
+ * Position of the active match.
2221
+ */
2222
+ activeMatchOrdinal: number;
2223
+ /**
2224
+ * Number of Matches.
2225
+ */
2226
+ matches: number;
2227
+ /**
2228
+ * Coordinates of first match region.
2229
+ */
2230
+ selectionArea: Rectangle;
2231
+ finalUpdate: boolean;
2232
+ };
2233
+ export type FrameInfo = {
1040
2234
  name: string;
1041
2235
  uuid: string;
1042
2236
  entityType: EntityType;
1043
2237
  parent: Identity;
1044
2238
  };
1045
- export declare type ExternalApplicationInfo = {
2239
+ export type ExternalApplicationInfo = {
1046
2240
  parent: Identity;
1047
2241
  };
1048
- export declare type ExternalConnection = {
2242
+ export type ExternalConnection = {
2243
+ /**
2244
+ * The token to broker an external connection.
2245
+ */
1049
2246
  token: string;
2247
+ /**
2248
+ * Unique identifier for the connection.
2249
+ */
1050
2250
  uuid: string;
1051
2251
  };
1052
- export declare type ExternalProcessRequestType = {
2252
+ export type ExternalProcessRequestType = {
2253
+ /**
2254
+ * The file path to where the running application resides.
2255
+ */
1053
2256
  path?: string;
1054
2257
  alias?: string;
2258
+ /**
2259
+ * The arguments to pass to the application.
2260
+ */
1055
2261
  arguments?: string;
1056
2262
  listener?: LaunchExternalProcessListener;
1057
2263
  lifetime?: string;
1058
2264
  certificate?: CertificationInfo;
1059
2265
  uuid?: string;
2266
+ /**
2267
+ * Initial window state after launching: 'normal' (default), 'minimized', 'maximized'.
2268
+ */
1060
2269
  initialWindowState?: string;
2270
+ /**
2271
+ * Current working directory.
2272
+ */
1061
2273
  cwd?: string;
1062
2274
  };
1063
- export declare type CertificationInfo = {
2275
+ export type CertificationInfo = {
1064
2276
  serial?: string;
1065
2277
  subject?: string;
1066
2278
  publickey?: string;
1067
2279
  thumbprint?: string;
1068
2280
  trusted?: boolean;
1069
2281
  };
1070
- export declare type ExitCode = {
2282
+ export type ExitCode = {
1071
2283
  topic: string;
1072
2284
  uuid: string;
1073
2285
  exitCode: number;
1074
2286
  };
1075
- export declare type LaunchExternalProcessListener = {
2287
+ export type LaunchExternalProcessListener = {
1076
2288
  (code: ExitCode): void;
1077
2289
  };
1078
- export declare type ExternalProcessInfo = {
2290
+ export type ExternalProcessInfo = {
1079
2291
  pid: number;
1080
2292
  listener?: LaunchExternalProcessListener;
1081
2293
  };
1082
- export declare type AppAssetInfo = {
2294
+ export type AppAssetInfo = {
2295
+ /**
2296
+ * The URL to a zip file containing the package files (executables, dlls, etc…)
2297
+ */
1083
2298
  src: string;
2299
+ /**
2300
+ * The name of the asset
2301
+ */
1084
2302
  alias: string;
2303
+ /**
2304
+ * The version of the package
2305
+ */
1085
2306
  version: string;
2307
+ /**
2308
+ * Specify default executable to launch. This option can be overridden in launchExternalProcess
2309
+ */
1086
2310
  target?: string;
2311
+ /**
2312
+ * The default command line arguments for the aforementioned target.
2313
+ */
1087
2314
  args?: string;
2315
+ /**
2316
+ * When set to true, the app will fail to load if the asset cannot be downloaded.
2317
+ * When set to false, the app will continue to load if the asset cannot be downloaded. (Default: true)
2318
+ */
1088
2319
  mandatory?: boolean;
1089
2320
  };
1090
- export declare type RuntimeDownloadOptions = {
2321
+ /**
2322
+ * The options object required by the downloadRuntime function.
2323
+ */
2324
+ export type RuntimeDownloadOptions = {
2325
+ /**
2326
+ * The given version to download.
2327
+ */
1091
2328
  version: string;
1092
2329
  };
1093
- export declare type AppAssetRequest = {
2330
+ export type AppAssetRequest = {
1094
2331
  alias: string;
1095
2332
  };
1096
- export declare type RuntimeDownloadProgress = {
2333
+ export type RuntimeDownloadProgress = {
2334
+ /**
2335
+ * @property { string } alias The name of the asset
2336
+ */
1097
2337
  downloadedBytes: number;
1098
2338
  totalBytes: number;
1099
2339
  };
1100
- export declare type CertifiedAppInfo = {
2340
+ export type CertifiedAppInfo = {
1101
2341
  isRunning: boolean;
1102
2342
  isOptedIntoCertfiedApp?: boolean;
1103
2343
  isCertified?: boolean;
1104
2344
  isSSLCertified?: boolean;
1105
2345
  isPresentInAppDirectory?: boolean;
1106
2346
  };
1107
- export declare type JumpListCategory = {
2347
+ export type JumpListCategory = {
2348
+ /**
2349
+ * The display title for the category.
2350
+ *
2351
+ * If omitted, items in this category will be placed into the standard 'Tasks' category.
2352
+ * There can be only one such category, and it will always be displayed at the bottom of the JumpList.
2353
+ */
1108
2354
  name?: string;
2355
+ /**
2356
+ * The set of tasks that will populate the JumpList.
2357
+ */
1109
2358
  items: Array<JumpListTask | JumpListSeparator>;
1110
2359
  };
1111
- export declare type JumpListItem = JumpListTask | JumpListSeparator;
1112
- export declare type JumpListTask = {
2360
+ export type JumpListItem = JumpListTask | JumpListSeparator;
2361
+ export type JumpListTask = {
1113
2362
  type: 'task';
2363
+ /**
2364
+ * The text to be displayed for the JumpList Item.
2365
+ */
1114
2366
  title: string;
2367
+ /**
2368
+ * Tooltip description of the task (displayed in a tooltip).
2369
+ */
1115
2370
  description: string;
2371
+ /**
2372
+ * @property Deep link to a manifest, i.e: fins://path.to/manifest.json?$$param1=value1.
2373
+ * See {@link https://developers.openfin.co/docs/deep-linking deep-linking} for more information.
2374
+ */
1116
2375
  deepLink: string;
2376
+ /**
2377
+ * 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).
2378
+ */
1117
2379
  iconPath?: string;
2380
+ /**
2381
+ * The index of the icon in the resource file.
2382
+ *
2383
+ * 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.
2384
+ * If a resource file contains only one icon, this property should be set to zero.
2385
+ */
1118
2386
  iconIndex?: number;
1119
2387
  };
1120
- export declare type JumpListSeparator = {
2388
+ export type JumpListSeparator = {
1121
2389
  type: 'separator';
1122
2390
  };
1123
- export declare type ApplicationInfo = {
2391
+ export type ApplicationInfo = {
1124
2392
  initialOptions: ApplicationCreationOptions;
1125
2393
  launchMode: string;
1126
2394
  manifest: Manifest & {
@@ -1132,24 +2400,30 @@ export declare type ApplicationInfo = {
1132
2400
  version: string;
1133
2401
  };
1134
2402
  };
1135
- export declare type ManifestInfo = {
2403
+ export type ManifestInfo = {
2404
+ /**
2405
+ * The uuid of the application.
2406
+ */
1136
2407
  uuid: string;
2408
+ /**
2409
+ * The runtime manifest URL.
2410
+ */
1137
2411
  manifestUrl: string;
1138
2412
  };
1139
- export declare type ClickedMenuResult = {
2413
+ export type ClickedMenuResult = {
1140
2414
  result: 'clicked';
1141
2415
  data: any;
1142
2416
  };
1143
- export declare type ClosedMenuResult = {
2417
+ export type ClosedMenuResult = {
1144
2418
  result: 'closed';
1145
2419
  };
1146
- export declare type MenuResult = ClickedMenuResult | ClosedMenuResult;
1147
- export declare type ShowPopupMenuOptions = {
2420
+ export type MenuResult = ClickedMenuResult | ClosedMenuResult;
2421
+ export type ShowPopupMenuOptions = {
1148
2422
  template: MenuItemTemplate[];
1149
2423
  x?: number;
1150
2424
  y?: number;
1151
2425
  };
1152
- export declare type MenuItemTemplate = {
2426
+ export type MenuItemTemplate = {
1153
2427
  /**
1154
2428
  * Can be `normal`, `separator`, `submenu`, or `checkbox`.
1155
2429
  * Defaults to 'normal' unless a 'submenu' key exists
@@ -1183,70 +2457,130 @@ export declare type MenuItemTemplate = {
1183
2457
  */
1184
2458
  icon?: string;
1185
2459
  };
1186
- export declare type NativeWindowIntegrationProviderAuthorization = {
2460
+ export type NativeWindowIntegrationProviderAuthorization = {
1187
2461
  authorizedUuid: string;
1188
2462
  };
1189
- export declare type RuntimeInfo = {
2463
+ export type RuntimeInfo = {
2464
+ /**
2465
+ * The runtime build architecture.
2466
+ */
1190
2467
  architecture: string;
2468
+ /**
2469
+ * The runtime manifest URL.
2470
+ */
1191
2471
  manifestUrl: string;
2472
+ /**
2473
+ * The runtime websocket port.
2474
+ */
1192
2475
  port: number;
2476
+ /**
2477
+ * The runtime security realm.
2478
+ */
1193
2479
  securityRealm?: string;
2480
+ /**
2481
+ * The runtime version.
2482
+ */
1194
2483
  version: string;
2484
+ /**
2485
+ * the command line argument used to start the Runtime.
2486
+ */
1195
2487
  args: object;
1196
2488
  chromeVersion: string;
1197
2489
  electronVersion: string;
1198
2490
  devtoolsPort?: number;
1199
2491
  };
1200
- export declare type DefaultDomainSettings = {
2492
+ export type DefaultDomainSettings = {
1201
2493
  rules: DefaultDomainSettingsRule[];
1202
2494
  };
1203
- export declare type DefaultDomainSettingsRule = {
2495
+ export type DefaultDomainSettingsRule = {
1204
2496
  match: string[];
1205
2497
  options: {
1206
2498
  downloadSettings: FileDownloadSettings;
1207
2499
  };
1208
2500
  };
1209
- export declare type FileDownloadBehaviorNames = 'prompt' | 'no-prompt' | 'block';
1210
- export declare type FileDownloadSettings = {
2501
+ export type FileDownloadBehaviorNames = 'prompt' | 'no-prompt' | 'block';
2502
+ export type FileDownloadSettings = {
1211
2503
  rules: DownloadRule[];
1212
2504
  };
1213
- export declare type DownloadRule = {
2505
+ export type DownloadRule = {
1214
2506
  behavior: FileDownloadBehaviorNames;
1215
2507
  match: string[];
1216
2508
  };
1217
- export declare type ContextHandler = (context: Context) => void;
1218
- export declare type Intent<MetadataType = IntentMetadata> = {
2509
+ export type ContextHandler = (context: Context) => void;
2510
+ /**
2511
+ * Combination of an action and a context that is passed to an application for resolution.
2512
+ */
2513
+ export type Intent<MetadataType = IntentMetadata> = {
2514
+ /**
2515
+ * Name of the intent.
2516
+ */
1219
2517
  name: string;
2518
+ /**
2519
+ * Data associated with the intent.
2520
+ */
1220
2521
  context: Context;
1221
2522
  metadata?: MetadataType;
1222
2523
  };
1223
- export declare type IntentMetadata<TargetType = any> = {
2524
+ export type IntentMetadata<TargetType = any> = {
1224
2525
  target?: TargetType;
1225
2526
  resultType?: string;
1226
2527
  intentResolutionResultId?: string;
1227
2528
  };
1228
- export declare type IntentHandler = (intent: Intent) => void;
1229
- export declare type ContentCreationBehaviorNames = 'window' | 'view' | 'block' | 'browser';
1230
- declare type MatchPattern = string;
1231
- export declare type ContentCreationRule<T = ContentCreationBehaviorNames> = {
2529
+ export type IntentHandler = (intent: Intent) => void;
2530
+ export type ContentCreationBehaviorNames = 'window' | 'view' | 'block' | 'browser';
2531
+ export type MatchPattern = string;
2532
+ /**
2533
+ * A rule for creating content in OpenFin; maps a content type to the way in which
2534
+ * newly-opened content of that type will be handled.
2535
+ *
2536
+ * @property { string } behavior 'view' | 'window' | 'browser' | 'block'
2537
+ * @property { string[] } match List of [match patterns](https://developer.chrome.com/extensions/match_patterns).
2538
+ * @property { object } options Window creation options or View creation options.
2539
+ */
2540
+ export type ContentCreationRule<T = ContentCreationBehaviorNames> = {
2541
+ /**
2542
+ * Behavior to use when opening matched content.
2543
+ */
1232
2544
  behavior: T;
2545
+ /**
2546
+ * List of [match patterns](https://developer.chrome.com/extensions/match_patterns) that indicate the specified
2547
+ * behavior should be used
2548
+ */
1233
2549
  match: MatchPattern[];
2550
+ /**
2551
+ * Options for newly-created view or window (if applicable).
2552
+ */
1234
2553
  options?: T extends 'window' ? Partial<WindowOptions> : T extends 'view' ? Partial<ViewOptions> : never;
1235
2554
  };
1236
- export declare type ContentCreationOptions = {
2555
+ /**
2556
+ * Configures how new content (e,g, from `window.open` or a link) is opened.
2557
+ */
2558
+ export type ContentCreationOptions = {
2559
+ /**
2560
+ * List of rules for creation of new content.
2561
+ */
1237
2562
  rules: ContentCreationRule[];
1238
2563
  };
1239
- export declare type SnapshotProvider<T> = {
2564
+ export type SnapshotProvider<T> = {
1240
2565
  getSnapshot: () => Promise<T>;
1241
2566
  applySnapshot: (snapshot: T) => Promise<void>;
1242
2567
  };
1243
- export declare type QueryPermissionResult = {
2568
+ export type QueryPermissionResult = {
2569
+ /**
2570
+ * The full name of a secured API.
2571
+ */
1244
2572
  permission: string;
1245
2573
  state: PermissionState;
2574
+ /**
2575
+ * True if permission is granted.
2576
+ */
1246
2577
  granted: boolean;
2578
+ /**
2579
+ * The value of permission.
2580
+ */
1247
2581
  rawValue?: unknown;
1248
2582
  };
1249
- export declare type SessionContextGroup = {
2583
+ export type SessionContextGroup = {
1250
2584
  id: string;
1251
2585
  setContext: (context: Context) => Promise<void>;
1252
2586
  getCurrentContext: (type?: string) => Promise<Context>;
@@ -1255,145 +2589,300 @@ export declare type SessionContextGroup = {
1255
2589
  }>;
1256
2590
  };
1257
2591
  export type { MessagingProtocols };
1258
- export declare type ChannelCreateOptions = {
2592
+ /**
2593
+ * Channel provider creation options.
2594
+ */
2595
+ export type ChannelCreateOptions = {
2596
+ /**
2597
+ * EXPERIMENTAL: Messaging protocols supported by the channel provider.
2598
+ */
1259
2599
  protocols?: MessagingProtocols[];
1260
2600
  };
1261
- export declare type ChannelConnectOptions = ChannelCreateOptions & {
2601
+ /**
2602
+ * Options provided on a client connection to a channel.
2603
+ *
2604
+ */
2605
+ export type ChannelConnectOptions = ChannelCreateOptions & {
2606
+ /**
2607
+ * @defaultValue true
2608
+ *
2609
+ * If true will wait for ChannelProvider to connect. If false will fail if ChannelProvider is not found.
2610
+ */
1262
2611
  wait?: boolean;
2612
+ /**
2613
+ * Payload to pass to ChannelProvider onConnection action.
2614
+ */
1263
2615
  payload?: any;
1264
2616
  };
1265
- export declare type ContextForIntent<MetadataType = any> = Context & {
2617
+ export type ContextForIntent<MetadataType = any> = Context & {
1266
2618
  metadata?: MetadataType;
1267
2619
  };
1268
- export declare type InfoForIntentOptions<MetadataType = IntentMetadata> = {
2620
+ export type InfoForIntentOptions<MetadataType = IntentMetadata> = {
2621
+ /**
2622
+ * Name of the intent to get info for.
2623
+ */
1269
2624
  name: string;
1270
2625
  context?: Context;
1271
2626
  metadata?: MetadataType;
1272
2627
  };
1273
- export declare type FindIntentsByContextOptions<MetadataType = IntentMetadata> = {
2628
+ export type FindIntentsByContextOptions<MetadataType = IntentMetadata> = {
1274
2629
  context: Context;
1275
2630
  metadata?: MetadataType;
1276
2631
  };
1277
- export declare type ProviderIdentity = Identity & {
2632
+ /**
2633
+ * Identity of a channel provider.
2634
+ */
2635
+ export type ProviderIdentity = Identity & {
2636
+ /**
2637
+ * Identifier of the channel.
2638
+ */
1278
2639
  channelId: string;
2640
+ /**
2641
+ * Channel provider name.
2642
+ */
1279
2643
  channelName: string;
1280
2644
  };
1281
- export declare type RegisterUsageData = {
2645
+ export type RegisterUsageData = {
1282
2646
  data: unknown;
1283
2647
  type: string;
1284
2648
  };
1285
2649
  export interface ViewsPreventingUnloadPayload {
2650
+ /**
2651
+ * Specifies if the Window should close.
2652
+ */
1286
2653
  windowShouldClose: boolean;
2654
+ /**
2655
+ * Identity of the Window.
2656
+ */
1287
2657
  windowId: Identity;
2658
+ /**
2659
+ * Identities of the Views that are preventing an unload
2660
+ */
1288
2661
  viewsPreventingUnload: Identity[];
2662
+ /**
2663
+ * Identities of the Views that are not preventing an unload
2664
+ */
1289
2665
  viewsNotPreventingUnload: Identity[];
2666
+ /**
2667
+ * Source of the close action.
2668
+ */
1290
2669
  closeType: 'view' | 'window';
1291
2670
  }
1292
2671
  export interface BeforeUnloadUserDecision {
2672
+ /**
2673
+ * Specifies if the Window should close.
2674
+ */
1293
2675
  windowShouldClose: boolean;
2676
+ /**
2677
+ * Array of views that will close.
2678
+ */
1294
2679
  viewsToClose: Identity[];
1295
2680
  }
1296
2681
  export interface ViewStatuses {
2682
+ /**
2683
+ * Identities of the Views that are preventing an unload.
2684
+ */
1297
2685
  viewsPreventingUnload: Identity[];
2686
+ /**
2687
+ * Identities of the Views that are not preventing an unload.
2688
+ */
1298
2689
  viewsNotPreventingUnload: Identity[];
1299
2690
  }
1300
2691
  export interface CloseWindowPayload {
2692
+ /**
2693
+ *
2694
+ * Identity of the Window
2695
+ */
1301
2696
  windowId: Identity;
1302
2697
  options: {
2698
+ /**
2699
+ * @defaultValue false
2700
+ *
2701
+ * When set to true skips any before handler set on views that are part of the window
2702
+ */
1303
2703
  skipBeforeUnload?: boolean;
1304
2704
  };
1305
2705
  }
1306
- export declare type ProxyInfo = {
2706
+ export type ProxyInfo = {
1307
2707
  config: ProxyConfig;
1308
2708
  system: ProxySystemInfo;
1309
2709
  };
1310
- export declare type ProxyConfig = {
2710
+ export type ProxyConfig = {
2711
+ /**
2712
+ * The configured proxy address.
2713
+ */
1311
2714
  proxyAddress: string;
2715
+ /**
2716
+ * The configured proxy port.
2717
+ */
1312
2718
  proxyPort: number;
1313
2719
  type: string;
1314
2720
  };
1315
- export declare type ProxySystemInfo = {
2721
+ export type ProxySystemInfo = {
2722
+ /**
2723
+ * The auto configuration url.
2724
+ */
1316
2725
  autoConfigUrl: string;
2726
+ /**
2727
+ * The proxy bypass info.
2728
+ */
1317
2729
  bypass: string;
2730
+ /**
2731
+ * Value to check if a proxy is enabled.
2732
+ */
1318
2733
  enabled: boolean;
2734
+ /**
2735
+ * The proxy info.
2736
+ */
1319
2737
  proxy: string;
1320
2738
  };
1321
- export declare type ChannelAction = (payload: unknown, id: ProviderIdentity | ClientIdentity) => unknown;
1322
- export declare type ChannelMiddleware = (topic: string, payload: unknown, senderIdentity: ProviderIdentity | ClientIdentity) => Promise<unknown> | unknown;
1323
- export declare type ErrorMiddleware = (topic: string, error: Error, id: ProviderIdentity | ClientIdentity) => unknown;
1324
- export declare type ApplicationState = {
2739
+ export type ChannelAction = (payload: unknown, id: ProviderIdentity | ClientIdentity) => unknown;
2740
+ export type ChannelMiddleware = (topic: string, payload: unknown, senderIdentity: ProviderIdentity | ClientIdentity) => Promise<unknown> | unknown;
2741
+ export type ErrorMiddleware = (topic: string, error: Error, id: ProviderIdentity | ClientIdentity) => unknown;
2742
+ export type ApplicationState = {
2743
+ /**
2744
+ * True when the application is a Platform controller
2745
+ */
1325
2746
  isPlatform: boolean;
2747
+ /**
2748
+ * True when the application is running
2749
+ */
1326
2750
  isRunning: boolean;
2751
+ /**
2752
+ * uuid of the application
2753
+ */
1327
2754
  uuid: string;
2755
+ /**
2756
+ * uuid of the application that launches this application
2757
+ */
1328
2758
  parentUuid?: string;
1329
2759
  };
1330
- export declare type InstalledApps = {
2760
+ export type InstalledApps = {
1331
2761
  [key: string]: InstallationInfo;
1332
2762
  };
1333
- export declare type InstallationInfo = {
2763
+ export type InstallationInfo = {
1334
2764
  cachedManifest: any;
1335
2765
  };
1336
- export declare type GetLogRequestType = {
2766
+ export type GetLogRequestType = {
2767
+ /**
2768
+ * The name of the running application
2769
+ */
1337
2770
  name: string;
2771
+ /**
2772
+ * The file length of the log file
2773
+ */
1338
2774
  endFile?: string;
2775
+ /**
2776
+ * The size limit of the log file.
2777
+ */
1339
2778
  sizeLimit?: number;
1340
2779
  };
1341
- export declare type LogInfo = {
2780
+ export type LogInfo = {
2781
+ /**
2782
+ * The filename of the log
2783
+ */
1342
2784
  name: string;
2785
+ /**
2786
+ * The size of the log in bytes
2787
+ */
1343
2788
  size: number;
2789
+ /**
2790
+ * The unix time at which the log was created "Thu Jan 08 2015 14:40:30 GMT-0500 (Eastern Standard Time)"
2791
+ */
1344
2792
  date: string;
1345
2793
  };
1346
- export declare type SendApplicationLogResponse = {
2794
+ export type SendApplicationLogResponse = {
1347
2795
  logId: string;
1348
2796
  };
1349
- export declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
1350
- export declare type PermissionState = 'granted' | 'denied' | 'unavailable';
1351
- export declare type RegistryInfo = {
2797
+ /**
2798
+ * Describes the minimum level (inclusive) above which logs will be written.
2799
+ *
2800
+ * `verbose`: all logs written
2801
+ * `info`: info and above
2802
+ * `warning` warning and above
2803
+ * `error` and above
2804
+ * `fatal`: fatal only, indicates a crash is imminent
2805
+ */
2806
+ export type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
2807
+ export type PermissionState = 'granted' | 'denied' | 'unavailable';
2808
+ export type RegistryInfo = {
1352
2809
  data: any;
1353
2810
  rootKey: string;
1354
2811
  subkey: string;
1355
2812
  type: string;
1356
2813
  value: string;
1357
2814
  };
1358
- export declare type ApplicationType = {
2815
+ export type ApplicationType = {
1359
2816
  type: 'application' | 'external-app';
1360
2817
  uuid: string;
1361
2818
  };
1362
- export declare type WindowInfo = {
2819
+ export type WindowInfo = {
1363
2820
  canNavigateBack: boolean;
1364
2821
  canNavigateForward: boolean;
1365
2822
  preloadScripts: Array<any>;
1366
2823
  title: string;
1367
2824
  url: string;
1368
2825
  };
1369
- export declare type ApplicationWindowInfo = {
2826
+ export type ApplicationWindowInfo = {
1370
2827
  childWindows: Array<WindowDetail>;
1371
2828
  mainWindow: WindowDetail;
2829
+ /**
2830
+ * @property { string } uuid The uuid of the application
2831
+ */
1372
2832
  uuid: string;
1373
2833
  };
1374
- export declare type WindowDetail = {
2834
+ export type WindowDetail = {
2835
+ /**
2836
+ * The bottom-most coordinate of the window.
2837
+ */
1375
2838
  bottom: number;
2839
+ /**
2840
+ * The height of the window.
2841
+ */
1376
2842
  height: number;
1377
2843
  isShowing: boolean;
2844
+ /**
2845
+ * The left-most coordinate of the window.
2846
+ */
1378
2847
  left: number;
2848
+ /**
2849
+ * The name of the window.
2850
+ */
1379
2851
  name: string;
2852
+ /**
2853
+ * The right-most coordinate of the window
2854
+ */
1380
2855
  right: number;
1381
2856
  state: string;
2857
+ /**
2858
+ * The top-most coordinate of the window.
2859
+ */
1382
2860
  top: number;
2861
+ /**
2862
+ * The width of the window.
2863
+ */
1383
2864
  width: number;
1384
2865
  };
1385
- export declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
1386
- export declare type InitLayoutOptions = {
2866
+ export type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
2867
+ export type InitLayoutOptions = {
2868
+ /**
2869
+ * The id attribute of the container where the window's Layout should be initialized. If not provided
2870
+ * then an element with id `layout-container` is used. We recommend using a div element.
2871
+ */
1387
2872
  containerId?: string;
1388
2873
  };
1389
- export declare type PresetLayoutOptions = {
2874
+ export type PresetLayoutOptions = {
2875
+ /**
2876
+ * Which preset layout arrangement to use.
2877
+ * The preset options are `columns`, `grid`, `rows`, and `tabs`.
2878
+ */
1390
2879
  presetType: LayoutPresetType;
1391
2880
  };
1392
- export declare type ResultBehavior = 'close' | 'hide' | 'none';
1393
- export declare type PopupBaseBehavior = 'close' | 'hide';
1394
- export declare type PopupResultBehavior = 'none' | PopupBaseBehavior;
1395
- export declare type PopupBlurBehavior = 'modal' | PopupBaseBehavior;
1396
- declare type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
2881
+ export type ResultBehavior = 'close' | 'hide' | 'none';
2882
+ export type PopupBaseBehavior = 'close' | 'hide';
2883
+ export type PopupResultBehavior = 'none' | PopupBaseBehavior;
2884
+ export type PopupBlurBehavior = 'modal' | PopupBaseBehavior;
2885
+ export type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
1397
2886
  export interface PopupOptions {
1398
2887
  initialOptions?: Optional<WindowCreationOptions, 'name'>;
1399
2888
  additionalOptions?: UpdatableWindowOptions;
@@ -1410,7 +2899,7 @@ export interface PopupOptions {
1410
2899
  onPopupReady?: (popupWindow: _Window) => any;
1411
2900
  onPopupResult?: (payload: PopupResult) => any;
1412
2901
  }
1413
- export declare type PopupInteraction = 'clicked' | 'dismissed';
2902
+ export type PopupInteraction = 'clicked' | 'dismissed';
1414
2903
  export interface PopupResult<T = any> {
1415
2904
  identity: {
1416
2905
  name: string;
@@ -1420,32 +2909,65 @@ export interface PopupResult<T = any> {
1420
2909
  data?: T;
1421
2910
  lastDispatchResult?: PopupResult;
1422
2911
  }
1423
- export declare type AppVersionProgressEvent = {
2912
+ export type AppVersionProgressEvent = {
1424
2913
  type: 'app-version-progress';
1425
2914
  } & AppVersionProgress;
1426
- export declare type AppVersionErrorEvent = {
2915
+ export type AppVersionErrorEvent = {
1427
2916
  type: 'app-version-error';
1428
2917
  } & AppVersionError;
1429
- export declare type AppVersionCompleteEvent = {
2918
+ export type AppVersionCompleteEvent = {
1430
2919
  type: 'app-version-complete';
1431
2920
  } & AppVersionProgress;
1432
- export declare type AppVersionRuntimeStatusEvent = {
2921
+ export type AppVersionRuntimeStatusEvent = {
1433
2922
  type: 'runtime-status';
1434
2923
  } & AppVersionRuntimeInfo;
1435
- export type { SystemEvent, ApplicationEvent, WindowEvent, ViewEvent, GlobalHotkeyEvent, FrameEvent, PlatformEvent, ExternalApplicationEvent };
1436
- export declare type ContextMenuOptions = {
2924
+ import type * as BaseEvents from './api/events/base';
2925
+ import type * as WebContentsEvents from './api/events/webcontents';
2926
+ import type * as SystemEvents from './api/events/system';
2927
+ import type * as ApplicationEvents from './api/events/application';
2928
+ import type * as WindowEvents from './api/events/window';
2929
+ import type * as ViewEvents from './api/events/view';
2930
+ import type * as GlobalHotkeyEvents from './api/events/globalHotkey';
2931
+ import type * as FrameEvents from './api/events/frame';
2932
+ import type * as PlatformEvents from './api/events/platform';
2933
+ import type * as ExternalApplicationEvents from './api/events/externalApplication';
2934
+ export type { BaseEvents, WebContentsEvents, SystemEvents, ApplicationEvents, WindowEvents, ViewEvents, GlobalHotkeyEvents, FrameEvents, PlatformEvents, ExternalApplicationEvents };
2935
+ export type BaseEvent = BaseEvents.BaseEvent;
2936
+ export type WebContentsEvent = WebContentsEvents.WebContentsEvent;
2937
+ export type SystemEvent = SystemEvents.SystemEvent;
2938
+ export type ApplicationEvent = ApplicationEvents.ApplicationEvent;
2939
+ export type WindowEvent = WindowEvents.WindowEvent;
2940
+ export type ViewEvent = ViewEvents.ViewEvent;
2941
+ export type GlobalHotkeyEvent = GlobalHotkeyEvents.GlobalHotkeyEvent;
2942
+ export type FrameEvent = FrameEvents.FrameEvent;
2943
+ export type PlatformEvent = PlatformEvents.PlatformEvent;
2944
+ export type ExternalApplicationEvent = ExternalApplicationEvents.ExternalApplicationEvent;
2945
+ /**
2946
+ * Configure the context menu when right-clicking on a window.
2947
+ */
2948
+ export type ContextMenuOptions = {
2949
+ /**
2950
+ * Context menu items to display on right-click.
2951
+ */
1437
2952
  template?: Array<PrebuiltContextMenuItem>;
2953
+ /**
2954
+ * Displays the context menu on right click.
2955
+ */
1438
2956
  enabled?: boolean;
1439
2957
  };
1440
- export declare type PrebuiltContextMenuItem = 'separator' | 'undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'selectAll' | 'spellCheck' | 'inspect' | 'reload' | 'navigateForward' | 'navigateBack' | 'print';
1441
- export declare type InteropBrokerDisconnectionEvent = {
2958
+ /**
2959
+ * Context menu item with an implementation provided by OpenFin.
2960
+ */
2961
+ export type PrebuiltContextMenuItem = 'separator' | 'undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'selectAll' | 'spellCheck' | 'inspect' | 'reload' | 'navigateForward' | 'navigateBack' | 'print';
2962
+ export type InteropBrokerDisconnectionEvent = {
1442
2963
  type: string;
1443
2964
  topic: string;
1444
2965
  brokerName: string;
1445
2966
  };
1446
- export declare type InteropClientOnDisconnectionListener = (InteropBrokerDisconnectionEvent: InteropBrokerDisconnectionEvent) => any;
2967
+ export type InteropClientOnDisconnectionListener = (InteropBrokerDisconnectionEvent: InteropBrokerDisconnectionEvent) => any;
1447
2968
  export interface InteropActionLoggingOption {
1448
2969
  enabled: boolean;
1449
2970
  }
1450
- export declare type InteropLoggingActions = 'beforeAction' | 'afterAction';
1451
- export declare type InteropLoggingOptions = Record<InteropLoggingActions, InteropActionLoggingOption>;
2971
+ export type InteropLoggingActions = 'beforeAction' | 'afterAction';
2972
+ export type InteropLoggingOptions = Record<InteropLoggingActions, InteropActionLoggingOption>;
2973
+ export type { Me } from './api/me';