@openfin/core 30.73.6 → 30.73.7

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