@openfin/core 30.73.27 → 31.74.1

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 (80) hide show
  1. package/LICENSE.md +4 -0
  2. package/package.json +2 -2
  3. package/src/OpenFin.d.ts +1664 -173
  4. package/src/api/application/Factory.d.ts +1 -0
  5. package/src/api/application/Factory.js +1 -0
  6. package/src/api/application/Instance.d.ts +2 -1
  7. package/src/api/application/Instance.js +1 -0
  8. package/src/api/base.d.ts +2 -2
  9. package/src/api/clipboard/index.d.ts +1 -0
  10. package/src/api/clipboard/index.js +1 -0
  11. package/src/api/events/platform.d.ts +4 -5
  12. package/src/api/events/system.d.ts +5 -6
  13. package/src/api/events/webcontents.d.ts +23 -3
  14. package/src/api/external-application/Instance.d.ts +1 -1
  15. package/src/api/fin.d.ts +1 -1
  16. package/src/api/frame/Instance.d.ts +1 -1
  17. package/src/api/global-hotkey/index.d.ts +1 -1
  18. package/src/api/interappbus/channel/channel.d.ts +1 -1
  19. package/src/api/interappbus/channel/channels-docs.d.ts +7 -0
  20. package/src/api/interappbus/channel/channels-docs.js +7 -0
  21. package/src/api/interappbus/channel/client.d.ts +3 -2
  22. package/src/api/interappbus/channel/client.js +12 -5
  23. package/src/api/interappbus/channel/connection-manager.d.ts +1 -1
  24. package/src/api/interappbus/channel/index.d.ts +1 -1
  25. package/src/api/interappbus/channel/index.js +5 -7
  26. package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +1 -1
  27. package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +1 -1
  28. package/src/api/interappbus/channel/protocols/index.d.ts +3 -0
  29. package/src/api/interappbus/channel/protocols/rtc/endpoint.js +10 -2
  30. package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +1 -1
  31. package/src/api/interappbus/channel/protocols/rtc/strategy.js +1 -1
  32. package/src/api/interappbus/channel/provider.d.ts +1 -1
  33. package/src/api/interappbus/index.d.ts +1 -1
  34. package/src/api/interop/Factory.d.ts +1 -2
  35. package/src/api/interop/Factory.js +20 -4
  36. package/src/api/interop/InteropBroker.d.ts +16 -48
  37. package/src/api/interop/InteropBroker.js +33 -47
  38. package/src/api/interop/InteropClient.d.ts +10 -9
  39. package/src/api/interop/InteropClient.js +9 -8
  40. package/src/api/interop/SessionContextGroupClient.d.ts +1 -1
  41. package/src/api/interop/fdc3/fdc3-1.2.js +8 -8
  42. package/src/api/interop/fdc3/fdc3-2.0.d.ts +2 -2
  43. package/src/api/interop/fdc3/fdc3-2.0.js +15 -7
  44. package/src/api/interop/fdc3/fdc3.d.ts +4 -5
  45. package/src/api/interop/fdc3/overrideCheck.d.ts +4 -0
  46. package/src/api/interop/fdc3/overrideCheck.js +32 -0
  47. package/src/api/interop/fdc3/versions.d.ts +1 -0
  48. package/src/api/interop/fdc3/versions.js +2 -0
  49. package/src/api/me.d.ts +1 -1
  50. package/src/api/platform/Factory.d.ts +6 -1
  51. package/src/api/platform/Factory.js +5 -0
  52. package/src/api/platform/Instance.d.ts +4 -2
  53. package/src/api/platform/Instance.js +4 -2
  54. package/src/api/platform/layout/Factory.d.ts +4 -0
  55. package/src/api/platform/layout/Factory.js +4 -0
  56. package/src/api/platform/layout/Instance.d.ts +1 -1
  57. package/src/api/platform/layout/utils/view-overlay.d.ts +1 -1
  58. package/src/api/platform/provider.d.ts +162 -0
  59. package/src/api/platform/provider.js +2 -0
  60. package/src/api/snapshot-source/Factory.d.ts +1 -0
  61. package/src/api/snapshot-source/Factory.js +1 -0
  62. package/src/api/snapshot-source/Instance.d.ts +1 -1
  63. package/src/api/system/index.d.ts +1 -471
  64. package/src/api/system/index.js +6 -476
  65. package/src/api/view/Instance.d.ts +7 -3
  66. package/src/api/view/Instance.js +7 -4
  67. package/src/api/webcontents/main.d.ts +18 -4
  68. package/src/api/window/Instance.d.ts +21 -1
  69. package/src/api/window/Instance.js +20 -0
  70. package/src/browser.js +1 -1
  71. package/src/mock.js +1 -1
  72. package/src/namespaces.d.ts +21 -0
  73. package/src/namespaces.js +24 -0
  74. package/src/transport/fin_store.d.ts +1 -1
  75. package/src/transport/transport-errors.d.ts +6 -1
  76. package/src/transport/transport-errors.js +1 -2
  77. package/src/transport/transport.d.ts +9 -6
  78. package/src/transport/transport.js +11 -2
  79. package/src/util/inaccessibleObject.d.ts +2 -0
  80. package/src/util/inaccessibleObject.js +49 -0
@@ -4,476 +4,6 @@ const base_1 = require("../base");
4
4
  const transport_errors_1 = require("../../transport/transport-errors");
5
5
  const window_1 = require("../window");
6
6
  const events_1 = require("events");
7
- /**
8
- * AppAssetInfo interface
9
- * @typedef { object } AppAssetInfo
10
- * @property { string } src The URL to a zip file containing the package files (executables, dlls, etc…)
11
- * @property { string } alias The name of the asset
12
- * @property { string } version The version of the package
13
- * @property { string } target Specify default executable to launch. This option can be overridden in launchExternalProcess
14
- * @property { string } args The default command line arguments for the aforementioned target.
15
- * @property { boolean } mandatory When set to true, the app will fail to load if the asset cannot be downloaded.
16
- * When set to false, the app will continue to load if the asset cannot be downloaded. (Default: true)
17
- */
18
- /**
19
- * AppAssetRequest interface
20
- * @typedef { object } AppAssetRequest
21
- * @property { string } alias The name of the asset
22
- */
23
- /**
24
- * ApplicationState interface
25
- * @typedef { object } ApplicationState
26
- * @property { boolean } isPlatform true when the application is a Platform controller
27
- * @property { boolean } isRunning true when the application is running
28
- * @property { string } uuid uuid of the application
29
- * @property { string } parentUuid uuid of the application that launches this application
30
- */
31
- /**
32
- * @typedef { object } ClearCacheOption
33
- * @summary Clear cache options.
34
- * @desc These are the options required by the clearCache function.
35
- *
36
- * @property {boolean} appcache html5 application cache
37
- * @property {boolean} cache browser data cache for html files and images
38
- * @property {boolean} cookies browser cookies
39
- * @property {boolean} localStorage browser data that can be used across sessions
40
- */
41
- /**
42
- * CookieInfo interface
43
- * @typedef { object } CookieInfo
44
- * @property { string } name The name of the cookie
45
- * @property { string } domain The domain of the cookie
46
- * @property { string } path The path of the cookie
47
- */
48
- /**
49
- * CookieOption interface
50
- * @typedef { object } CookieOption
51
- * @property { string } name The name of the cookie
52
- */
53
- /**
54
- * CpuInfo interface
55
- * @typedef { object } CpuInfo
56
- * @property { string } model The model of the cpu
57
- * @property { number } speed The number in MHz
58
- * @property { Time } times The numbers of milliseconds the CPU has spent in different modes.
59
- */
60
- /**
61
- * CrashReporterState interface
62
- * @typedef { object } CrashReporterState
63
- * @property { boolean } diagnosticsMode In diagnostics mode the crash reporter will send diagnostic logs to
64
- * the OpenFin reporting service on runtime shutdown
65
- * @property { boolean } isRunning check if it's running
66
- */
67
- /**
68
- * CrashReporterOptions interface
69
- * @typedef { object } CrashReporterOptions
70
- * @property { boolean } diagnosticsMode In diagnostics mode the crash reporter will send diagnostic logs to
71
- * the OpenFin reporting service on runtime shutdown
72
- */
73
- /**
74
- * DipRect interface
75
- * @typedef { object } DipRect
76
- * @property { Rect } dipRect The DIP coordinates
77
- * @property { Rect } scaledRect The scale coordinates
78
- */
79
- /**
80
- * DipScaleRects interface
81
- * @typedef { object } DipScaleRects
82
- * @property { Rect } dipRect The DIP coordinates
83
- * @property { Rect } scaledRect The scale coordinates
84
- */
85
- /**
86
- * DownloadPreloadInfo interface
87
- * @typedef { object } DownloadPreloadInfo
88
- * @desc downloadPreloadScripts function return value
89
- * @property { string } url url to the preload script
90
- * @property { string } error error during preload script acquisition
91
- * @property { boolean } succeess download operation success
92
- */
93
- /**
94
- * DownloadPreloadOption interface
95
- * @typedef { object } DownloadPreloadOption
96
- * @desc These are the options object required by the downloadPreloadScripts function
97
- * @property { string } url url to the preload script
98
- */
99
- /**
100
- * ApplicationType interface
101
- * @typedef { object } ApplicationType
102
- * @property { string } type The type of the entity
103
- * @property { string } uuid The uuid of the entity
104
- */
105
- /**
106
- * EntityInfo interface
107
- * @typedef { object } EntityInfo
108
- * @property { string } name The name of the entity
109
- * @property { string } uuid The uuid of the entity
110
- * @property { Identity } parent The parent of the entity
111
- * @property { string } entityType The type of the entity
112
- */
113
- /**
114
- * ExternalApplicationInfo interface
115
- * @typedef { object } ExternalApplicationInfo
116
- * @property { Identity } parent The parent identity
117
- */
118
- /**
119
- * ExternalConnection interface
120
- * @typedef { object } ExternalConnection
121
- * @property { string } token The token to broker an external connection
122
- * @property { string } uuid The uuid of the external connection
123
- */
124
- /**
125
- * ExternalProcessRequestType interface
126
- * @typedef { object } ExternalProcessRequestType
127
- * @property { string } path The file path to where the running application resides
128
- * @property { string } arguments The argument passed to the running application
129
- * @property { LaunchExternalProcessListener } listener This is described in the {LaunchExternalProcessListner} type definition
130
- * @property { string } initialWindowState Initial window state after launching: 'normal' (default), 'minimized', 'maximized'
131
- * @property { string } cwd current working directory
132
- */
133
- /**
134
- * FrameInfo interface
135
- * @typedef { object } FrameInfo
136
- * @property { string } name The name of the frame
137
- * @property { string } uuid The uuid of the frame
138
- * @property { EntityType } entityType The entity type, could be 'window', 'iframe', 'external connection' or 'unknown'
139
- * @property { Identity } parent The parent identity
140
- * @property { string } url URL
141
- */
142
- /**
143
- * GetLogRequestType interface
144
- * @typedef { object } GetLogRequestType
145
- * @property { string } name The name of the running application
146
- * @property { number } endFile The file length of the log file
147
- * @property { number } sizeLimit The set size limit of the log file
148
- */
149
- /**
150
- * GpuInfo interface
151
- * @typedef { object } GpuInfo
152
- * @property { string } name The graphics card name
153
- */
154
- /**
155
- * HostSpecs interface
156
- * @typedef { object } HostSpecs
157
- * @property { boolean } aeroGlassEnabled Value to check if Aero Glass theme is supported on Windows platforms
158
- * @property { string } arch "x86" for 32-bit or "x86_64" for 64-bit
159
- * @property { Array<CpuInfo> } cpus The same payload as Node's os.cpus()
160
- * @property { GpuInfo } gpu The graphics card name
161
- * @property { number } memory The same payload as Node's os.totalmem()
162
- * @property { string } name The OS name and version/edition
163
- * @property { boolean } screenSaver Value to check if screensaver is running. Supported on Windows only
164
- */
165
- /**
166
- * Identity interface
167
- * @typedef { object } Identity
168
- * @property { string } name Optional - the name of the component
169
- * @property { string } uuid Universally unique identifier of the application
170
- */
171
- /**
172
- * LogInfo interface
173
- * @typedef { object } LogInfo
174
- * @property { string } name The filename of the log
175
- * @property { number } size The size of the log in bytes
176
- * @property { string } date The unix time at which the log was created "Thu Jan 08 2015 14:40:30 GMT-0500 (Eastern Standard Time)"
177
- */
178
- /**
179
- * ManifestInfo interface
180
- * @typedef { object } ManifestInfo
181
- * @property { string } uuid The uuid of the application
182
- * @property { string } manifestUrl The runtime manifest URL
183
- */
184
- /**
185
- * MonitorDetails interface
186
- * @typedef { object } MonitorDetails
187
- * @property { DipScaleRects } available The available DIP scale coordinates
188
- * @property { Rect } availableRect The available monitor coordinates
189
- * @property { string } deviceId The device id of the display
190
- * @property { boolean } displayDeviceActive true if the display is active
191
- * @property { number } deviceScaleFactor The device scale factor
192
- * @property { Rect } monitorRect The monitor coordinates
193
- * @property { string } name The name of the display
194
- * @property { Point } dpi The dots per inch
195
- * @property { DipScaleRects } monitor The monitor coordinates
196
- */
197
- /**
198
- * MonitorInfo interface
199
- * @typedef { object } MonitorInfo
200
- * @property { number } deviceScaleFactor The device scale factor
201
- * @property { Point } dpi The dots per inch
202
- * @property { Array<MonitorDetails> } nonPrimaryMonitors The array of monitor details
203
- * @property { MonitorDetails } primaryMonitor The monitor details
204
- * @property { string } reason always "api-query"
205
- * @property { TaskBar } taskBar The taskbar on monitor
206
- * @property { DipRect } virtualScreen The virtual display screen coordinates
207
- */
208
- /**
209
- * @typedef { verbose | info | warning | error | fatal } LogLevel
210
- * @summary Log verbosity levels.
211
- * @desc Describes the minimum level (inclusive) above which logs will be written
212
- *
213
- * @property { string } verbose all logs written
214
- * @property { string } info info and above
215
- * @property { string } warning warning and above
216
- * @property { string } error error and above
217
- * @property { string } fatal fatal only, indicates a crash is imminent
218
- */
219
- /**
220
- * PointTopLeft interface
221
- * @typedef { object } PointTopLeft
222
- * @property { number } top The mouse top position in virtual screen coordinates
223
- * @property { number } left The mouse left position in virtual screen coordinates
224
- */
225
- /**
226
- * Point interface
227
- * @typedef { object } Point
228
- * @property { number } x The mouse x position
229
- * @property { number } y The mouse y position
230
- */
231
- /**
232
- * ProcessInfo interface
233
- * @typedef { object } ProcessInfo
234
- * @property { number } cpuUsage The percentage of total CPU usage
235
- * @property { string } name The application name
236
- * @property { number } nonPagedPoolUsage The current nonpaged pool usage in bytes
237
- * @property { number } pageFaultCount The number of page faults
238
- * @property { number } pagedPoolUsage The current paged pool usage in bytes
239
- * @property { number } pagefileUsage The total amount of memory in bytes that the memory manager has committed
240
- * @property { number } peakNonPagedPoolUsage The peak nonpaged pool usage in bytes
241
- * @property { number } peakPagedPoolUsage The peak paged pool usage in bytes
242
- * @property { number } peakPagefileUsage The peak value in bytes of pagefileUsage during the lifetime of this process
243
- * @property { number } peakWorkingSetSize The peak working set size in bytes
244
- * @property { number } processId The native process identifier
245
- * @property { string } uuid The application UUID
246
- * @property { number } workingSetSize The current working set size (both shared and private data) in bytes
247
- */
248
- /**
249
- * SystemProcessInfo interface
250
- * @typedef { object } SystemProcessInfo
251
- * @property { ProcessDetails } browserProcess Info on browser process
252
- * @property { Array<AppProcessInfo> } apps Array of apps and their process info
253
- */
254
- /**
255
- * AppProcessInfo interface
256
- * @typedef { object } AppProcessInfo
257
- * @property { string } uuid The uuid of the application
258
- * @property { Array<EntityProcessDetails> } entities Array of process info for each window and view for the application
259
- */
260
- /**
261
- * EntityProcessDetails interface
262
- * @typedef { object } EntityProcessDetails
263
- * @property { string } uuid The uuid for the entity
264
- * @property { string } name The name for the entity
265
- * @property { string } url URL associated with the entity
266
- * @property { string } entityType Type for the entity: window or view
267
- * @property { number } cpuUsage The percentage of total CPU usage
268
- * @property { number } nonPagedPoolUsage The current nonpaged pool usage in bytes
269
- * @property { number } pageFaultCount The number of page faults
270
- * @property { number } pagedPoolUsage The current paged pool usage in bytes
271
- * @property { number } pagefileUsage The total amount of memory in bytes that the memory manager has committed
272
- * @property { number } peakNonPagedPoolUsage The peak nonpaged pool usage in bytes
273
- * @property { number } peakPagedPoolUsage The peak paged pool usage in bytes
274
- * @property { number } peakPagefileUsage The peak value in bytes of pagefileUsage during the lifetime of this process
275
- * @property { number } peakWorkingSetSize The peak working set size in bytes
276
- * @property { number } privateSetSize The current working set size (not shared)
277
- * @property { number } workingSetSize The current working set size (both shared and private data) in bytes
278
- * @property { number } pid The native process identifier
279
- * @property { Array<FrameProcessDetails> } frames Array of process info for each iframe corresponeding to the entity
280
- */
281
- /**
282
- * FrameProcessDetails interface
283
- * @typedef { object } FrameProcessDetails
284
- * @property { string } url Current URL associated with the process
285
- * @property { string } entityType Type for the frame
286
- * @property { number } cpuUsage The percentage of total CPU usage
287
- * @property { number } nonPagedPoolUsage The current nonpaged pool usage in bytes
288
- * @property { number } pageFaultCount The number of page faults
289
- * @property { number } pagedPoolUsage The current paged pool usage in bytes
290
- * @property { number } pagefileUsage The total amount of memory in bytes that the memory manager has committed
291
- * @property { number } peakNonPagedPoolUsage The peak nonpaged pool usage in bytes
292
- * @property { number } peakPagedPoolUsage The peak paged pool usage in bytes
293
- * @property { number } peakPagefileUsage The peak value in bytes of pagefileUsage during the lifetime of this process
294
- * @property { number } peakWorkingSetSize The peak working set size in bytes
295
- * @property { number } workingSetSize The current working set size (both shared and private data) in bytes
296
- * @property { number } pid The native process identifier
297
- */
298
- /**
299
- * ProcessDetails interface
300
- * @typedef { object } ProcessDetails
301
- * @property { number } cpuUsage The percentage of total CPU usage
302
- * @property { number } nonPagedPoolUsage The current nonpaged pool usage in bytes
303
- * @property { number } pageFaultCount The number of page faults
304
- * @property { number } pagedPoolUsage The current paged pool usage in bytes
305
- * @property { number } pagefileUsage The total amount of memory in bytes that the memory manager has committed
306
- * @property { number } peakNonPagedPoolUsage The peak nonpaged pool usage in bytes
307
- * @property { number } peakPagedPoolUsage The peak paged pool usage in bytes
308
- * @property { number } peakPagefileUsage The peak value in bytes of pagefileUsage during the lifetime of this process
309
- * @property { number } peakWorkingSetSize The peak working set size in bytes
310
- * @property { number } workingSetSize The current working set size (both shared and private data) in bytes
311
- * @property { number } pid The native process identifier
312
- */
313
- /**
314
- * ProxyConfig interface
315
- * @typedef { object } ProxyConfig
316
- * @property { string } proxyAddress The configured proxy address
317
- * @property { number } proxyPort The configured proxy port
318
- * @property { string } type The proxy Type
319
- */
320
- /**
321
- * ProxyInfo interface
322
- * @typedef { object } ProxyInfo
323
- * @property { ProxyConfig } config The proxy config
324
- * @property { ProxySystemInfo } system The proxy system info
325
- */
326
- /**
327
- * QueryPermissionResult interface
328
- * @typedef { object } QueryPermissionResult
329
- * @property { string } permission The full name of a secured API
330
- * @property { string } state 'granted' | 'denied' | 'unavailable'
331
- * @property { boolean } granted true if permission is granted
332
- * @property { object } [rawValue] The value of permission
333
- */
334
- /**
335
- * ProxySystemInfo interface
336
- * @typedef { object } ProxySystemInfo
337
- * @property { string } autoConfigUrl The auto configuration url
338
- * @property { string } bypass The proxy bypass info
339
- * @property { boolean } enabled Value to check if a proxy is enabled
340
- * @property { string } proxy The proxy info
341
- */
342
- /**
343
- * Rect interface
344
- * @typedef { object } Rect
345
- * @property { number } bottom The bottom-most coordinate
346
- * @property { number } left The left-most coordinate
347
- * @property { number } right The right-most coordinate
348
- * @property { number } top The top-most coordinate
349
- */
350
- /**
351
- * RegistryInfo interface
352
- * @typedef { object } RegistryInfo
353
- * @property { any } data The registry data
354
- * @property { string } rootKey The registry root key
355
- * @property { string } subkey The registry key
356
- * @property { string } type The registry type
357
- * @property { string } value The registry value name
358
- */
359
- /**
360
- * RuntimeDownloadOptions interface
361
- * @typedef { object } RuntimeDownloadOptions
362
- * @desc These are the options object required by the downloadRuntime function.
363
- * @property { string } version The given version to download
364
- */
365
- /**
366
- * RuntimeInfo interface
367
- * @typedef { object } RuntimeInfo
368
- * @property { string } architecture The runtime build architecture
369
- * @property { string } manifestUrl The runtime manifest URL
370
- * @property { number } port The runtime websocket port
371
- * @property { string } securityRealm The runtime security realm
372
- * @property { string } version The runtime version
373
- * @property { object } args the command line argument used to start the Runtime
374
- * @property { string } chromeVersion The chrome version
375
- * @property { string } electronVersion The electron version
376
- */
377
- /**
378
- * RVMInfo interface
379
- * @typedef { object } RVMInfo
380
- * @property { string } action The name of action: "get-rvm-info"
381
- * @property { string } appLogDirectory The app log directory
382
- * @property { string } path The path of OpenfinRVM.exe
383
- * @property { string } 'start-time' The start time of RVM
384
- * @property { string } version The version of RVM
385
- * @property { string } 'working-dir' The working directory
386
- */
387
- /**
388
- * RvmLaunchOptions interface
389
- * @typedef { object } RvmLaunchOptions
390
- * @property { boolean } [noUi] true if no UI when launching
391
- * @property { object } [userAppConfigArgs] The user app configuration args
392
- * @property { number } [timeToLive] Timeout in seconds until RVM launch request expires
393
- * @property { Function } [subscribe] Called whenever app version resolver events occur.
394
- */
395
- /**
396
- * ServiceIdentifier interface
397
- * @typedef { object } ServiceIdentifier
398
- * @property { string } name The name of the service
399
- */
400
- /**
401
- * ServiceConfiguration interface
402
- * @typedef { object } ServiceConfiguration
403
- * @property { object } config The service configuration
404
- * @property { string } name The name of the service
405
- */
406
- /**
407
- * ShortCutConfig interface
408
- * @typedef { object } ShortCutConfig
409
- * @property { boolean } desktop true if application has a shortcut on the desktop
410
- * @property { boolean } startMenu true if application has shortcut in the start menu
411
- * @property { boolean } systemStartup true if application will be launched on system startup
412
- */
413
- /**
414
- * SubOptions interface
415
- * @typedef { Object } SubOptions
416
- * @property { number } timestamp The event timestamp
417
- */
418
- /**
419
- * TaskBar interface
420
- * @typedef { object } TaskBar
421
- * @property { string } edge which edge of a monitor the taskbar is on
422
- * @property { Rect } rect The taskbar coordinates
423
- */
424
- /**
425
- * TerminateExternalRequestType interface
426
- * @typedef { object } TerminateExternalRequestType
427
- * @property { string } uuid The uuid of the running application
428
- * @property { number } timeout Time out period before the running application terminates
429
- * @property { boolean } killtree Value to terminate the running application
430
- */
431
- /**
432
- * Time interface
433
- * @typedef { object } Time
434
- * @property { number } user The number of milliseconds the CPU has spent in user mode
435
- * @property { number } nice The number of milliseconds the CPU has spent in nice mode
436
- * @property { number } sys The number of milliseconds the CPU has spent in sys mode
437
- * @property { number } idle The number of milliseconds the CPU has spent in idle mode
438
- * @property { number } irq The number of milliseconds the CPU has spent in irq mode
439
- */
440
- /**
441
- * TrayInfo interface
442
- * @typedef { object } TrayInfo
443
- * @property { Bounds } bounds The bound of tray icon in virtual screen pixels
444
- * @property { MonitorInfo } monitorInfo Please see fin.System.getMonitorInfo for more information
445
- * @property { number } x copy of bounds.x
446
- * @property { number } y copy of bounds.y
447
- */
448
- /**
449
- * WindowDetail interface
450
- * @typedef { object } WindowDetail
451
- * @property { number } bottom The bottom-most coordinate of the window
452
- * @property { number } height The height of the window
453
- * @property { boolean } isShowing Value to check if the window is showing
454
- * @property { number } left The left-most coordinate of the window
455
- * @property { string } name The name of the window
456
- * @property { number } right The right-most coordinate of the window
457
- * @property { string } state The window state
458
- * @property { number } top The top-most coordinate of the window
459
- * @property { number } width The width of the window
460
- */
461
- /**
462
- * ApplicationWindowInfo interface
463
- * @typedef { object } ApplicationWindowInfo
464
- * @property { Array<WindowDetail> } childWindows The array of child windows details
465
- * @property { WindowDetail } mainWindow The main window detail
466
- * @property { string } uuid The uuid of the application
467
- */
468
- /**
469
- * CertifiedAppInfo interface
470
- * @typedef { object } CertifiedAppInfo
471
- * @property { boolean } isRunning true if the app is running
472
- * @property { boolean } [isOptedIntoCertfiedApp] true if the app has opted into certification
473
- * @property { boolean } [isCertified] true if the app is certified
474
- * @property { boolean } [isSSLCertified] true if the app manifest's SSL certificate is valid
475
- * @property { boolean } [isPresentInAppDirectory] true if the app is present in the OpenFin app directory
476
- */
477
7
  /**
478
8
  * An object representing the core of OpenFin Runtime. Allows the developer
479
9
  * to perform system-level actions, such as accessing logs, viewing processes,
@@ -1005,10 +535,10 @@ class System extends base_1.EmitterBase {
1005
535
  // @ts-expect-error
1006
536
  this.removeListener(dlProgressKey, dlProgress);
1007
537
  };
1008
- const dlError = (r, err) => {
1009
- const error = err || r;
538
+ const dlError = (payload) => {
1010
539
  cleanListeners();
1011
- reject(new transport_errors_1.RuntimeError(error));
540
+ const { reason, err: error } = payload;
541
+ reject(new transport_errors_1.RuntimeError({ reason, error }));
1012
542
  };
1013
543
  const dlComplete = () => {
1014
544
  cleanListeners();
@@ -1060,10 +590,10 @@ class System extends base_1.EmitterBase {
1060
590
  // @ts-expect-error
1061
591
  this.removeListener(dlProgressKey, dlProgress);
1062
592
  };
1063
- const dlError = (r, err) => {
1064
- const error = err || r;
593
+ const dlError = (payload) => {
1065
594
  cleanListeners();
1066
- reject(new transport_errors_1.RuntimeError(error));
595
+ const { reason, err: error } = payload;
596
+ reject(new transport_errors_1.RuntimeError({ reason, error }));
1067
597
  };
1068
598
  const dlComplete = () => {
1069
599
  cleanListeners();
@@ -1,10 +1,11 @@
1
1
  import type * as OpenFin from '../../OpenFin';
2
2
  import { WebContents } from '../webcontents/main';
3
- import Transport from '../../transport/transport';
3
+ import { Transport } from '../../transport/transport';
4
4
  import { Layout } from '../platform/layout';
5
5
  import { ViewEvent } from '../events/view';
6
6
  declare type UpdatableViewOptions = OpenFin.UpdatableViewOptions;
7
7
  /**
8
+ * @PORTED
8
9
  * @typedef {object} View~options
9
10
  * @summary View creation options.
10
11
  * @desc This is the options object required by {@link View.create View.create}.
@@ -453,12 +454,15 @@ export declare class View extends WebContents<ViewEvent> {
453
454
  */
454
455
  triggerBeforeUnload: () => Promise<boolean>;
455
456
  /**
457
+ * **NOTE**: Internal use only.
456
458
  * Attaches this view to an HTML element in the current context. The view will resize responsively when the element bounds change.
457
- * @param { string } elementId - id of the HTML element to attach the view to.
459
+ *
460
+ * @param {HTMLElement} element - HTML element to attach the view to.
458
461
  * @return {Function} - Cleanup function that will disconnect the element resize observer.
462
+ * @internal
459
463
  * @experimental
460
464
  * @tutorial View.bindToElement
461
465
  */
462
- bindToElement: (elementId: string) => Promise<() => void>;
466
+ bindToElement: (element: HTMLElement) => Promise<() => void>;
463
467
  }
464
468
  export {};
@@ -8,6 +8,7 @@ const main_1 = require("../webcontents/main");
8
8
  const window_1 = require("../window");
9
9
  const bounds_observer_1 = require("../platform/layout/utils/bounds-observer");
10
10
  /**
11
+ * @PORTED
11
12
  * @typedef {object} View~options
12
13
  * @summary View creation options.
13
14
  * @desc This is the options object required by {@link View.create View.create}.
@@ -457,16 +458,18 @@ class View extends main_1.WebContents {
457
458
  return message.payload.data;
458
459
  };
459
460
  /**
461
+ * **NOTE**: Internal use only.
460
462
  * Attaches this view to an HTML element in the current context. The view will resize responsively when the element bounds change.
461
- * @param { string } elementId - id of the HTML element to attach the view to.
463
+ *
464
+ * @param {HTMLElement} element - HTML element to attach the view to.
462
465
  * @return {Function} - Cleanup function that will disconnect the element resize observer.
466
+ * @internal
463
467
  * @experimental
464
468
  * @tutorial View.bindToElement
465
469
  */
466
- this.bindToElement = async (elementId) => {
467
- const element = document.getElementById(elementId);
470
+ this.bindToElement = async (element) => {
468
471
  if (!element) {
469
- throw new Error(`Element matching id: ${elementId} not found.`);
472
+ throw new Error('Element not found.');
470
473
  }
471
474
  const onChange = async (bounds) => this.setBounds(bounds);
472
475
  return (0, bounds_observer_1.observeBounds)(element, onChange);
@@ -1,11 +1,26 @@
1
1
  import type * as OpenFin from '../../OpenFin';
2
2
  import { EmitterBase } from '../base';
3
- import Transport from '../../transport/transport';
3
+ import { Transport } from '../../transport/transport';
4
4
  import { BaseEvent } from '../events/base';
5
- declare type ImageFormat = 'bmp' | 'jpg' | 'png';
5
+ /**
6
+ * Configuration for page capture.
7
+ */
6
8
  export interface CapturePageOptions {
9
+ /**
10
+ * The area of the window to be captured.
11
+ */
7
12
  area?: OpenFin.Rectangle;
8
- format?: ImageFormat;
13
+ /**
14
+ * @defaultValue 'png'
15
+ *
16
+ * The format of the captured image. Can be 'png', 'jpg', or 'bmp'.
17
+ */
18
+ format?: 'bmp' | 'jpg' | 'png';
19
+ /**
20
+ * @defaultValue 100
21
+ *
22
+ * Quality of JPEG image. Between 0 - 100.
23
+ */
9
24
  quality?: number;
10
25
  }
11
26
  export declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
@@ -35,4 +50,3 @@ export declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
35
50
  inspectServiceWorker(): Promise<void>;
36
51
  showPopupWindow(options: OpenFin.PopupOptions): Promise<OpenFin.PopupResult>;
37
52
  }
38
- export {};