@openfin/core 25.68.27 → 25.68.30

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 (96) hide show
  1. package/OpenFin.d.ts +1383 -373
  2. package/README.md +5 -1
  3. package/package.json +1 -1
  4. package/src/api/application/Instance.d.ts +2 -2
  5. package/src/api/application/Instance.js +1 -1
  6. package/src/api/base.d.ts +1 -1
  7. package/src/api/events/channel.d.ts +2 -1
  8. package/src/api/events/eventAggregator.d.ts +1 -1
  9. package/src/api/external-application/Instance.d.ts +1 -1
  10. package/src/api/fin.d.ts +1 -1
  11. package/src/api/frame/Instance.d.ts +1 -1
  12. package/src/api/global-hotkey/index.d.ts +1 -1
  13. package/src/api/interappbus/channel/channel.d.ts +3 -3
  14. package/src/api/interappbus/channel/index.d.ts +2 -1
  15. package/src/api/interappbus/index.d.ts +2 -1
  16. package/src/api/me.d.ts +1 -1
  17. package/src/api/platform/Instance.d.ts +1 -1
  18. package/src/api/platform/Instance.js +1 -2
  19. package/src/api/platform/common-utils.d.ts +1 -1
  20. package/src/api/platform/layout/Factory.d.ts +1 -1
  21. package/src/api/platform/layout/Factory.js +1 -0
  22. package/src/api/platform/layout/Instance.d.ts +2 -1
  23. package/src/api/platform/layout/index.d.ts +0 -1
  24. package/src/api/platform/layout/index.js +0 -1
  25. package/src/api/system/index.d.ts +17 -13
  26. package/src/api/system/index.js +3 -3
  27. package/src/api/view/Instance.d.ts +3 -2
  28. package/src/api/webcontents/main.d.ts +1 -1
  29. package/src/api/window/Instance.d.ts +3 -3
  30. package/src/environment/environment.d.ts +5 -8
  31. package/src/environment/node-env.d.ts +5 -4
  32. package/src/environment/openfin-env.d.ts +5 -4
  33. package/src/environment/openfin-env.js +2 -0
  34. package/src/transport/transport-errors.d.ts +3 -2
  35. package/src/transport/transport-errors.js +1 -3
  36. package/src/transport/transport.d.ts +10 -24
  37. package/src/transport/transport.js +0 -14
  38. package/src/transport/wire.d.ts +6 -71
  39. package/src/transport/wire.js +1 -8
  40. package/src/util/errors.d.ts +1 -5
  41. package/src/util/errors.js +0 -3
  42. package/src/util/normalize-config.d.ts +3 -1
  43. package/src/api/events/application.d.ts +0 -69
  44. package/src/api/events/application.js +0 -2
  45. package/src/api/events/base.d.ts +0 -17
  46. package/src/api/events/base.js +0 -2
  47. package/src/api/events/externalApplication.d.ts +0 -5
  48. package/src/api/events/externalApplication.js +0 -2
  49. package/src/api/events/frame.d.ts +0 -9
  50. package/src/api/events/frame.js +0 -2
  51. package/src/api/events/globalHotkey.d.ts +0 -10
  52. package/src/api/events/globalHotkey.js +0 -2
  53. package/src/api/events/platform.d.ts +0 -18
  54. package/src/api/events/platform.js +0 -2
  55. package/src/api/events/system.d.ts +0 -22
  56. package/src/api/events/system.js +0 -2
  57. package/src/api/events/view.d.ts +0 -56
  58. package/src/api/events/view.js +0 -2
  59. package/src/api/events/webcontents.d.ts +0 -48
  60. package/src/api/events/webcontents.js +0 -2
  61. package/src/api/events/window.d.ts +0 -169
  62. package/src/api/events/window.js +0 -2
  63. package/src/api/platform/layout/shapes.d.ts +0 -11
  64. package/src/api/platform/layout/shapes.js +0 -2
  65. package/src/api/system/application.d.ts +0 -6
  66. package/src/api/system/application.js +0 -2
  67. package/src/api/system/entity.d.ts +0 -11
  68. package/src/api/system/entity.js +0 -2
  69. package/src/api/system/installedApps.d.ts +0 -6
  70. package/src/api/system/installedApps.js +0 -2
  71. package/src/api/system/log.d.ts +0 -11
  72. package/src/api/system/log.js +0 -2
  73. package/src/api/system/process.d.ts +0 -15
  74. package/src/api/system/process.js +0 -2
  75. package/src/api/system/proxy.d.ts +0 -15
  76. package/src/api/system/proxy.js +0 -2
  77. package/src/api/system/queryPermissionTypes.d.ts +0 -1
  78. package/src/api/system/queryPermissionTypes.js +0 -2
  79. package/src/api/system/registry-info.d.ts +0 -7
  80. package/src/api/system/registry-info.js +0 -2
  81. package/src/api/system/window.d.ts +0 -16
  82. package/src/api/system/window.js +0 -2
  83. package/src/shapes/ERROR_BOX_TYPES.d.ts +0 -6
  84. package/src/shapes/ERROR_BOX_TYPES.js +0 -10
  85. package/src/shapes/EntityType.d.ts +0 -1
  86. package/src/shapes/EntityType.js +0 -2
  87. package/src/shapes/LayoutPresetType.d.ts +0 -1
  88. package/src/shapes/LayoutPresetType.js +0 -2
  89. package/src/shapes/Platform.d.ts +0 -112
  90. package/src/shapes/Platform.js +0 -16
  91. package/src/shapes/WebOptions.d.ts +0 -12
  92. package/src/shapes/WebOptions.js +0 -2
  93. package/src/shapes/WindowOptions.d.ts +0 -42
  94. package/src/shapes/WindowOptions.js +0 -2
  95. package/src/shapes/protocol.d.ts +0 -178
  96. package/src/shapes/protocol.js +0 -2
package/OpenFin.d.ts CHANGED
@@ -1,5 +1,8 @@
1
+ // / <reference lib="dom"/>
2
+
1
3
  declare namespace OpenFin {
2
4
  // "wrappable entities"
5
+ import EventEmitter = NodeJS.EventEmitter;
3
6
  export type Application = import('./src/api/application/index').Application;
4
7
  export type ExternalApplication = import('./src/api/external-application/index').ExternalApplication;
5
8
  export type Frame = import('./src/api/frame/index')._Frame;
@@ -14,63 +17,64 @@ declare namespace OpenFin {
14
17
  export type InteropBroker = import('./src/api/interop/index').InteropBroker;
15
18
  export type SnapshotSource = import('./src/api/snapshot-source/index').SnapshotSource;
16
19
 
17
- export interface ApplicationIdentity {
20
+ export type ApplicationIdentity = {
18
21
  // used for applications
19
22
  uuid: string;
20
- }
23
+ };
21
24
 
22
- export interface Identity {
25
+ export type Identity = {
23
26
  // used for views/windows/frames
24
27
  uuid: string;
25
28
  name: string;
26
- }
29
+ };
27
30
 
28
- export interface ClientIdentity {
31
+ export type ClientIdentity = {
29
32
  uuid: string;
30
33
  name: string;
31
34
  endpointId: string;
32
35
  isLocalEndpointId: boolean; // If true, this connection is from a legacy client.
33
- }
36
+ };
34
37
 
35
- export interface ClientIdentityMultiRuntime extends ClientIdentity {
38
+ export type ClientIdentityMultiRuntime = ClientIdentity & {
36
39
  runtimeUuid: string;
37
- }
40
+ };
38
41
 
39
- export interface EntityInfo {
42
+ export type EntityInfo = {
40
43
  uuid: string;
41
44
  name: string;
42
45
  entityType: EntityType;
43
- }
44
- export type EntityType = import('./src/shapes/EntityType').EntityType;
46
+ };
45
47
 
46
- export interface Bounds {
48
+ export type EntityType = 'window' | 'iframe' | 'external connection' | 'view' | 'unknown';
49
+
50
+ export type Bounds = {
47
51
  top: number;
48
52
  left: number;
49
53
  height: number;
50
54
  width: number;
51
- }
55
+ };
52
56
 
53
57
  /**
54
58
  * Returned from getBounds call. bottom and right are never used for setting.
55
59
  */
56
- export interface WindowBounds extends Bounds {
60
+ export type WindowBounds = Bounds & {
57
61
  bottom: number;
58
62
  right: number;
59
- }
63
+ };
60
64
 
61
- export interface Rectangle {
65
+ export type Rectangle = {
62
66
  x: number;
63
67
  y: number;
64
68
  width: number;
65
69
  height: number;
66
- }
70
+ };
67
71
 
68
- export interface ApplicationCreationOptions extends Partial<ApplicationOption> {
72
+ export type ApplicationCreationOptions = Partial<ApplicationOption> & {
69
73
  name: string;
70
74
  uuid: string;
71
- }
75
+ };
72
76
 
73
- export interface ApplicationOption extends LegacyWinOptionsInAppOptions {
77
+ export type ApplicationOption = LegacyWinOptionsInAppOptions & {
74
78
  disableIabSecureLogging: boolean;
75
79
  loadErrorMessage: string;
76
80
  mainWindowOptions: WindowCreationOptions;
@@ -92,18 +96,18 @@ declare namespace OpenFin {
92
96
  apiDiagnostics: boolean;
93
97
  defaultDomainSettings: DefaultDomainSettings;
94
98
  enableJumpList: boolean;
95
- }
99
+ };
96
100
 
97
- interface InteropBrokerOptions {
101
+ type InteropBrokerOptions = {
98
102
  contextGroups?: ContextGroupInfo;
99
- }
103
+ };
100
104
 
101
- export interface ContextGroupInfo {
105
+ export type ContextGroupInfo = {
102
106
  id: string;
103
107
  displayMetadata?: DisplayMetadata;
104
- }
108
+ };
105
109
 
106
- export interface DisplayMetadata {
110
+ export type DisplayMetadata = {
107
111
  /**
108
112
  * A user-readable name for this context group, e.g: `"Red"`
109
113
  */
@@ -116,7 +120,7 @@ declare namespace OpenFin {
116
120
  * A URL of an image that can be used to display this context group
117
121
  */
118
122
  readonly glyph?: string;
119
- }
123
+ };
120
124
 
121
125
  export type LegacyWinOptionsInAppOptions = Pick<
122
126
  WindowCreationOptions,
@@ -158,7 +162,7 @@ declare namespace OpenFin {
158
162
  | 'waitForPageLoad'
159
163
  >;
160
164
 
161
- export interface Snapshot {
165
+ export type Snapshot = {
162
166
  windows: WindowCreationOptions[];
163
167
  snapshotDetails?: {
164
168
  monitorInfo: MonitorInfo;
@@ -168,23 +172,23 @@ declare namespace OpenFin {
168
172
  interopSnapshotDetails?: {
169
173
  contextGroupStates: ContextGroupStates;
170
174
  };
171
- }
175
+ };
172
176
 
173
- export interface ContextGroupStates {
177
+ export type ContextGroupStates = {
174
178
  [key: string]: {
175
179
  [key: string]: Context;
176
180
  };
177
- }
181
+ };
178
182
 
179
- export interface Context {
183
+ export type Context = {
180
184
  id?: {
181
185
  [key: string]: string;
182
186
  };
183
187
  name?: string;
184
188
  type: string;
185
- }
189
+ };
186
190
 
187
- export interface MonitorInfo {
191
+ export type MonitorInfo = {
188
192
  deviceScaleFactor: number;
189
193
  dpi: Point;
190
194
  nonPrimaryMonitors: MonitorDetails[];
@@ -192,26 +196,26 @@ declare namespace OpenFin {
192
196
  reason: string;
193
197
  taskbar: TaskBar;
194
198
  virtualScreen: DipRect;
195
- }
199
+ };
196
200
 
197
- export interface Point {
201
+ export type Point = {
198
202
  x: number;
199
203
  y: number;
200
- }
204
+ };
201
205
 
202
- export interface PointTopLeft {
206
+ export type PointTopLeft = {
203
207
  top: number;
204
208
  left: number;
205
- }
209
+ };
206
210
 
207
- export interface RectangleByEdgePositions {
211
+ export type RectangleByEdgePositions = {
208
212
  top: number;
209
213
  left: number;
210
214
  bottom: number;
211
215
  right: number;
212
- }
216
+ };
213
217
 
214
- export interface MonitorDetails {
218
+ export type MonitorDetails = {
215
219
  available: DipScaleRects;
216
220
  availableRect: RectangleByEdgePositions;
217
221
  deviceId: string | number; // Number on mac
@@ -221,32 +225,36 @@ declare namespace OpenFin {
221
225
  name: string | number; // Number on mac
222
226
  dpi: Point;
223
227
  monitor: DipScaleRects;
224
- }
228
+ };
225
229
 
226
- export interface DipRect extends RectangleByEdgePositions {
230
+ export type DipRect = RectangleByEdgePositions & {
227
231
  dipRect: RectangleByEdgePositions;
228
232
  scaledRect: RectangleByEdgePositions;
229
- }
233
+ };
230
234
 
231
- export interface DipScaleRects {
235
+ export type DipScaleRects = {
232
236
  dipRect: RectangleByEdgePositions;
233
237
  scaledRect: RectangleByEdgePositions;
234
- }
238
+ };
235
239
 
236
- export interface TaskBar extends DipScaleRects {
240
+ export type TaskBar = DipScaleRects & {
237
241
  edge: string;
238
242
  rect: RectangleByEdgePositions;
239
- }
243
+ };
240
244
 
241
- export interface WindowCreationOptions extends Partial<WindowOptions> {
245
+ export type WindowCreationOptions = Partial<WindowOptions> & {
242
246
  name: string;
243
- }
247
+ };
248
+
249
+ export type UpdatableWindowOptions = Partial<MutableWindowOptions>;
244
250
 
245
- export interface DefaultWindowOptions extends WindowOptions {
251
+ export type DefaultWindowOptions = WindowOptions & {
246
252
  permissions: Partial<Permissions>;
247
- }
253
+ };
254
+
255
+ export type WindowOptions = MutableWindowOptions & ConstWindowOptions;
248
256
 
249
- export interface WindowOptions extends WindowUpdatableOptions {
257
+ export type ConstWindowOptions = {
250
258
  accelerator: Partial<Accelerator>;
251
259
  api: Api;
252
260
  applicationIcon: string;
@@ -284,9 +292,9 @@ declare namespace OpenFin {
284
292
  y: number;
285
293
  experimental?: any;
286
294
  fdc3InteropApi?: string;
287
- }
295
+ };
288
296
 
289
- export interface WindowUpdatableOptions {
297
+ export type MutableWindowOptions = {
290
298
  alphaMask: RGB;
291
299
  alwaysOnTop: boolean;
292
300
  aspectRatio: number;
@@ -311,73 +319,21 @@ declare namespace OpenFin {
311
319
  showTaskbarIcon: boolean;
312
320
  interop: InteropConfig;
313
321
  workspacePlatform: WorkspacePlatformOptions;
314
- }
322
+ };
315
323
 
316
- export interface WorkspacePlatformOptions {
317
- pages: Page[];
324
+ export type WorkspacePlatformOptions = {
318
325
  /** Leaving this as any for now until we figure out what the shape should look like in Workspace */
319
326
  [key: string]: any;
320
- }
321
-
322
- type LayoutSettingsExtended = LayoutOptions['settings'] & {
323
- reorderEnabled?: boolean;
324
- };
325
-
326
- type LayoutComponentStateExtended = LayoutComponent['componentState'] & { name: string; uuid: string };
327
-
328
- type LayoutComponentExtended = Omit<OpenFin.LayoutComponent, 'componentState'> & {
329
- componentState: LayoutComponentStateExtended;
330
- };
331
-
332
- type LayoutStack = { type: 'stack'; content: LayoutContent };
333
-
334
- type LayoutContentItemExtended = OpenFin.LayoutRow | OpenFin.LayoutColumn | LayoutComponentExtended | LayoutStack;
335
-
336
- type LayoutContentExtended = LayoutContentItemExtended[];
337
-
338
- type LayoutExtended = {
339
- settings: LayoutSettingsExtended;
340
- content: LayoutContentExtended;
341
327
  };
342
328
 
343
- interface PageLayoutDetails {
344
- /** The id of the machine that created the page. */
345
- machineId: string;
346
-
347
- /** The name of the machine that created the page. */
348
- machineName?: string;
349
- }
350
-
351
- type PageLayout = LayoutExtended & { layoutDetails: PageLayoutDetails };
352
-
353
- interface Page {
354
- /** A UI friendly title for the page. */
355
- title: string;
356
-
357
- /** The unique ID of the page. */
358
- pageId: string;
359
-
360
- /** An optional UI friendly description of the page. */
361
- description?: string;
362
-
363
- /** A optional UI friendly tooltip for the page. */
364
- tooltip?: string;
365
-
366
- /** True if the page is read only. In this state, the page is locked and cannot be unlocked. */
367
- isReadOnly?: boolean;
368
-
369
- /** The layout of the page. */
370
- layout: PageLayout;
371
- }
372
-
373
- export interface WebRequestHeader {
329
+ export type WebRequestHeader = {
374
330
  [key: string]: string;
375
- }
331
+ };
376
332
 
377
- export interface CustomRequestHeaders {
333
+ export type CustomRequestHeaders = {
378
334
  urlPatterns: string[];
379
335
  headers: WebRequestHeader[]; // key=value is added to headers
380
- }
336
+ };
381
337
 
382
338
  export type WindowOptionDiff = {
383
339
  [key in keyof WindowOptions]: {
@@ -386,7 +342,7 @@ declare namespace OpenFin {
386
342
  };
387
343
  };
388
344
 
389
- export interface ResizeRegion {
345
+ export type ResizeRegion = {
390
346
  size?: number;
391
347
  bottomRightCorner?: number;
392
348
  sides?: {
@@ -395,76 +351,76 @@ declare namespace OpenFin {
395
351
  left?: boolean;
396
352
  right?: boolean;
397
353
  };
398
- }
354
+ };
399
355
 
400
- export interface Accelerator {
356
+ export type Accelerator = {
401
357
  devtools: boolean;
402
358
  reload: boolean;
403
359
  reloadIgnoringCache: boolean;
404
360
  zoom: boolean;
405
- }
361
+ };
406
362
 
407
- export interface Api {
363
+ export type Api = {
408
364
  iframe?: {
409
365
  crossOriginInjection?: boolean;
410
366
  sameOriginInjection?: boolean;
411
367
  enableDeprecatedSharedName?: boolean;
412
368
  };
413
- }
369
+ };
414
370
 
415
- export interface ContentNavigation {
371
+ export type ContentNavigation = {
416
372
  whitelist?: string[];
417
373
  blacklist?: string[];
418
- }
374
+ };
419
375
 
420
- export interface ContentRedirect {
376
+ export type ContentRedirect = {
421
377
  whitelist: string[];
422
378
  blacklist: string[];
423
- }
379
+ };
424
380
 
425
- export interface CornerRounding {
381
+ export type CornerRounding = {
426
382
  height: number;
427
383
  width: number;
428
- }
384
+ };
429
385
 
430
- export interface DownloadPreloadOption {
386
+ export type DownloadPreloadOption = {
431
387
  url: string;
432
- }
388
+ };
433
389
 
434
- export interface DownloadPreloadInfo {
390
+ export type DownloadPreloadInfo = {
435
391
  success: boolean;
436
392
  url?: string;
437
393
  error: string;
438
- }
394
+ };
439
395
 
440
- export interface RGB {
396
+ export type RGB = {
441
397
  red: number;
442
398
  blue: number;
443
399
  green: number;
444
- }
400
+ };
445
401
 
446
- export interface ContextMenuSettings {
402
+ export type ContextMenuSettings = {
447
403
  enable: boolean;
448
404
  devtools?: boolean;
449
405
  reload?: boolean;
450
- }
406
+ };
451
407
 
452
- export interface Hotkey {
408
+ export type Hotkey = {
453
409
  keys: string;
454
410
  preventDefault?: boolean;
455
- }
411
+ };
456
412
 
457
- export interface ShortcutOverride extends Hotkey {
413
+ export type ShortcutOverride = Hotkey & {
458
414
  command: string;
459
- }
415
+ };
460
416
 
461
- export interface PreloadScript {
417
+ export type PreloadScript = {
462
418
  mandatory?: boolean;
463
419
  state?: 'load-started' | 'load-failed' | 'load-succeeded' | 'failed' | 'succeeded';
464
420
  url: string;
465
- }
421
+ };
466
422
 
467
- export interface AutoResizeOptions {
423
+ export type AutoResizeOptions = {
468
424
  /**
469
425
  * If true, the view's width will grow and shrink together with the window. false
470
426
  * by default.
@@ -485,28 +441,31 @@ declare namespace OpenFin {
485
441
  * the window. false by default.
486
442
  */
487
443
  vertical?: boolean;
488
- }
444
+ };
489
445
 
490
- export interface InteropConfig {
446
+ export type InteropConfig = {
491
447
  currentContextGroup?: string | null;
492
448
  providerId?: string;
493
- }
449
+ };
494
450
 
495
- export interface ViewInfo {
451
+ export type ViewInfo = {
496
452
  canNavigateBack: boolean;
497
453
  canNavigateForward: boolean;
498
454
  processAffinity: string;
499
455
  title: string;
500
456
  url: string;
501
457
  favicons: string[];
502
- }
503
- export interface ViewCreationOptions extends Partial<ViewOptions> {
458
+ };
459
+
460
+ export type UpdatableViewOptions = Partial<MutableViewOptions>;
461
+
462
+ export type ViewCreationOptions = Partial<ViewOptions> & {
504
463
  name: string;
505
464
  url: string;
506
465
  target: Identity;
507
- }
466
+ };
508
467
 
509
- export interface UpdatableViewOptions {
468
+ export type MutableViewOptions = {
510
469
  autoResize: AutoResizeOptions;
511
470
  contextMenuSettings: ContextMenuSettings;
512
471
  backgroundColor: string;
@@ -519,13 +478,15 @@ declare namespace OpenFin {
519
478
  preventDragOut: boolean;
520
479
  // Doesn't get defaulted
521
480
  interop?: InteropConfig;
522
- }
481
+ };
523
482
 
524
- export interface DefaultViewOptions extends ViewOptions {
483
+ export type DefaultViewOptions = ViewOptions & {
525
484
  permissions: Partial<Permissions>;
526
- }
485
+ };
527
486
 
528
- export interface ViewOptions extends UpdatableViewOptions {
487
+ export type ViewOptions = ConstViewOptions & MutableViewOptions;
488
+
489
+ export type ConstViewOptions = {
529
490
  name: string;
530
491
  url: string;
531
492
  target: Identity;
@@ -539,9 +500,9 @@ declare namespace OpenFin {
539
500
  zoomLevel: number;
540
501
  experimental: any;
541
502
  fdc3InteropApi?: string;
542
- }
503
+ };
543
504
 
544
- export interface Certificate {
505
+ export type Certificate = {
545
506
  data: string;
546
507
  fingerprint: string;
547
508
  issuer: CertificatePrincipal;
@@ -552,85 +513,82 @@ declare namespace OpenFin {
552
513
  subjectName: string;
553
514
  validExpiry: number;
554
515
  validStart: number;
555
- }
516
+ };
556
517
 
557
- interface CertificatePrincipal {
518
+ type CertificatePrincipal = {
558
519
  commonName: string;
559
520
  country: string;
560
521
  locality: string;
561
522
  organizations: string[];
562
523
  organizationUnits: string[];
563
524
  state: string;
564
- }
565
-
566
- export type HostContextChangedReasons = import('./src/shapes/Platform').HostContextChangedReasons;
567
- export type WindowCreationReason = import('./src/shapes/Platform').WindowCreationReason;
525
+ };
568
526
 
569
527
  export type HostContextChangedPayload = {
570
528
  context: any;
571
529
  reason: HostContextChangedReasons;
572
530
  };
573
531
 
574
- export interface ApplySnapshotOptions {
532
+ export type ApplySnapshotOptions = {
575
533
  closeExistingWindows?: boolean;
576
534
  closeSnapshotWindows?: boolean;
577
535
  skipOutOfBoundsCheck?: boolean;
578
- }
536
+ };
579
537
 
580
- export interface ApplySnapshotPayload {
538
+ export type ApplySnapshotPayload = {
581
539
  snapshot: Snapshot;
582
540
  options?: ApplySnapshotOptions;
583
- }
584
- export interface CreateViewPayload {
541
+ };
542
+ export type CreateViewPayload = {
585
543
  opts: Partial<ViewOptions>;
586
544
  target: Identity;
587
545
  targetView?: Identity;
588
- }
546
+ };
589
547
 
590
- export interface ReplaceViewPayload {
548
+ export type ReplaceViewPayload = {
591
549
  opts: {
592
550
  viewToReplace: Identity;
593
551
  newView: Partial<ViewOptions>;
594
552
  };
595
553
  target: Identity;
596
- }
554
+ };
597
555
 
598
- export interface CloseViewPayload {
556
+ export type CloseViewPayload = {
599
557
  view: Identity;
600
- }
558
+ };
601
559
 
602
- export interface FetchManifestPayload {
560
+ export type FetchManifestPayload = {
603
561
  manifestUrl: string;
604
- }
562
+ };
605
563
 
606
- export interface ReplaceLayoutOpts {
564
+ export type ReplaceLayoutOpts = {
607
565
  layout: LayoutOptions;
608
- }
609
- export interface ReplaceLayoutPayload {
566
+ };
567
+ export type ReplaceLayoutPayload = {
610
568
  opts: ReplaceLayoutOpts;
611
569
  target: Identity;
612
- }
570
+ };
613
571
 
614
- export interface SetWindowContextPayload {
572
+ export type SetWindowContextPayload = {
615
573
  context: any;
616
574
  entityType: EntityType;
617
575
  target: Identity;
618
- }
576
+ };
619
577
 
620
- export interface LaunchIntoPlatformPayload {
578
+ export type LaunchIntoPlatformPayload = {
621
579
  manifest: any;
622
- }
580
+ };
623
581
 
624
- export interface GetWindowContextPayload {
582
+ export type GetWindowContextPayload = {
625
583
  entityType: EntityType;
626
584
  target: Identity;
627
- }
585
+ };
628
586
 
629
- export interface ApplicationPermissions {
587
+ export type ApplicationPermissions = {
630
588
  setFileDownloadLocation: boolean;
631
- }
589
+ };
632
590
 
633
- export interface SystemPermissions {
591
+ export type SystemPermissions = {
634
592
  getAllExternalWindows: boolean;
635
593
  launchExternalProcess: boolean;
636
594
  readRegistryValue:
@@ -644,7 +602,7 @@ declare namespace OpenFin {
644
602
  enabled: boolean;
645
603
  protocols: string[];
646
604
  };
647
- }
605
+ };
648
606
 
649
607
  export type WebPermission =
650
608
  | 'audio'
@@ -658,38 +616,38 @@ declare namespace OpenFin {
658
616
  | 'clipboard-read'
659
617
  | 'clipboard-sanitized-write';
660
618
 
661
- export interface Permissions {
619
+ export type Permissions = {
662
620
  Application?: Partial<ApplicationPermissions>;
663
621
  System?: Partial<SystemPermissions>;
664
622
  webAPIs?: WebPermission[];
665
- }
623
+ };
666
624
 
667
- export interface PlatformWindowCreationOptions extends Partial<WindowCreationOptions> {
625
+ export type PlatformWindowCreationOptions = Partial<WindowCreationOptions> & {
668
626
  updateStateIfExists?: boolean;
669
627
  reason?: WindowCreationReason;
670
- }
628
+ };
671
629
 
672
- export interface PlatformWindowOptions extends WindowCreationOptions {
630
+ export type PlatformWindowOptions = WindowCreationOptions & {
673
631
  stylesheetUrl: string;
674
- }
632
+ };
675
633
 
676
- export interface PlatformViewCreationOptions extends Partial<ViewOptions> {
634
+ export type PlatformViewCreationOptions = Partial<ViewOptions> & {
677
635
  url: string;
678
636
  target: Identity;
679
- }
637
+ };
680
638
 
681
639
  export type ProcessAffinityStrategy = 'same' | 'different';
682
640
 
683
- export interface PlatformOptions extends ApplicationCreationOptions {
641
+ export type PlatformOptions = ApplicationCreationOptions & {
684
642
  defaultWindowOptions?: Partial<PlatformWindowOptions>;
685
643
  defaultViewOptions?: Partial<PlatformViewCreationOptions>;
686
644
  disableDefaultCommands?: boolean;
687
645
  viewProcessAffinityStrategy?: ProcessAffinityStrategy;
688
646
  providerUrl?: string;
689
647
  permissions?: Partial<Permissions>;
690
- }
648
+ };
691
649
 
692
- export interface Manifest {
650
+ export type Manifest = {
693
651
  appAssets?: {
694
652
  alias: string;
695
653
  args?: string;
@@ -743,9 +701,9 @@ declare namespace OpenFin {
743
701
  forwardErrorReports?: boolean;
744
702
  enableErrorReporting?: boolean;
745
703
  };
746
- }
704
+ };
747
705
 
748
- export interface LayoutOptions {
706
+ export type LayoutOptions = {
749
707
  settings: {
750
708
  popoutWholeStack?: boolean;
751
709
  constrainDragToContainer?: boolean;
@@ -755,19 +713,19 @@ declare namespace OpenFin {
755
713
  constrainDragToHeaders?: boolean;
756
714
  };
757
715
  content: LayoutContent;
758
- }
716
+ };
759
717
 
760
718
  export type LayoutContent = (LayoutRow | LayoutColumn | LayoutComponent)[];
761
719
 
762
- export interface LayoutRow {
720
+ export type LayoutRow = {
763
721
  type: 'row';
764
722
  content: LayoutContent;
765
- }
766
- export interface LayoutColumn {
723
+ };
724
+ export type LayoutColumn = {
767
725
  type: 'column';
768
726
  content: LayoutContent;
769
- }
770
- export interface LayoutComponent {
727
+ };
728
+ export type LayoutComponent = {
771
729
  type: 'component';
772
730
  componentName: 'view';
773
731
  componentState: {
@@ -775,7 +733,7 @@ declare namespace OpenFin {
775
733
  url: string;
776
734
  title?: string;
777
735
  };
778
- }
736
+ };
779
737
 
780
738
  export type OverrideCallback<T extends any = PlatformProvider, U extends T = T> = (
781
739
  arg: Constructor<T>,
@@ -784,13 +742,144 @@ declare namespace OpenFin {
784
742
 
785
743
  export type Constructor<T = {}> = new (...args: any[]) => T;
786
744
 
787
- type PlatformProvider = import('./src/shapes/Platform').PlatformProvider;
788
- export interface InitPlatformOptions {
745
+ export type HostContextChangedReasons = 'updated' | 'reparented';
746
+
747
+ export type WindowCreationReason =
748
+ | 'tearout'
749
+ | 'create-view-without-target'
750
+ | 'api-call'
751
+ | 'app-creation'
752
+ | 'restore';
753
+
754
+ // TODO: Real PlatformProvider type def
755
+ export type PlatformProvider = {
756
+ /**
757
+ * Handles requests to create a window in the current platform.
758
+ * @param { WindowOption } payload Window options for the window to be created.
759
+ * @param { Identity } [identity] If {@link Platform#createWindow Platform.createWindow} was called, the identity of the caller will be here.
760
+ * If `createWindow` was called as part of applying a snapshot or creating a view without a target window, `identity` will be undefined.
761
+ */
762
+ createWindow(
763
+ options: OpenFin.PlatformWindowCreationOptions,
764
+ identity?: OpenFin.Identity
765
+ ): Promise<OpenFin.Window>;
766
+
767
+ /**
768
+ * Gets the current state of windows and their views and returns a snapshot object containing that info.
769
+ * @param { undefined } payload Undefined unless you've defined a custom `getSnapshot` protocol.
770
+ * @param { Identity } identity Identity of the entity that called {@link Platform#getSnapshot Platform.getSnapshot}.
771
+ * @return { Promise<Snapshot> } Snapshot of current platform state.
772
+ */
773
+ getSnapshot(payload: undefined, identity: OpenFin.Identity): Promise<OpenFin.Snapshot>;
774
+
775
+ /**
776
+ * Called when a snapshot is being applied and some windows in that snapshot would be fully or partially off-screen.
777
+ * Returns an array of windows with modified positions, such that any off-screen windows are positioned in the top left
778
+ * corner of the main monitor.
779
+ * @param { Snapshot } snapshot The snapshot to be applied.
780
+ * @param { WindowOptions[] } outOfBoundsWindows An array of WindowOptions for any windows that would be off-screen.
781
+ * @return { Promise<WindowOptions[]> } An array of WindowOptions with their position modified to fit on screen.
782
+ */
783
+ positionOutOfBoundsWindows(
784
+ snapshot: OpenFin.Snapshot,
785
+ outOfBoundsWindows: OpenFin.WindowCreationOptions[]
786
+ ): Promise<OpenFin.WindowCreationOptions[]>;
787
+
788
+ /**
789
+ * Handles requests to apply a snapshot to the current Platform.
790
+ * @param { ApplySnapshotPayload } payload Payload containing the snapshot to be applied, as well as any options.
791
+ * @param { Identity } [identity] Identity of the entity that called {@link Platform#applySnapshot Platform.applySnapshot}.
792
+ * Undefined if called internally (e.g. when opening the initial snapshot).
793
+ * @return { Promise<void> }
794
+ */
795
+ applySnapshot(payload: OpenFin.ApplySnapshotPayload, identity?: OpenFin.Identity): Promise<void>;
796
+
797
+ /**
798
+ * Closes the current Platform and all child windows and views.
799
+ * @param { undefined } payload Undefined unless you have implemented a custom quite protocol.
800
+ * @param { Identity } identity Identity of the entity that called {@link Platform#quit Platform.quit}.
801
+ * @return { Promise<void> }
802
+ */
803
+ quit(payload: undefined, identity: OpenFin.Identity): Promise<void>;
804
+
805
+ /**
806
+ * Closes a view
807
+ * @param { CloseViewPayload } payload Specifies the `target` view to be closed.
808
+ * @param { Identity } identity Identity of the entity that called {@link Platform#closeView Platform.closeView}.
809
+ */
810
+ closeView(payload: OpenFin.CloseViewPayload, identity?: OpenFin.Identity): Promise<any>;
811
+
812
+ /**
813
+ * Creates a new view and attaches it to a specified target window.
814
+ * @param { CreateViewPayload } payload Creation options for the new view.
815
+ * @param { Identity } identity Identity of the entity that called {@link Platform#createView Platform.createView}.
816
+ * @return { Promise<void> }
817
+ */
818
+ createView(payload: OpenFin.CreateViewPayload, identity: OpenFin.Identity): Promise<OpenFin.View>;
819
+
820
+ /** Handles requests to fetch manifests in the current platform.
821
+ * @param { FetchManifestPayload } payload Payload containing the manifestUrl to be fetched.
822
+ * @param { Identity } callerIdentity If {@link Platform#fetchManifest Platform.fetchManifest}
823
+ * was called, the identity of the caller will be here.
824
+ * If `fetchManifest` was called internally, `callerIdentity` will be the provider's identity.
825
+ */
826
+ fetchManifest(payload: OpenFin.FetchManifestPayload, callerIdentity: OpenFin.Identity): Promise<any>;
827
+
828
+ /**
829
+ * Replaces a Platform window's layout with a new layout. Any views that were in the old layout but not the new layout will be destroyed.
830
+ * @param { ReplaceLayoutPayload } payload Contains the `target` window and an `opts` object with a `layout` property to apply.
831
+ * @param { Identity } [identity] Identity of the entity that called {@link Platform#replaceLayout Platform.replaceLayout}.
832
+ * Undefined if `replaceLayout` is called internally (e.g. while applying a snapshot).
833
+ * @return { Promise<void> }
834
+ */
835
+ replaceLayout(payload: OpenFin.ReplaceLayoutPayload, identity?: OpenFin.Identity): Promise<void>;
836
+
837
+ replaceView(payload: OpenFin.ReplaceViewPayload, identity?: OpenFin.Identity): Promise<void>;
838
+
839
+ launchIntoPlatform(payload: OpenFin.LaunchIntoPlatformPayload): Promise<void>;
840
+
841
+ /**
842
+ * Handles requests to set a window's context. `target` may be a window or a view.
843
+ * If it is a window, that window's `customContext` will be updated.
844
+ * If it is a view, the `customContext` of that view's current host window will be updated.
845
+ * @param { SetWindowContextPayload } payload Object containing the requested `context` update,
846
+ * the `target`'s identity, and the target's `entityType`.
847
+ * @param { Identity } [identity] Identity of the entity that called {@link Platform#setWindowContext Platform.setWindowContext}.
848
+ * Undefined if `setWindowContext` is called internally (e.g. while applying a snapshot).
849
+ * @return { Promise<any> } The new context.
850
+ */
851
+ setWindowContext(payload: OpenFin.SetWindowContextPayload, identity?: OpenFin.Identity): Promise<any>;
852
+
853
+ /**
854
+ * Handles requests to get a window's context. `target` may be a window or a view.
855
+ * If it is a window, that window's `customContext` will be returned.
856
+ * If it is a view, the `customContext` of that view's current host window will be returned.
857
+ * @param { GetWindowContextPayload } payload Object containing the requested `context` update,
858
+ * the `target`'s identity, and the target's `entityType`.
859
+ * @param { Identity } [identity] Identity of the entity that called {@link Platform#getWindowContext Platform.getWindowContext}.
860
+ * Undefined when `getWindowContext` is called internally
861
+ * (e.g. when getting a window's context for the purpose of raising a "host-context-changed" event on a reparented view).
862
+ * @return { Promise<any> } The new context.
863
+ */
864
+ getWindowContext(payload: OpenFin.GetWindowContextPayload, identity?: OpenFin.Identity): Promise<any>;
865
+
866
+ /**
867
+ * Called when a window's `customContext` is updated. Responsible for raising the `host-context-updated` event on that window's child views.
868
+ * @param { WindowOptionsChangedEvent<'window', 'options-changed'> } payload The event payload for the window whose context has changed.
869
+ * The new context will be contained as `payload.diff.customContext.newVal`.
870
+ * @return { Promise<HostContextChangedPayload> } The event that it raised.
871
+ */
872
+ onWindowContextUpdated(
873
+ payload: WindowOptionsChangedEvent<'window', 'options-changed'>
874
+ ): Promise<OpenFin.HostContextChangedPayload | undefined>;
875
+ };
876
+
877
+ export type InitPlatformOptions = {
789
878
  overrideCallback?: OverrideCallback<PlatformProvider>;
790
879
  interopOverride?: OverrideCallback<InteropBroker>;
791
- }
880
+ };
792
881
 
793
- export interface ProcessDetails {
882
+ export type ProcessDetails = {
794
883
  cpuUsage: number;
795
884
  nonPagedPoolUsage: number;
796
885
  pageFaultCount: number;
@@ -803,80 +892,80 @@ declare namespace OpenFin {
803
892
  workingSetSize: number;
804
893
  privateSetSize: number;
805
894
  pid: number;
806
- }
895
+ };
807
896
 
808
- export interface FrameProcessDetails extends ProcessDetails {
897
+ export type FrameProcessDetails = ProcessDetails & {
809
898
  url: string;
810
899
  entityType: string;
811
- }
900
+ };
812
901
 
813
- export interface EntityProcessDetails extends FrameProcessDetails {
902
+ export type EntityProcessDetails = FrameProcessDetails & {
814
903
  name: string;
815
904
  uuid: string;
816
905
  iframes: FrameProcessDetails[];
817
- }
906
+ };
818
907
 
819
- export interface AppProcessInfo {
908
+ export type AppProcessInfo = {
820
909
  uuid: string;
821
910
  entities: EntityProcessDetails[];
822
- }
911
+ };
823
912
 
824
- export interface NonAppProcessDetails extends ProcessDetails {
913
+ export type NonAppProcessDetails = ProcessDetails & {
825
914
  name: string;
826
- }
915
+ };
827
916
 
828
- export interface SystemProcessInfo {
917
+ export type SystemProcessInfo = {
829
918
  apps: AppProcessInfo[];
830
919
  browserProcess: NonAppProcessDetails;
831
920
  nonApps: NonAppProcessDetails[];
832
- }
921
+ };
833
922
 
834
- export interface ClearCacheOption {
923
+ export type ClearCacheOption = {
835
924
  appcache?: boolean;
836
925
  cache?: boolean;
837
926
  cookies?: boolean;
838
927
  localStorage?: boolean;
839
- }
928
+ };
840
929
 
841
- export interface CookieInfo {
930
+ export type CookieInfo = {
842
931
  name: string;
843
932
  // expirationDate: Date;
844
933
  domain: string;
845
934
  path: string;
846
- }
935
+ };
847
936
 
848
- export interface CookieOption {
937
+ export type CookieOption = {
849
938
  name: string;
850
- }
939
+ };
851
940
 
852
- export interface CrashReporterOptions {
941
+ export type CrashReporterOptions = {
853
942
  diagnosticsMode: boolean;
854
- }
943
+ };
855
944
 
856
- export interface CrashReporterState extends CrashReporterOptions {
945
+ export type CrashReporterState = CrashReporterOptions & {
857
946
  isRunning: boolean;
858
947
  diagnosticMode: boolean;
859
- }
948
+ };
860
949
 
861
- export interface Time {
950
+ export type Time = {
862
951
  user: number;
863
952
  nice: number;
864
953
  sys: number;
865
954
  idle: number;
866
955
  irq: number;
867
- }
956
+ };
868
957
 
869
- export interface CpuInfo {
958
+ export type CpuInfo = {
870
959
  model: string;
871
960
  speed: number;
872
961
  times: Time;
873
- }
962
+ };
874
963
 
875
- export interface GpuInfo {
964
+ export type GpuInfo = {
876
965
  name: string;
877
- }
966
+ };
878
967
 
879
- export interface HostSpecs {
968
+ export type HostSpecs = {
880
969
  aeroGlassEnabled?: boolean;
881
970
  arch: string;
882
971
  cpus: CpuInfo[];
@@ -884,29 +973,29 @@ declare namespace OpenFin {
884
973
  memory: number;
885
974
  name: string;
886
975
  screenSaver?: boolean;
887
- }
976
+ };
888
977
 
889
- export interface PrinterInfo {
978
+ export type PrinterInfo = {
890
979
  name: string;
891
980
  description: string;
892
981
  status: number;
893
982
  isDefault: boolean;
894
- }
983
+ };
895
984
 
896
- export interface Dpi {
985
+ export type Dpi = {
897
986
  horizontal?: number;
898
987
  vertical?: number;
899
- }
988
+ };
900
989
 
901
- export interface Margins {
990
+ export type Margins = {
902
991
  marginType?: 'default' | 'none' | 'printableArea' | 'custom';
903
992
  top?: number;
904
993
  bottom?: number;
905
994
  left?: number;
906
995
  right?: number;
907
- }
996
+ };
908
997
 
909
- export interface PrintOptions {
998
+ export type PrintOptions = {
910
999
  silent?: boolean;
911
1000
  printBackground?: boolean;
912
1001
  deviceName?: string;
@@ -920,103 +1009,103 @@ declare namespace OpenFin {
920
1009
  pageRanges?: Record<string, number>;
921
1010
  duplexMode?: 'simplex' | 'shortEdge' | 'longEdge';
922
1011
  dpi?: Dpi;
923
- }
924
- export interface WriteRequestType {
1012
+ };
1013
+ export type WriteRequestType = {
925
1014
  data: string;
926
1015
  type?: string;
927
- }
1016
+ };
928
1017
 
929
- export interface WriteAnyRequestType {
1018
+ export type WriteAnyRequestType = {
930
1019
  data: {
931
1020
  text?: string;
932
1021
  html?: string;
933
1022
  rtf?: string;
934
1023
  };
935
1024
  type?: string;
936
- }
1025
+ };
937
1026
 
938
- export interface SubscriptionOptions {
1027
+ export type SubscriptionOptions = {
939
1028
  timestamp?: number;
940
- }
1029
+ };
941
1030
 
942
- export interface SharedWorkerInfo {
1031
+ export type SharedWorkerInfo = {
943
1032
  id: string;
944
1033
  url: string;
945
- }
1034
+ };
946
1035
 
947
- export interface ServiceIdentifier {
1036
+ export type ServiceIdentifier = {
948
1037
  name: string;
949
- }
1038
+ };
950
1039
 
951
- export interface ServiceConfiguration {
1040
+ export type ServiceConfiguration = {
952
1041
  config: object;
953
1042
  name: string;
954
- }
1043
+ };
955
1044
 
956
- export interface RVMInfo {
1045
+ export type RVMInfo = {
957
1046
  'action': string;
958
1047
  'appLogDirectory': string;
959
1048
  'path': string;
960
1049
  'start-time': string;
961
1050
  'version': string;
962
1051
  'working-dir': string;
963
- }
1052
+ };
964
1053
 
965
- export interface RvmLaunchOptions {
1054
+ export type RvmLaunchOptions = {
966
1055
  noUi?: boolean;
967
1056
  userAppConfigArgs?: object;
968
- }
1057
+ };
969
1058
 
970
- export interface ShortCutConfig {
1059
+ export type ShortCutConfig = {
971
1060
  desktop?: boolean;
972
1061
  startMenu?: boolean;
973
1062
  systemStartup?: boolean;
974
- }
1063
+ };
975
1064
 
976
- export interface TerminateExternalRequestType {
1065
+ export type TerminateExternalRequestType = {
977
1066
  uuid: string;
978
1067
  timeout: number;
979
1068
  killTree: boolean;
980
- }
1069
+ };
981
1070
 
982
- export interface TrayInfo {
1071
+ export type TrayInfo = {
983
1072
  bounds: OpenFin.Rectangle;
984
1073
  monitorInfo: OpenFin.MonitorInfo;
985
1074
  x: number;
986
1075
  y: number;
987
- }
1076
+ };
988
1077
 
989
- export interface Transition {
1078
+ export type Transition = {
990
1079
  opacity?: Opacity;
991
1080
  position?: Position;
992
1081
  size?: Size;
993
- }
1082
+ };
994
1083
 
995
- export interface Size extends TransitionBase {
1084
+ export type Size = TransitionBase & {
996
1085
  width: number;
997
1086
  height: number;
998
- }
1087
+ };
999
1088
 
1000
- export interface Opacity extends TransitionBase {
1089
+ export type Opacity = TransitionBase & {
1001
1090
  opacity: number;
1002
- }
1091
+ };
1003
1092
 
1004
- export interface TransitionBase {
1093
+ export type TransitionBase = {
1005
1094
  duration: number;
1006
1095
  relative?: boolean;
1007
- }
1096
+ };
1008
1097
 
1009
- export interface Position extends TransitionBase {
1098
+ export type Position = TransitionBase & {
1010
1099
  left: number;
1011
1100
  top: number;
1012
- }
1101
+ };
1013
1102
 
1014
1103
  export type AnchorType = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
1015
1104
 
1016
- export interface TransitionOptions {
1105
+ export type TransitionOptions = {
1017
1106
  interrupt: boolean;
1018
1107
  tween?: tween;
1019
- }
1108
+ };
1020
1109
 
1021
1110
  type tween =
1022
1111
  | 'linear'
@@ -1037,31 +1126,31 @@ declare namespace OpenFin {
1037
1126
  | 'ease-out-elastic'
1038
1127
  | 'ease-in-out-elastic';
1039
1128
 
1040
- export interface FindInPageOptions {
1129
+ export type FindInPageOptions = {
1041
1130
  forward?: boolean;
1042
1131
  findNext?: boolean;
1043
1132
  matchCase?: boolean;
1044
1133
  wordStart?: boolean;
1045
1134
  medialCapitalAsWordStart?: boolean;
1046
- }
1135
+ };
1047
1136
 
1048
- export interface FrameInfo {
1137
+ export type FrameInfo = {
1049
1138
  name: string;
1050
1139
  uuid: string;
1051
1140
  entityType: EntityType;
1052
1141
  parent: Identity;
1053
- }
1142
+ };
1054
1143
 
1055
- export interface ExternalApplicationInfo {
1144
+ export type ExternalApplicationInfo = {
1056
1145
  parent: Identity;
1057
- }
1146
+ };
1058
1147
 
1059
- export interface ExternalConnection {
1148
+ export type ExternalConnection = {
1060
1149
  token: string;
1061
1150
  uuid: string;
1062
- }
1151
+ };
1063
1152
 
1064
- export interface ExternalProcessRequestType {
1153
+ export type ExternalProcessRequestType = {
1065
1154
  path?: string;
1066
1155
  alias?: string;
1067
1156
  arguments?: string;
@@ -1071,114 +1160,111 @@ declare namespace OpenFin {
1071
1160
  uuid?: string;
1072
1161
  initialWindowState?: string;
1073
1162
  cwd?: string;
1074
- }
1163
+ };
1075
1164
 
1076
- export interface CertificationInfo {
1165
+ export type CertificationInfo = {
1077
1166
  serial?: string;
1078
1167
  subject?: string;
1079
1168
  publickey?: string;
1080
1169
  thumbprint?: string;
1081
1170
  trusted?: boolean;
1082
- }
1171
+ };
1083
1172
 
1084
- export interface ExitCode {
1173
+ export type ExitCode = {
1085
1174
  topic: string;
1086
1175
  uuid: string;
1087
1176
  exitCode: number;
1088
- }
1177
+ };
1089
1178
 
1090
- export interface LaunchExternalProcessListener {
1179
+ export type LaunchExternalProcessListener = {
1091
1180
  (code: ExitCode): void;
1092
- }
1181
+ };
1093
1182
 
1094
- export interface ExternalProcessInfo {
1183
+ export type ExternalProcessInfo = {
1095
1184
  pid: number;
1096
1185
  listener?: LaunchExternalProcessListener;
1097
- }
1186
+ };
1098
1187
 
1099
- export interface AppAssetInfo {
1188
+ export type AppAssetInfo = {
1100
1189
  src: string;
1101
1190
  alias: string;
1102
1191
  version: string;
1103
1192
  target?: string;
1104
1193
  args?: string;
1105
1194
  mandatory?: boolean;
1106
- }
1195
+ };
1107
1196
 
1108
- export interface RuntimeDownloadOptions {
1197
+ export type RuntimeDownloadOptions = {
1109
1198
  version: string;
1110
- }
1199
+ };
1111
1200
 
1112
- export interface AppAssetRequest {
1201
+ export type AppAssetRequest = {
1113
1202
  alias: string;
1114
- }
1203
+ };
1115
1204
 
1116
- export interface RuntimeDownloadProgress {
1205
+ export type RuntimeDownloadProgress = {
1117
1206
  downloadedBytes: number;
1118
1207
  totalBytes: number;
1119
- }
1208
+ };
1120
1209
 
1121
- export interface CertifiedAppInfo {
1210
+ export type CertifiedAppInfo = {
1122
1211
  isRunning: boolean;
1123
1212
  isOptedIntoCertfiedApp?: boolean;
1124
1213
  isCertified?: boolean;
1125
1214
  isSSLCertified?: boolean;
1126
1215
  isPresentInAppDirectory?: boolean;
1127
- }
1128
- export interface JumpListCategory {
1216
+ };
1217
+ export type JumpListCategory = {
1129
1218
  name?: string;
1130
1219
  items: Array<JumpListTask | JumpListSeparator>;
1131
- }
1220
+ };
1132
1221
 
1133
1222
  export type JumpListItem = JumpListTask | JumpListSeparator;
1134
1223
 
1135
- export interface JumpListTask {
1224
+ export type JumpListTask = {
1136
1225
  type: 'task';
1137
1226
  title: string;
1138
1227
  description: string;
1139
1228
  deepLink: string;
1140
1229
  iconPath?: string;
1141
1230
  iconIndex?: number;
1142
- }
1231
+ };
1143
1232
 
1144
- export interface JumpListSeparator {
1233
+ export type JumpListSeparator = {
1145
1234
  type: 'separator';
1146
- }
1147
- export interface ApplicationInfo {
1235
+ };
1236
+
1237
+ export type ApplicationInfo = {
1148
1238
  initialOptions: OpenFin.ApplicationCreationOptions;
1149
1239
  launchMode: string;
1150
1240
  manifest: OpenFin.Manifest & { [key: string]: any };
1151
1241
  manifestUrl: string;
1152
1242
  parentUuid?: string;
1153
1243
  runtime: { version: string };
1154
- }
1155
-
1156
- export interface LogInfo {
1157
- logId: string;
1158
- }
1244
+ };
1159
1245
 
1160
- export interface ManifestInfo {
1246
+ export type ManifestInfo = {
1161
1247
  uuid: string;
1162
1248
  manifestUrl: string;
1163
- }
1249
+ };
1164
1250
 
1165
- export interface ClickedMenuResult {
1251
+ export type ClickedMenuResult = {
1166
1252
  result: 'clicked';
1167
1253
  data: any;
1168
- }
1254
+ };
1169
1255
 
1170
- export interface ClosedMenuResult {
1256
+ export type ClosedMenuResult = {
1171
1257
  result: 'closed';
1172
- }
1258
+ };
1173
1259
 
1174
1260
  export type MenuResult = ClickedMenuResult | ClosedMenuResult;
1175
1261
 
1176
- export interface ShowPopupMenuOptions {
1262
+ export type ShowPopupMenuOptions = {
1177
1263
  template: MenuItemTemplate[];
1178
1264
  x?: number;
1179
1265
  y?: number;
1180
- }
1181
- export interface MenuItemTemplate {
1266
+ };
1267
+ export type MenuItemTemplate = {
1182
1268
  /**
1183
1269
  * Can be `normal`, `separator`, `submenu`, or `checkbox`.
1184
1270
  * Defaults to 'normal' unless a 'submenu' key exists
@@ -1214,13 +1300,13 @@ declare namespace OpenFin {
1214
1300
  * Image Data URI with image dimensions inferred from the encoded string
1215
1301
  */
1216
1302
  icon?: string;
1217
- }
1303
+ };
1218
1304
 
1219
- export interface NativeWindowIntegrationProviderAuthorization {
1305
+ export type NativeWindowIntegrationProviderAuthorization = {
1220
1306
  authorizedUuid: string;
1221
- }
1307
+ };
1222
1308
 
1223
- export interface RuntimeInfo {
1309
+ export type RuntimeInfo = {
1224
1310
  architecture: string;
1225
1311
  manifestUrl: string;
1226
1312
  port: number;
@@ -1230,75 +1316,74 @@ declare namespace OpenFin {
1230
1316
  chromeVersion: string;
1231
1317
  electronVersion: string;
1232
1318
  devtoolsPort?: number;
1233
- }
1319
+ };
1234
1320
 
1235
- export interface DefaultDomainSettings {
1321
+ export type DefaultDomainSettings = {
1236
1322
  rules: DefaultDomainSettingsRule[];
1237
- }
1323
+ };
1238
1324
 
1239
- export interface DefaultDomainSettingsRule {
1325
+ export type DefaultDomainSettingsRule = {
1240
1326
  // match pattern is a domain based string type
1241
1327
  match: string[];
1242
1328
  options: {
1243
1329
  downloadSettings: FileDownloadSettings;
1244
1330
  };
1245
- }
1331
+ };
1246
1332
 
1247
1333
  export type FileDownloadBehaviorNames = 'prompt' | 'no-prompt' | 'block';
1248
1334
 
1249
- export interface FileDownloadSettings {
1335
+ export type FileDownloadSettings = {
1250
1336
  rules: DownloadRule[];
1251
- }
1337
+ };
1252
1338
 
1253
- export interface DownloadRule {
1339
+ export type DownloadRule = {
1254
1340
  behavior: FileDownloadBehaviorNames;
1255
1341
  // match pattern is a string type
1256
1342
  match: string[];
1257
- }
1258
- export interface ContextSubscription {
1343
+ };
1344
+ export type ContextSubscription = {
1259
1345
  handler: ContextHandler;
1260
1346
  contextType?: string;
1261
- }
1347
+ };
1262
1348
 
1263
1349
  export type ContextHandler = (context: OpenFin.Context) => void;
1264
1350
 
1265
- export interface Intent<MetadataType = IntentMetadata> {
1351
+ export type Intent<MetadataType = IntentMetadata> = {
1266
1352
  name: string;
1267
1353
  context: Context;
1268
1354
  metadata?: MetadataType;
1269
- }
1355
+ };
1270
1356
 
1271
- export interface IntentMetadata<TargetType = any> {
1357
+ export type IntentMetadata<TargetType = any> = {
1272
1358
  target?: TargetType;
1273
- }
1359
+ };
1274
1360
 
1275
1361
  export type IntentHandler = (intent: OpenFin.Intent) => void;
1276
1362
  type MatchPattern = string;
1277
1363
 
1278
1364
  export type ContentCreationBehaviorNames = 'window' | 'view' | 'block' | 'browser';
1279
- export interface ContentCreationRule<T = ContentCreationBehaviorNames> {
1365
+ export type ContentCreationRule<T = ContentCreationBehaviorNames> = {
1280
1366
  behavior: T;
1281
1367
  match: MatchPattern[];
1282
1368
  options?: T extends 'window' ? Partial<WindowOptions> : T extends 'view' ? Partial<OpenFin.ViewOptions> : never;
1283
- }
1369
+ };
1284
1370
 
1285
- export interface ContentCreationOptions {
1371
+ export type ContentCreationOptions = {
1286
1372
  rules: ContentCreationRule[];
1287
- }
1288
- export interface SnapshotProvider<T> {
1373
+ };
1374
+ export type SnapshotProvider<T> = {
1289
1375
  getSnapshot: () => Promise<T>;
1290
1376
  applySnapshot: (snapshot: T) => Promise<void>;
1291
- }
1377
+ };
1292
1378
 
1293
- export type PermissionState = import('./src/api/system/queryPermissionTypes').PermissionState;
1294
- export interface QueryPermissionResult {
1379
+ export type QueryPermissionResult = {
1295
1380
  permission: string;
1296
1381
  state: PermissionState;
1297
1382
  granted: boolean;
1298
1383
  rawValue?: unknown;
1299
- }
1384
+ };
1300
1385
 
1301
- export interface SessionContextGroup {
1386
+ export type SessionContextGroup = {
1302
1387
  id: string;
1303
1388
  setContext: (context: OpenFin.Context) => Promise<void>;
1304
1389
  getCurrentContext: (type?: string) => Promise<OpenFin.Context>;
@@ -1306,35 +1391,960 @@ declare namespace OpenFin {
1306
1391
  handler: OpenFin.ContextHandler,
1307
1392
  contextType?: string
1308
1393
  ) => Promise<{ unsubscribe: () => void }>;
1309
- }
1394
+ };
1310
1395
 
1311
1396
  export type MessagingProtocols = import('./src/api/interappbus/channel/protocols/index').MessagingProtocols;
1312
1397
 
1313
- export interface ChannelCreateOptions {
1398
+ export type ChannelCreateOptions = {
1314
1399
  protocols?: MessagingProtocols[];
1315
- }
1400
+ };
1316
1401
 
1317
- export interface ChannelConnectOptions extends ChannelCreateOptions {
1402
+ export type ChannelConnectOptions = ChannelCreateOptions & {
1318
1403
  wait?: boolean;
1319
1404
  payload?: any;
1320
- }
1405
+ };
1321
1406
 
1322
- export interface ContextForIntent<MetadataType = any> extends Context {
1407
+ export type ContextForIntent<MetadataType = any> = Context & {
1323
1408
  metadata?: MetadataType;
1324
- }
1409
+ };
1325
1410
 
1326
- export interface InfoForIntentOptions {
1411
+ export type InfoForIntentOptions = {
1327
1412
  name: string;
1328
1413
  context?: OpenFin.Context;
1329
- }
1414
+ };
1330
1415
 
1331
- export interface ProviderIdentity extends Identity {
1416
+ export type ProviderIdentity = Identity & {
1332
1417
  channelId: string;
1333
1418
  channelName: string;
1334
- }
1419
+ };
1335
1420
 
1336
- export interface RegisterUsageData {
1421
+ export type RegisterUsageData = {
1337
1422
  data: unknown;
1338
1423
  type: string;
1339
- }
1424
+ };
1425
+
1426
+ export type ProxyInfo = {
1427
+ config: ProxyConfig;
1428
+ system: ProxySystemInfo;
1429
+ };
1430
+
1431
+ export type ProxyConfig = {
1432
+ proxyAddress: string;
1433
+ proxyPort: number;
1434
+ type: string;
1435
+ };
1436
+
1437
+ export type ProxySystemInfo = {
1438
+ autoConfigUrl: string;
1439
+ bypass: string;
1440
+ enabled: boolean;
1441
+ proxy: string;
1442
+ };
1443
+
1444
+ export type BaseEvent<Topic, Type> = {
1445
+ topic: Topic;
1446
+ type: Type;
1447
+ };
1448
+
1449
+ export type ApplicationEvent<Topic, Type> = BaseEvent<Topic, Type> & {
1450
+ uuid: string;
1451
+ };
1452
+
1453
+ export type WindowEvent<Topic, Type> = ApplicationEvent<Topic, Type> & {
1454
+ name: string;
1455
+ };
1456
+
1457
+ export type BaseEventMap = {
1458
+ [name: string]: any;
1459
+ newListener: string;
1460
+ listenerRemoved: string;
1461
+ };
1462
+
1463
+ export type WindowResourceLoadFailedEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1464
+ errorCode: number;
1465
+ errorDescription: string;
1466
+ validatedURL: string;
1467
+ isMainFrame: boolean;
1468
+ };
1469
+
1470
+ export type WindowResourceResponseReceivedEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1471
+ status: boolean;
1472
+ newUrl: string;
1473
+ originalUrl: string;
1474
+ httpResponseCode: number;
1475
+ requestMethod: string;
1476
+ referrer: string;
1477
+ headers: any;
1478
+ resourceType: 'mainFrame' | 'subFrame' | 'styleSheet' | 'script' | 'image' | 'object' | 'xhr' | 'other';
1479
+ };
1480
+
1481
+ export type PageTitleUpdatedEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1482
+ title: string;
1483
+ };
1484
+
1485
+ export type CertificateErrorEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1486
+ error: string;
1487
+ url: string;
1488
+ certificate: OpenFin.Certificate;
1489
+ };
1490
+
1491
+ export type CertificateSelectionShownEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1492
+ url: string;
1493
+ certificates: OpenFin.Certificate[];
1494
+ };
1495
+
1496
+ export type FaviconUpdatedEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1497
+ favicons: string[];
1498
+ };
1499
+
1500
+ export type CrashedEvent = {
1501
+ reason:
1502
+ | 'normal-termination'
1503
+ | 'abnormal-termination'
1504
+ | 'killed'
1505
+ | 'crashed'
1506
+ | 'still-running'
1507
+ | 'launch-failed'
1508
+ | 'out-of-memory'
1509
+ | 'integrity-failure';
1510
+ exitCode: number;
1511
+ details: {
1512
+ reason: string;
1513
+ exitCode: number;
1514
+ };
1515
+ };
1516
+
1517
+ export type WindowNavigationRejectedEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1518
+ sourceName?: string; // DEPRECATED
1519
+ url: string;
1520
+ };
1521
+
1522
+ export type FrameEvent<Type> = WindowEvent<'frame', Type> & {
1523
+ entityType: 'iframe';
1524
+ frameName: string;
1525
+ };
1526
+
1527
+ export type FrameEvents = BaseEventMap & {
1528
+ connected: FrameEvent<'connected'>;
1529
+ disconnected: FrameEvent<'disconnected'>;
1530
+ };
1531
+
1532
+ // This file exports base event types to level specific events
1533
+ // Those files map event names to event shapes and use a mapped type to specify topic and type
1534
+ export type RuntimeEvent<Topic = string, Type = string> = Topic extends 'window' | 'view'
1535
+ ? WindowEvent<Topic, Type>
1536
+ : Topic extends 'frame'
1537
+ ? FrameEvent<Type>
1538
+ : Topic extends 'application'
1539
+ ? ApplicationEvent<Topic, Type>
1540
+ : BaseEvent<Topic, Type>;
1541
+
1542
+ export type WebContentsEventMapping<Topic = string, Type = string> = BaseEventMap & {
1543
+ 'blurred': WindowEvent<Topic, Type>;
1544
+ 'certificate-error': CertificateErrorEvent<Topic, Type>;
1545
+ 'certificate-selection-shown': CertificateSelectionShownEvent<Topic, Type>;
1546
+ 'crashed': CrashedEvent & WindowEvent<Topic, Type>;
1547
+ 'did-change-theme-color': WindowEvent<Topic, Type>;
1548
+ 'focused': WindowEvent<Topic, Type>;
1549
+ 'found-in-page': WindowEvent<Topic, Type>;
1550
+ 'navigation-rejected': WindowNavigationRejectedEvent<Topic, Type>;
1551
+ 'page-favicon-updated': FaviconUpdatedEvent<Topic, Type>;
1552
+ 'page-title-updated': PageTitleUpdatedEvent<Topic, Type>;
1553
+ 'resource-load-failed': WindowResourceLoadFailedEvent<Topic, Type>;
1554
+ 'resource-response-received': WindowResourceResponseReceivedEvent<Topic, Type>;
1555
+ };
1556
+
1557
+ export type RunRequestedEvent<Topic, Type> = ApplicationEvent<Topic, Type> & {
1558
+ userAppConfigArgs: any;
1559
+ manifest: OpenFin.ManifestInfo;
1560
+ };
1561
+
1562
+ export type TrayIconClicked<Topic, Type> = ApplicationEvent<Topic, Type> & {
1563
+ button: 0 | 1 | 2;
1564
+ bounds: OpenFin.Rectangle;
1565
+ x: number;
1566
+ y: number;
1567
+ monitorInfo: any;
1568
+ };
1569
+
1570
+ export type WindowAlertRequestedEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1571
+ message: string;
1572
+ url: string;
1573
+ };
1574
+
1575
+ export type WindowAuthRequestedEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1576
+ authInfo: {
1577
+ host: string;
1578
+ isProxy: boolean;
1579
+ port: number;
1580
+ realm: string;
1581
+ scheme: string;
1582
+ };
1583
+ };
1584
+
1585
+ export type WindowEndLoadEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1586
+ documentName: string;
1587
+ isMain: boolean;
1588
+ };
1589
+
1590
+ export type WindowReloadedEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1591
+ url: string;
1592
+ };
1593
+
1594
+ export type WindowOptionsChangedEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1595
+ options: OpenFin.WindowOptions;
1596
+ diff: OpenFin.WindowOptionDiff;
1597
+ };
1598
+
1599
+ export type WindowExternalProcessExitedEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1600
+ processUuid: string;
1601
+ exitCode: number;
1602
+ };
1603
+
1604
+ export type WindowExternalProcessStartedEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1605
+ processUuid: string;
1606
+ };
1607
+
1608
+ export type WindowHiddenEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1609
+ reason: 'closing' | 'hide' | 'hide-on-close';
1610
+ };
1611
+
1612
+ export type PreloadScriptInfoRunning = {
1613
+ state:
1614
+ | 'load-started' // started loading preload script
1615
+ | 'load-failed' // preload script failed to load
1616
+ | 'load-succeeded' // preload script is loaded and ready to be eval'ed
1617
+ | 'failed' // preload script failed to eval
1618
+ | 'succeeded'; // preload script eval'ed successfully
1619
+ };
1620
+
1621
+ export type PreloadScriptInfo = {
1622
+ state:
1623
+ | 'load-failed' // preload script failed to load
1624
+ | 'failed' // preload script failed to eval
1625
+ | 'succeeded'; // preload script eval'ed successfully
1626
+ };
1627
+ export type WindowPreloadScriptsStateChangeEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1628
+ preloadScripts: (PreloadScriptInfoRunning & any)[];
1629
+ };
1630
+ export type WindowPreloadScriptsStateChangedEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1631
+ preloadScripts: (PreloadScriptInfoRunning & any)[];
1632
+ };
1633
+
1634
+ export type WindowBeginBoundsChangingEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1635
+ height: number;
1636
+ left: number;
1637
+ top: number;
1638
+ width: number;
1639
+ windowState: 'minimized' | 'normal' | 'maximized';
1640
+ };
1641
+
1642
+ export type WindowEndBoundsChangingEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1643
+ height: number;
1644
+ left: number;
1645
+ top: number;
1646
+ width: number;
1647
+ windowState: 'minimized' | 'normal' | 'maximized';
1648
+ };
1649
+
1650
+ export type WindowBoundsChange<Topic, Type> = WindowEvent<Topic, Type> & {
1651
+ changeType: 0 | 1 | 2;
1652
+ deferred: boolean;
1653
+ height: number;
1654
+ left: number;
1655
+ top: number;
1656
+ width: number;
1657
+ };
1658
+
1659
+ export type WillMoveOrResize<Topic, Type> = WindowEvent<Topic, Type> & {
1660
+ height: number;
1661
+ left: number;
1662
+ top: number;
1663
+ width: number;
1664
+ monitorScaleFactor: number;
1665
+ };
1666
+
1667
+ export type WindowPerformanceReport<Topic, Type> = Performance & WindowEvent<Topic, Type>;
1668
+
1669
+ export type ViewDetached<Topic, Type> = WindowEvent<Topic, Type> & {
1670
+ previousTarget: OpenFin.Identity;
1671
+ target: OpenFin.Identity;
1672
+ viewIdentity: OpenFin.Identity;
1673
+ };
1674
+
1675
+ export type WindowEventMapping<Topic = string, Type = string> = WebContentsEventMapping & {
1676
+ 'auth-requested': WindowAuthRequestedEvent<Topic, Type>;
1677
+ 'begin-user-bounds-changing': WindowBeginBoundsChangingEvent<Topic, Type>;
1678
+ 'bounds-changed': WindowBoundsChange<Topic, Type>;
1679
+ 'bounds-changing': WindowBoundsChange<Topic, Type>;
1680
+ 'close-requested': WindowEvent<Topic, Type>;
1681
+ 'closed': WindowEvent<Topic, Type>;
1682
+ 'closing': WindowEvent<Topic, Type>;
1683
+ 'disabled-movement-bounds-changed': WindowBoundsChange<Topic, Type>;
1684
+ 'disabled-movement-bounds-changing': WindowBoundsChange<Topic, Type>;
1685
+ 'embedded': WindowEvent<Topic, Type>;
1686
+ 'end-user-bounds-changing': WindowEndBoundsChangingEvent<Topic, Type>;
1687
+ 'external-process-exited': WindowExternalProcessExitedEvent<Topic, Type>;
1688
+ 'external-process-started': WindowExternalProcessStartedEvent<Topic, Type>;
1689
+ 'hidden': WindowHiddenEvent<Topic, Type>;
1690
+ 'hotkey': InputEvent & WindowEvent<Topic, Type>;
1691
+ 'initialized': WindowEvent<Topic, Type>;
1692
+ 'layout-initialized': WindowEvent<Topic, Type>;
1693
+ 'layout-ready': WindowEvent<Topic, Type>;
1694
+ 'maximized': WindowEvent<Topic, Type>;
1695
+ 'minimized': WindowEvent<Topic, Type>;
1696
+ 'options-changed': WindowOptionsChangedEvent<Topic, Type>;
1697
+ 'performance-report': WindowPerformanceReport<Topic, Type>;
1698
+ 'preload-scripts-state-changed': WindowPreloadScriptsStateChangeEvent<Topic, Type>;
1699
+ 'preload-scripts-state-changing': WindowPreloadScriptsStateChangeEvent<Topic, Type>;
1700
+ 'reloaded': WindowReloadedEvent<Topic, Type>;
1701
+ 'restored': WindowEvent<Topic, Type>;
1702
+ 'show-requested': WindowEvent<Topic, Type>;
1703
+ 'shown': WindowEvent<Topic, Type>;
1704
+ 'user-movement-disabled': WindowEvent<Topic, Type>;
1705
+ 'user-movement-enabled': WindowEvent<Topic, Type>;
1706
+ 'view-attached': WindowEvent<Topic, Type>;
1707
+ 'view-detached': ViewDetached<Topic, Type>;
1708
+ 'will-move': WillMoveOrResize<Topic, Type>;
1709
+ 'will-resize': WillMoveOrResize<Topic, Type>;
1710
+ };
1711
+
1712
+ export type PropagatedWindowEventMapping<Topic = string, Type = string> = BaseEventMap & {
1713
+ 'window-begin-user-bounds-changing': WindowBeginBoundsChangingEvent<Topic, Type>;
1714
+ 'window-blurred': WindowEvent<Topic, Type>;
1715
+ 'window-bounds-changed': WindowBoundsChange<Topic, Type>;
1716
+ 'window-bounds-changing': WindowBoundsChange<Topic, Type>;
1717
+ 'window-certificate-selection-shown': CertificateSelectionShownEvent<Topic, Type>;
1718
+ 'window-closed': WindowEvent<Topic, Type>;
1719
+ 'window-closing': WindowEvent<Topic, Type>;
1720
+ 'window-crashed': CrashedEvent & WindowEvent<Topic, Type>;
1721
+ 'window-disabled-movement-bounds-changed': WindowBoundsChange<Topic, Type>;
1722
+ 'window-disabled-movement-bounds-changing': WindowBoundsChange<Topic, Type>;
1723
+ 'window-embedded': WindowEvent<Topic, Type>;
1724
+ 'window-end-user-bounds-changing': WindowBeginBoundsChangingEvent<Topic, Type>;
1725
+ 'window-external-process-exited': WindowExternalProcessExitedEvent<Topic, Type>;
1726
+ 'window-external-process-started': WindowExternalProcessStartedEvent<Topic, Type>;
1727
+ 'window-focused': WindowEvent<Topic, Type>;
1728
+ 'window-hidden': WindowHiddenEvent<Topic, Type>;
1729
+ 'window-hotkey': InputEvent & WindowEvent<Topic, Type>;
1730
+ 'window-initialized': WindowEvent<Topic, Type>;
1731
+ 'window-layout-initialized': WindowEvent<Topic, Type>;
1732
+ 'window-layout-ready': WindowEvent<Topic, Type>;
1733
+ 'window-maximized': WindowEvent<Topic, Type>;
1734
+ 'window-minimized': WindowEvent<Topic, Type>;
1735
+ 'window-navigation-rejected': WindowNavigationRejectedEvent<Topic, Type>;
1736
+ 'window-options-changed': WindowOptionsChangedEvent<Topic, Type>;
1737
+ 'window-performance-report': WindowPerformanceReport<Topic, Type>;
1738
+ 'window-preload-scripts-state-changed': WindowPreloadScriptsStateChangeEvent<Topic, Type>;
1739
+ 'window-preload-scripts-state-changing': WindowPreloadScriptsStateChangedEvent<Topic, Type>;
1740
+ 'window-resource-load-failed': WindowResourceLoadFailedEvent<Topic, Type>;
1741
+ 'window-resource-response-received': WindowResourceResponseReceivedEvent<Topic, Type>;
1742
+ 'window-reloaded': WindowReloadedEvent<Topic, Type>;
1743
+ 'window-restored': WindowEvent<Topic, Type>;
1744
+ 'window-shown': WindowEvent<Topic, Type>;
1745
+ 'window-user-movement-disabled': WindowEvent<Topic, Type>;
1746
+ 'window-user-movement-enabled': WindowEvent<Topic, Type>;
1747
+ 'window-will-move': WillMoveOrResize<Topic, Type>;
1748
+ 'window-will-resize': WillMoveOrResize<Topic, Type>;
1749
+ };
1750
+
1751
+ export type ViewEventMapping<Topic = string, Type = string> = WebContentsEventMapping & {
1752
+ 'attached': WindowEvent<Topic, Type>;
1753
+ 'created': WindowEvent<Topic, Type>;
1754
+ 'destroyed': WindowEvent<Topic, Type>;
1755
+ 'hidden': WindowEvent<Topic, Type>;
1756
+ 'hotkey': InputEvent & WindowEvent<Topic, Type>;
1757
+ 'shown': WindowEvent<Topic, Type>;
1758
+ 'target-changed': TargetChangedEvent<Topic, Type>;
1759
+ };
1760
+
1761
+ type PropagatedViewIdentity = {
1762
+ viewIdentity: OpenFin.Identity;
1763
+ };
1764
+
1765
+ export type PropagatedViewEventMapping<Topic = string, Type = string> = BaseEventMap & {
1766
+ 'view-blurred': WindowEvent<Topic, Type> & PropagatedViewIdentity;
1767
+ 'view-certificate-selection-shown': CertificateSelectionShownEvent<Topic, Type> & PropagatedViewIdentity;
1768
+ 'view-crashed': CrashedEvent & WindowEvent<Topic, Type> & PropagatedViewIdentity;
1769
+ 'view-created': CrashedEvent & WindowEvent<Topic, Type> & PropagatedViewIdentity;
1770
+ 'view-destroyed': WindowEvent<Topic, Type> & PropagatedViewIdentity;
1771
+ 'view-did-change-theme-color': WindowEvent<Topic, Type> & PropagatedViewIdentity;
1772
+ 'view-focused': WindowEvent<Topic, Type> & PropagatedViewIdentity;
1773
+ 'view-hidden': WindowEvent<Topic, Type> & PropagatedViewIdentity;
1774
+ 'view-hotkey': InputEvent & WindowEvent<Topic, Type> & PropagatedViewIdentity;
1775
+ 'view-navigation-rejected': WindowNavigationRejectedEvent<Topic, Type> & PropagatedViewIdentity;
1776
+ 'view-page-favicon-updated': WindowEvent<Topic, Type> & PropagatedViewIdentity;
1777
+ 'view-page-title-updated': WindowEvent<Topic, Type> & PropagatedViewIdentity;
1778
+ 'view-resource-load-failed': WindowResourceLoadFailedEvent<Topic, Type> & PropagatedViewIdentity;
1779
+ 'view-resource-response-received': WindowResourceResponseReceivedEvent<Topic, Type> & PropagatedViewIdentity;
1780
+ 'view-shown': WindowEvent<Topic, Type> & PropagatedViewIdentity;
1781
+ 'view-target-changed': TargetChangedEvent<Topic, Type> & PropagatedViewIdentity;
1782
+ };
1783
+
1784
+ export type ViewEvents = {
1785
+ [Type in keyof ViewEventMapping]: ViewEventMapping<'view', Type>[Type];
1786
+ };
1787
+
1788
+ export type PropagatedViewEvents<Topic> = {
1789
+ [Type in keyof PropagatedViewEventMapping]: PropagatedViewEventMapping<Topic, Type>[Type];
1790
+ };
1791
+
1792
+ export type InputEvent = {
1793
+ inputType: 'keyUp' | 'keyDown';
1794
+ ctrlKey: boolean;
1795
+ shiftKey: boolean;
1796
+ altKey: boolean;
1797
+ metaKey: boolean;
1798
+ key: string;
1799
+ code: string;
1800
+ repeat: boolean;
1801
+ command?: string;
1802
+ };
1803
+
1804
+ export type TargetChangedEvent<Topic, Type> = WindowEvent<Topic, Type> & {
1805
+ previousTarget: OpenFin.Identity;
1806
+ target: OpenFin.Identity;
1807
+ };
1808
+
1809
+ // This is the type we should be using. It takes the more generic mapping and applies the proper Topic and Type to each event
1810
+ export type WindowEvents = PropagatedViewEventMapping<'window'> &
1811
+ {
1812
+ [Type in keyof WindowEventMapping]: WindowEventMapping<'window', Type>[Type];
1813
+ };
1814
+
1815
+ export type PropagatedWindowEvents<Topic> = {
1816
+ [Type in keyof PropagatedWindowEventMapping]: PropagatedWindowEventMapping<Topic, Type>[Type];
1817
+ };
1818
+
1819
+ export type ApplicationEventMapping<Topic = string, Type = string> = BaseEventMap & {
1820
+ 'closed': ApplicationEvent<Topic, Type>;
1821
+ 'connected': ApplicationEvent<Topic, Type>;
1822
+ 'crashed': CrashedEvent & ApplicationEvent<Topic, Type>;
1823
+ 'initialized': ApplicationEvent<Topic, Type>;
1824
+ 'manifest-changed': ApplicationEvent<Topic, Type>;
1825
+ 'not-responding': ApplicationEvent<Topic, Type>;
1826
+ 'responding': ApplicationEvent<Topic, Type>;
1827
+ 'run-requested': RunRequestedEvent<Topic, Type>;
1828
+ 'started': ApplicationEvent<Topic, Type>;
1829
+ 'tray-icon-clicked': TrayIconClicked<Topic, Type>;
1830
+ 'window-alert-requested': WindowAlertRequestedEvent<Topic, Type>;
1831
+ 'window-auth-requested': WindowAuthRequestedEvent<Topic, Type>;
1832
+ 'window-created': WindowEvent<Topic, Type>;
1833
+ 'window-end-load': WindowEndLoadEvent<Topic, Type>;
1834
+ 'window-not-responding': WindowEvent<Topic, Type>;
1835
+ 'window-performance-report': WindowPerformanceReport<Topic, Type>;
1836
+ 'window-responding': WindowEvent<Topic, Type>;
1837
+ 'window-show-requested': WindowEvent<Topic, Type>;
1838
+ 'window-start-load': WindowEvent<Topic, Type>;
1839
+ };
1840
+
1841
+ export type PropagatedApplicationEventMapping<Topic = string, Type = string> = {
1842
+ 'application-closed': ApplicationEvent<Topic, Type>;
1843
+ 'application-connected': ApplicationEvent<Topic, Type>;
1844
+ 'application-crashed': CrashedEvent & ApplicationEvent<Topic, Type>;
1845
+ 'application-initialized': ApplicationEvent<Topic, Type>;
1846
+ 'application-manifest-changed': ApplicationEvent<Topic, Type>;
1847
+ 'application-not-responding': ApplicationEvent<Topic, Type>;
1848
+ 'application-responding': ApplicationEvent<Topic, Type>;
1849
+ 'application-started': ApplicationEvent<Topic, Type>;
1850
+ 'application-tray-icon-clicked': TrayIconClicked<Topic, Type>;
1851
+ 'window-created': WindowEvent<Topic, Type>;
1852
+ 'window-did-change-theme-color': WindowEvent<Topic, Type>;
1853
+ 'window-end-load': WindowEndLoadEvent<Topic, Type>;
1854
+ 'window-not-responding': WindowEvent<Topic, Type>;
1855
+ 'window-page-favicon-updated': WindowEvent<Topic, Type>;
1856
+ 'window-page-title-updated': WindowEvent<Topic, Type>;
1857
+ 'window-performance-report': WindowPerformanceReport<Topic, Type>;
1858
+ 'window-responding': WindowEvent<Topic, Type>;
1859
+ 'window-start-load': WindowEvent<Topic, Type>;
1860
+ };
1861
+
1862
+ export type ApplicationEvents = PropagatedWindowEvents<'application'> &
1863
+ PropagatedViewEvents<'application'> &
1864
+ {
1865
+ [Type in keyof ApplicationEventMapping]: ApplicationEventMapping<'application', Type>[Type];
1866
+ };
1867
+ export type PropagatedApplicationEvents<Topic> = {
1868
+ [Type in keyof PropagatedApplicationEventMapping]: PropagatedApplicationEventMapping<Topic, Type>[Type];
1869
+ };
1870
+
1871
+ export type PlatformEventMapping<Topic = string, Type = string> = ApplicationEventMapping & {
1872
+ 'platform-api-ready': ApplicationEvent<Topic, Type>;
1873
+ 'platform-snapshot-applied': ApplicationEvent<Topic, Type>;
1874
+ };
1875
+
1876
+ export type PropagatedPlatformEventMapping<Topic = string, Type = string> = PropagatedApplicationEventMapping & {
1877
+ 'platform-api-ready': ApplicationEvent<Topic, Type>;
1878
+ 'platform-snapshot-applied': ApplicationEvent<Topic, Type>;
1879
+ };
1880
+
1881
+ export type PlatformEvents = PropagatedWindowEvents<'application'> &
1882
+ PropagatedViewEvents<'application'> &
1883
+ {
1884
+ [Type in keyof PlatformEventMapping]: PlatformEventMapping<'application', Type>[Type];
1885
+ };
1886
+ export type PropagatedPlatformEvents<Topic> = {
1887
+ [Type in keyof PropagatedPlatformEventMapping]: PropagatedPlatformEventMapping<Topic, Type>[Type];
1888
+ };
1889
+
1890
+ export type IdleEvent<Topic, Type> = BaseEvent<Topic, Type> & {
1891
+ elapsedTime: number;
1892
+ isIdle: boolean;
1893
+ };
1894
+
1895
+ export type MonitorEvent<Topic, Type> = OpenFin.MonitorInfo & BaseEvent<Topic, Type>;
1896
+
1897
+ export type SessionChangedEvent<Topic, Type> = BaseEvent<Topic, Type> & {
1898
+ reason: 'lock' | 'unlock' | 'remote-connect' | 'remote-disconnect' | 'unknown';
1899
+ };
1900
+
1901
+ export type SystemEventMapping<Topic = string, Type = string> = BaseEventMap & {
1902
+ 'application-created': ApplicationEvent<Topic, Type>;
1903
+ 'desktop-icon-clicked': ApplicationEvent<Topic, Type>;
1904
+ 'idle-state-changed': IdleEvent<Topic, Type>;
1905
+ 'monitor-info-changed': MonitorEvent<Topic, Type>;
1906
+ 'session-changed': SessionChangedEvent<Topic, Type>;
1907
+ };
1908
+ export type SystemEvents = PropagatedWindowEvents<'system'> &
1909
+ PropagatedApplicationEvents<'system'> &
1910
+ PropagatedViewEvents<'system'> &
1911
+ {
1912
+ [Type in keyof SystemEventMapping]: SystemEventMapping<'system', Type>[Type];
1913
+ };
1914
+
1915
+ export type GlobalHotkeyEvent<Type> = RuntimeEvent<'global-hotkey', Type> & {
1916
+ identity: Identity;
1917
+ hotkey: string;
1918
+ };
1919
+
1920
+ export type GlobalHotkeyEvents = BaseEventMap & {
1921
+ registered: GlobalHotkeyEvent<'registered'>;
1922
+ unregistered: GlobalHotkeyEvent<'unregistered'>;
1923
+ };
1924
+
1925
+ export type ExternalApplicationEvents = BaseEventMap & {
1926
+ connected: RuntimeEvent<'externalapplication', 'connected'>;
1927
+ disconnected: RuntimeEvent<'externalapplication', 'disconnected'>;
1928
+ };
1929
+
1930
+ export type ChannelAction = (payload: unknown, id: ProviderIdentity | OpenFin.ClientIdentity) => unknown;
1931
+
1932
+ export type ChannelMiddleware = (
1933
+ topic: string,
1934
+ payload: unknown,
1935
+ senderIdentity: ProviderIdentity | OpenFin.ClientIdentity
1936
+ ) => unknown;
1937
+
1938
+ export type ErrorMiddleware = (
1939
+ topic: string,
1940
+ error: Error,
1941
+ id: ProviderIdentity | OpenFin.ClientIdentity
1942
+ ) => unknown;
1943
+
1944
+ export type SystemApplicationInfo = {
1945
+ isPlatform: boolean;
1946
+ isRunning: boolean;
1947
+ uuid: string;
1948
+ parentUuid?: string;
1949
+ };
1950
+
1951
+ export type InstalledApps = {
1952
+ [key: string]: InstallationInfo;
1953
+ };
1954
+
1955
+ export type InstallationInfo = {
1956
+ cachedManifest: any;
1957
+ };
1958
+
1959
+ export type GetLogRequestType = {
1960
+ name: string;
1961
+ endFile?: string;
1962
+ sizeLimit?: number;
1963
+ };
1964
+
1965
+ export type LogInfo = {
1966
+ name: string;
1967
+ size: number;
1968
+ date: string;
1969
+ };
1970
+
1971
+ // 2.4 supports string enum types, currently we use 2.2
1972
+ export type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
1973
+
1974
+ export type ProcessInfo = {
1975
+ cpuUsage?: number;
1976
+ name?: string;
1977
+ nonPagedPoolUsage?: number;
1978
+ pageFaultCount?: number;
1979
+ pagedPoolUsage?: number;
1980
+ pagefileUsage?: number;
1981
+ peakNonPagedPoolUsage?: number;
1982
+ peakPagedPoolUsage?: number;
1983
+ peakPagefileUsage?: number;
1984
+ peakWorkingSetSize?: number;
1985
+ processId?: number;
1986
+ uuid?: string;
1987
+ workingSetSize?: number;
1988
+ };
1989
+
1990
+ export type PermissionState = 'granted' | 'denied' | 'unavailable';
1991
+
1992
+ export type RegistryInfo = {
1993
+ data: any;
1994
+ rootKey: string;
1995
+ subkey: string;
1996
+ type: string;
1997
+ value: string;
1998
+ };
1999
+
2000
+ export type Entity = {
2001
+ type: string;
2002
+ uuid: string;
2003
+ };
2004
+
2005
+ export type WindowInfo = {
2006
+ childWindows: Array<WindowDetail>;
2007
+ mainWindow: WindowDetail;
2008
+ uuid: string;
2009
+ };
2010
+
2011
+ export type WindowDetail = {
2012
+ bottom: number;
2013
+ height: number;
2014
+ isShowing: boolean;
2015
+ left: number;
2016
+ name: string;
2017
+ right: number;
2018
+ state: string;
2019
+ top: number;
2020
+ width: number;
2021
+ };
2022
+
2023
+ export type WebOptions = {
2024
+ preloadScripts?: OpenFin.PreloadScript[];
2025
+ uuid: string;
2026
+ name: string;
2027
+ contentCreation?: OpenFin.ContentCreationOptions;
2028
+ contentRedirect?: Partial<OpenFin.ContentRedirect>;
2029
+ customContext?: any;
2030
+ experimental?: any;
2031
+ processAffinity?: string;
2032
+ backgroundThrottling?: boolean;
2033
+ interop?: OpenFin.InteropConfig;
2034
+ };
2035
+
2036
+ // Error types
2037
+ export type ERROR_BOX_TYPES =
2038
+ | 'OF_error_box:app_initialization'
2039
+ | 'OF_error_box:main_process'
2040
+ | 'OF_error_box:renderer_crash';
2041
+
2042
+ export type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
2043
+
2044
+ export type InitLayoutOptions = {
2045
+ containerId?: string;
2046
+ };
2047
+
2048
+ export type PresetLayoutOptions = {
2049
+ presetType: LayoutPresetType;
2050
+ };
2051
+
2052
+ export type DragPayload = {
2053
+ 'view-config': OpenFin.ViewCreationOptions;
2054
+ 'view-identity': [string, string, string]; // [componentState, uuid, name]
2055
+ };
2056
+
2057
+ export type Message<T> = {
2058
+ action: string;
2059
+ payload: T;
2060
+ correlationId?: number;
2061
+ };
2062
+
2063
+ export type EventMessage = Message<RuntimeEvent> & {
2064
+ action: 'process-desktop-event';
2065
+ payload: RuntimeEvent;
2066
+ };
2067
+
2068
+ export type Payload = {
2069
+ success: boolean;
2070
+ data: any;
2071
+ };
2072
+
2073
+ export type AuthorizationPayload = {
2074
+ token: string;
2075
+ file: string;
2076
+ };
2077
+
2078
+ /*
2079
+ To Add an api call:
2080
+ 1. The action (string passed to wire.sendAction and key in the actionMap on the core side) should be the key in the protocolmap
2081
+ 2. The request for that key is the type of the second object passed to wire.sendAction, it will be picked up as message.payload in the handler
2082
+ 3. The response for that key is what the core api handler either returns or passes to "ack". It will be the 'data' property of the return value of wire.sendAction
2083
+ */
2084
+ export type ProtocolMap = ProtocolMapBase & {
2085
+ 'request-external-authorization': {
2086
+ request: any;
2087
+ response: void;
2088
+ specialResponse: AuthorizationPayload;
2089
+ };
2090
+ 'application-get-views': {
2091
+ request: OpenFin.ApplicationIdentity;
2092
+ response: OpenFin.Identity[];
2093
+ };
2094
+ 'set-jump-list': {
2095
+ request: { config: OpenFin.JumpListCategory[] | null } & OpenFin.ApplicationIdentity;
2096
+ response: void;
2097
+ };
2098
+ 'get-view-window': {
2099
+ request: OpenFin.Identity;
2100
+ response: OpenFin.Identity;
2101
+ };
2102
+ 'window-get-views': {
2103
+ request: OpenFin.Identity;
2104
+ response: OpenFin.Identity[];
2105
+ };
2106
+ 'hide-view': {
2107
+ request: OpenFin.Identity;
2108
+ response: void;
2109
+ };
2110
+ 'launch-manifest': {
2111
+ request: { manifestUrl: string; opts?: OpenFin.RvmLaunchOptions };
2112
+ response: { manifest: OpenFin.Manifest };
2113
+ };
2114
+ 'get-system-app-configuration': {
2115
+ request: { name: string };
2116
+ response: any;
2117
+ };
2118
+ 'show-popup-menu': {
2119
+ request: OpenFin.Identity & { options: OpenFin.ShowPopupMenuOptions };
2120
+ response: OpenFin.MenuResult;
2121
+ };
2122
+ 'enable-native-window-integration-provider': {
2123
+ request: { permissions: any };
2124
+ response: OpenFin.NativeWindowIntegrationProviderAuthorization;
2125
+ };
2126
+ 'get-permissions': {
2127
+ request: void;
2128
+ response: any;
2129
+ };
2130
+ 'set-file-download-location': {
2131
+ request: OpenFin.ApplicationIdentity & { downloadLocation: string };
2132
+ response: void;
2133
+ };
2134
+ 'close-popup-menu': {
2135
+ request: OpenFin.Identity;
2136
+ response: void;
2137
+ };
2138
+ 'fdc3-add-context-listener': {
2139
+ request: void;
2140
+ response: void;
2141
+ };
2142
+ 'fdc3-broadcast': {
2143
+ request: void;
2144
+ response: void;
2145
+ };
2146
+ 'fdc3-get-system-channels': {
2147
+ request: void;
2148
+ response: void;
2149
+ };
2150
+ 'fdc3-join-channel': {
2151
+ request: void;
2152
+ response: void;
2153
+ };
2154
+ 'fdc3-leave-current-channel': {
2155
+ request: void;
2156
+ response: void;
2157
+ };
2158
+ 'interop-connect-sync': {
2159
+ request: void;
2160
+ response: void;
2161
+ };
2162
+ 'interop-client-set-context': {
2163
+ request: void;
2164
+ response: void;
2165
+ };
2166
+ 'interop-client-add-context-handler': {
2167
+ request: void;
2168
+ response: void;
2169
+ };
2170
+ 'interop-client-get-context-groups': {
2171
+ request: void;
2172
+ response: void;
2173
+ };
2174
+ 'interop-client-join-context-group': {
2175
+ request: void;
2176
+ response: void;
2177
+ };
2178
+ 'interop-client-remove-from-context-group': {
2179
+ request: void;
2180
+ response: void;
2181
+ };
2182
+ 'interop-client-get-all-clients-in-context-group': {
2183
+ request: void;
2184
+ response: void;
2185
+ };
2186
+ 'interop-client-get-info-for-context-group': {
2187
+ request: void;
2188
+ response: void;
2189
+ };
2190
+ 'interop-broker-add-client-to-context-group': {
2191
+ request: void;
2192
+ response: void;
2193
+ };
2194
+ 'interop-broker-get-all-clients-in-context-group': {
2195
+ request: void;
2196
+ response: void;
2197
+ };
2198
+ 'interop-broker-get-context-groups': {
2199
+ request: void;
2200
+ response: void;
2201
+ };
2202
+ 'interop-broker-get-info-for-context-group': {
2203
+ request: void;
2204
+ response: void;
2205
+ };
2206
+ 'interop-broker-is-action-authorized': {
2207
+ request: void;
2208
+ response: void;
2209
+ };
2210
+ 'interop-broker-is-connection-authorized': {
2211
+ request: void;
2212
+ response: void;
2213
+ };
2214
+ 'interop-broker-join-context-group': {
2215
+ request: void;
2216
+ response: void;
2217
+ };
2218
+ 'interop-broker-remove-client-from-context-group': {
2219
+ request: void;
2220
+ response: void;
2221
+ };
2222
+ 'interop-broker-remove-from-context-group': {
2223
+ request: void;
2224
+ response: void;
2225
+ };
2226
+ 'interop-broker-set-context': {
2227
+ request: void;
2228
+ response: void;
2229
+ };
2230
+ 'query-permission-for-current-context': {
2231
+ request: { apiName: string; identity: OpenFin.Identity };
2232
+ response: OpenFin.QueryPermissionResult;
2233
+ };
2234
+ };
2235
+
2236
+ type ProtocolMapBase = {
2237
+ [action: string]: {
2238
+ request: any;
2239
+ response: any;
2240
+ specialResponse?: any; // Used for anything not on payload.data (only request-external-authorization for now)
2241
+ };
2242
+ };
2243
+
2244
+ export type MessageHandler = (data: any) => boolean;
2245
+
2246
+ export type ViewState = OpenFin.ViewCreationOptions & {
2247
+ url: string;
2248
+ };
2249
+
2250
+ export type OsConfig = {
2251
+ manifestLocation: string;
2252
+ namedPipeName: string;
2253
+ urlPath: string;
2254
+ executablePath: string;
2255
+ };
2256
+
2257
+ export type Wire = EventEmitter & {
2258
+ connect(address: string): Promise<any>;
2259
+ connectSync(): any;
2260
+ send(data: any): Promise<any>;
2261
+ shutdown(): Promise<void>;
2262
+ };
2263
+ export type WireConstructor = {
2264
+ new (onmessage: (data: any) => void): Wire;
2265
+ };
2266
+
2267
+ export type RuntimeConfig = {
2268
+ version: string;
2269
+ fallbackVersion?: string;
2270
+ securityRealm?: string;
2271
+ verboseLogging?: boolean;
2272
+ arguments?: string;
2273
+ rvmDir?: string;
2274
+ };
2275
+
2276
+ export type ServiceConfig = {
2277
+ name: string;
2278
+ manifestUrl: string;
2279
+ };
2280
+
2281
+ export type BaseConfig = {
2282
+ uuid?: string;
2283
+ address?: string;
2284
+ name?: string;
2285
+ nonPersistent?: boolean;
2286
+ runtimeClient?: boolean;
2287
+ licenseKey?: string;
2288
+ client?: any;
2289
+ manifestUrl?: string;
2290
+ startupApp?: any;
2291
+ lrsUrl?: string;
2292
+ assetsUrl?: string;
2293
+ devToolsPort?: number;
2294
+ installerUI?: boolean;
2295
+ runtime?: RuntimeConfig;
2296
+ services?: ServiceConfig[];
2297
+ appAssets?: [
2298
+ {
2299
+ src: string;
2300
+ alias: string;
2301
+ target: string;
2302
+ version: string;
2303
+ args: string;
2304
+ }
2305
+ ];
2306
+ customItems?: [any];
2307
+ timeout?: number; // in seconds
2308
+ };
2309
+
2310
+ export type ConfigWithUuid = BaseConfig & {
2311
+ uuid: string;
2312
+ };
2313
+
2314
+ export type ExistingConnectConfig = ConfigWithUuid & {
2315
+ address: string;
2316
+ };
2317
+
2318
+ export type ConfigWithRuntime = BaseConfig & {
2319
+ runtime: RuntimeConfig;
2320
+ };
2321
+
2322
+ export type ExternalConfig = BaseConfig & {
2323
+ manifestUrl: string;
2324
+ };
2325
+
2326
+ export type NewConnectConfig = ConfigWithUuid & ConfigWithRuntime;
2327
+
2328
+ export type PortDiscoveryConfig = (ExternalConfig & ConfigWithRuntime) | NewConnectConfig;
2329
+
2330
+ export type ConnectConfig = ExistingConnectConfig | NewConnectConfig | ExternalConfig;
2331
+
2332
+ export type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
2333
+
2334
+ export type ReadyState = // https://github.com/websockets/ws/blob/master/doc/ws.md#ready-state-constants
2335
+ | 'CONNECTING' // The connection is not yet open.
2336
+ | 'OPEN' // The connection is open and ready to communicate.
2337
+ | 'CLOSING' // The connection is in the process of closing.
2338
+ | 'CLOSED'; // The connection is closed.
2339
+
2340
+ export type ChildContentOptions = {
2341
+ options: any;
2342
+ entityType: EntityType;
2343
+ };
2344
+
2345
+ export type ErrorPlainObject = {
2346
+ stack: string;
2347
+ message: string;
2348
+ toString(): string;
2349
+ };
1340
2350
  }