@openfin/core 25.68.30 → 26.69.32

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 (199) hide show
  1. package/OpenFin.d.ts +90 -821
  2. package/README.md +12 -2
  3. package/package.json +1 -1
  4. package/src/api/application/Factory.d.ts +145 -145
  5. package/src/api/application/Factory.js +229 -229
  6. package/src/api/application/Instance.d.ts +301 -302
  7. package/src/api/application/Instance.js +412 -412
  8. package/src/api/application/index.d.ts +3 -3
  9. package/src/api/application/index.js +15 -15
  10. package/src/api/base.d.ts +43 -43
  11. package/src/api/base.js +177 -177
  12. package/src/api/clipboard/index.d.ts +69 -69
  13. package/src/api/clipboard/index.js +88 -88
  14. package/src/api/events/application.d.ts +69 -0
  15. package/src/api/events/application.js +2 -0
  16. package/src/api/events/base.d.ts +17 -0
  17. package/src/api/events/base.js +2 -0
  18. package/src/api/events/channel.d.ts +10 -11
  19. package/src/api/events/channel.js +2 -2
  20. package/src/api/events/emitterMap.d.ts +11 -11
  21. package/src/api/events/emitterMap.js +35 -35
  22. package/src/api/events/eventAggregator.d.ts +5 -5
  23. package/src/api/events/eventAggregator.js +43 -43
  24. package/src/api/events/externalApplication.d.ts +5 -0
  25. package/src/api/events/externalApplication.js +2 -0
  26. package/src/api/events/frame.d.ts +9 -0
  27. package/src/api/events/frame.js +2 -0
  28. package/src/api/events/globalHotkey.d.ts +10 -0
  29. package/src/api/events/globalHotkey.js +2 -0
  30. package/src/api/events/platform.d.ts +18 -0
  31. package/src/api/events/platform.js +2 -0
  32. package/src/api/events/system.d.ts +22 -0
  33. package/src/api/events/system.js +2 -0
  34. package/src/api/events/view.d.ts +56 -0
  35. package/src/api/events/view.js +2 -0
  36. package/src/api/events/webcontents.d.ts +48 -0
  37. package/src/api/events/webcontents.js +2 -0
  38. package/src/api/events/window.d.ts +176 -0
  39. package/src/api/events/window.js +2 -0
  40. package/src/api/external-application/Factory.d.ts +26 -26
  41. package/src/api/external-application/Factory.js +40 -40
  42. package/src/api/external-application/Instance.d.ts +101 -102
  43. package/src/api/external-application/Instance.js +109 -109
  44. package/src/api/external-application/index.d.ts +3 -3
  45. package/src/api/external-application/index.js +15 -15
  46. package/src/api/fin.d.ts +49 -49
  47. package/src/api/fin.js +43 -43
  48. package/src/api/frame/Factory.d.ts +36 -36
  49. package/src/api/frame/Factory.js +69 -69
  50. package/src/api/frame/Instance.d.ts +121 -121
  51. package/src/api/frame/Instance.js +130 -130
  52. package/src/api/frame/index.d.ts +3 -3
  53. package/src/api/frame/index.js +15 -15
  54. package/src/api/global-hotkey/index.d.ts +38 -38
  55. package/src/api/global-hotkey/index.js +58 -58
  56. package/src/api/interappbus/channel/channel.d.ts +26 -26
  57. package/src/api/interappbus/channel/channel.js +77 -77
  58. package/src/api/interappbus/channel/channels-docs.d.ts +318 -318
  59. package/src/api/interappbus/channel/channels-docs.js +376 -376
  60. package/src/api/interappbus/channel/client.d.ts +22 -22
  61. package/src/api/interappbus/channel/client.js +84 -84
  62. package/src/api/interappbus/channel/connection-manager.d.ts +28 -28
  63. package/src/api/interappbus/channel/connection-manager.js +244 -244
  64. package/src/api/interappbus/channel/index.d.ts +22 -23
  65. package/src/api/interappbus/channel/index.js +121 -121
  66. package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +13 -13
  67. package/src/api/interappbus/channel/protocols/classic/message-receiver.js +73 -73
  68. package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +22 -22
  69. package/src/api/interappbus/channel/protocols/classic/strategy.js +84 -84
  70. package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +20 -20
  71. package/src/api/interappbus/channel/protocols/combined/strategy.js +58 -58
  72. package/src/api/interappbus/channel/protocols/index.d.ts +44 -44
  73. package/src/api/interappbus/channel/protocols/index.js +2 -2
  74. package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +10 -10
  75. package/src/api/interappbus/channel/protocols/protocol-manager.js +43 -43
  76. package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +23 -23
  77. package/src/api/interappbus/channel/protocols/rtc/endpoint.js +135 -135
  78. package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +30 -30
  79. package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +131 -131
  80. package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +22 -22
  81. package/src/api/interappbus/channel/protocols/rtc/strategy.js +87 -87
  82. package/src/api/interappbus/channel/protocols/strategy-types.d.ts +13 -13
  83. package/src/api/interappbus/channel/protocols/strategy-types.js +2 -2
  84. package/src/api/interappbus/channel/protocols/strategy.d.ts +15 -15
  85. package/src/api/interappbus/channel/protocols/strategy.js +2 -2
  86. package/src/api/interappbus/channel/provider.d.ts +31 -31
  87. package/src/api/interappbus/channel/provider.js +160 -160
  88. package/src/api/interappbus/index.d.ts +85 -86
  89. package/src/api/interappbus/index.js +175 -175
  90. package/src/api/interop/Factory.d.ts +37 -37
  91. package/src/api/interop/Factory.js +54 -54
  92. package/src/api/interop/InteropBroker.d.ts +363 -363
  93. package/src/api/interop/InteropBroker.js +914 -914
  94. package/src/api/interop/InteropClient.d.ts +268 -268
  95. package/src/api/interop/InteropClient.js +450 -450
  96. package/src/api/interop/SessionContextGroupBroker.d.ts +26 -26
  97. package/src/api/interop/SessionContextGroupBroker.js +107 -107
  98. package/src/api/interop/SessionContextGroupClient.d.ts +20 -20
  99. package/src/api/interop/SessionContextGroupClient.js +85 -85
  100. package/src/api/interop/fdc3/fdc3-1.2.d.ts +187 -187
  101. package/src/api/interop/fdc3/fdc3-1.2.js +385 -385
  102. package/src/api/interop/fdc3/fdc3.js +17 -17
  103. package/src/api/interop/fdc3/utils.d.ts +6 -6
  104. package/src/api/interop/fdc3/utils.js +17 -17
  105. package/src/api/interop/index.d.ts +4 -4
  106. package/src/api/interop/index.js +16 -16
  107. package/src/api/interop/utils.d.ts +11 -11
  108. package/src/api/interop/utils.js +36 -36
  109. package/src/api/me.d.ts +38 -35
  110. package/src/api/me.js +128 -60
  111. package/src/api/platform/Factory.d.ts +109 -109
  112. package/src/api/platform/Factory.js +188 -188
  113. package/src/api/platform/Instance.d.ts +125 -122
  114. package/src/api/platform/Instance.js +305 -298
  115. package/src/api/platform/common-utils.d.ts +6 -6
  116. package/src/api/platform/common-utils.js +16 -16
  117. package/src/api/platform/index.d.ts +3 -3
  118. package/src/api/platform/index.js +15 -15
  119. package/src/api/platform/layout/Factory.d.ts +108 -108
  120. package/src/api/platform/layout/Factory.js +189 -189
  121. package/src/api/platform/layout/Instance.d.ts +49 -49
  122. package/src/api/platform/layout/Instance.js +99 -99
  123. package/src/api/platform/layout/index.d.ts +2 -2
  124. package/src/api/platform/layout/index.js +14 -14
  125. package/src/api/platform/layout/shapes.d.ts +11 -0
  126. package/src/api/{window → platform/layout}/shapes.js +2 -2
  127. package/src/api/snapshot-source/Factory.d.ts +36 -36
  128. package/src/api/snapshot-source/Factory.js +65 -65
  129. package/src/api/snapshot-source/Instance.d.ts +30 -30
  130. package/src/api/snapshot-source/Instance.js +134 -134
  131. package/src/api/snapshot-source/index.d.ts +3 -3
  132. package/src/api/snapshot-source/index.js +15 -15
  133. package/src/api/snapshot-source/utils.d.ts +1 -1
  134. package/src/api/snapshot-source/utils.js +5 -5
  135. package/src/api/system/index.d.ts +960 -961
  136. package/src/api/system/index.js +1241 -1241
  137. package/src/api/view/Factory.d.ts +49 -49
  138. package/src/api/view/Factory.js +103 -103
  139. package/src/api/view/Instance.d.ts +388 -380
  140. package/src/api/view/Instance.js +426 -415
  141. package/src/api/view/index.d.ts +3 -3
  142. package/src/api/view/index.js +15 -15
  143. package/src/api/webcontents/main.d.ts +36 -36
  144. package/src/api/webcontents/main.js +82 -82
  145. package/src/api/window/Factory.d.ts +44 -44
  146. package/src/api/window/Factory.js +91 -91
  147. package/src/api/window/Instance.d.ts +1009 -966
  148. package/src/api/window/Instance.js +1313 -1202
  149. package/src/api/window/index.d.ts +3 -5
  150. package/src/api/window/index.js +15 -17
  151. package/src/environment/environment.d.ts +28 -25
  152. package/src/environment/environment.js +4 -4
  153. package/src/environment/node-env.d.ts +25 -26
  154. package/src/environment/node-env.js +64 -64
  155. package/src/environment/openfin-env.d.ts +29 -30
  156. package/src/environment/openfin-env.js +107 -107
  157. package/src/mock.d.ts +3 -3
  158. package/src/mock.js +91 -90
  159. package/src/shapes/ERROR_BOX_TYPES.d.ts +1 -0
  160. package/src/shapes/ERROR_BOX_TYPES.js +2 -0
  161. package/src/shapes/WebOptions.d.ts +12 -0
  162. package/src/shapes/WebOptions.js +2 -0
  163. package/src/shapes/WindowOptions.d.ts +42 -0
  164. package/src/shapes/WindowOptions.js +2 -0
  165. package/src/shapes/protocol.d.ts +199 -0
  166. package/src/shapes/protocol.js +2 -0
  167. package/src/transport/fin_store.d.ts +4 -4
  168. package/src/transport/fin_store.js +16 -16
  169. package/src/transport/transport-errors.d.ts +18 -18
  170. package/src/transport/transport-errors.js +37 -37
  171. package/src/transport/transport.d.ts +56 -43
  172. package/src/transport/transport.js +181 -181
  173. package/src/transport/wire.d.ts +71 -11
  174. package/src/transport/wire.js +32 -32
  175. package/src/util/asyncFilter.d.ts +1 -1
  176. package/src/util/asyncFilter.js +7 -7
  177. package/src/util/errors.d.ts +9 -5
  178. package/src/util/errors.js +11 -11
  179. package/src/util/exhaustive.d.ts +1 -1
  180. package/src/util/exhaustive.js +7 -7
  181. package/src/util/http.d.ts +11 -11
  182. package/src/util/http.js +83 -83
  183. package/src/util/normalize-config.d.ts +3 -5
  184. package/src/util/normalize-config.js +47 -47
  185. package/src/util/promises.d.ts +5 -5
  186. package/src/util/promises.js +27 -27
  187. package/src/util/ref-counter.d.ts +7 -7
  188. package/src/util/ref-counter.js +51 -51
  189. package/src/util/runtimeVersioning.d.ts +3 -3
  190. package/src/util/runtimeVersioning.js +25 -25
  191. package/src/util/utilTypes.d.ts +8 -8
  192. package/src/util/utilTypes.js +2 -2
  193. package/src/util/validate.d.ts +3 -3
  194. package/src/util/validate.js +11 -11
  195. package/docs.README(OLD).md +0 -82
  196. package/resources/win/OpenFinRVM.exe +0 -0
  197. package/src/api/window/bounds-changed.d.ts +0 -10
  198. package/src/api/window/bounds-changed.js +0 -6
  199. package/src/api/window/shapes.d.ts +0 -13
package/OpenFin.d.ts CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  declare namespace OpenFin {
4
4
  // "wrappable entities"
5
- import EventEmitter = NodeJS.EventEmitter;
6
5
  export type Application = import('./src/api/application/index').Application;
7
6
  export type ExternalApplication = import('./src/api/external-application/index').ExternalApplication;
8
7
  export type Frame = import('./src/api/frame/index')._Frame;
@@ -12,7 +11,7 @@ declare namespace OpenFin {
12
11
  export type Layout = import('./src/api/platform/layout/index').Layout;
13
12
  export type View = import('./src/api/view/index').View;
14
13
  export type Window = import('./src/api/window/index')._Window;
15
- export type WebContent = View | Window;
14
+ export type WebContent = View | OpenFin.Window;
16
15
  export type InteropClient = import('./src/api/interop/index').InteropClient;
17
16
  export type InteropBroker = import('./src/api/interop/index').InteropBroker;
18
17
  export type SnapshotSource = import('./src/api/snapshot-source/index').SnapshotSource;
@@ -69,12 +68,12 @@ declare namespace OpenFin {
69
68
  height: number;
70
69
  };
71
70
 
72
- export type ApplicationCreationOptions = Partial<ApplicationOption> & {
71
+ export type ApplicationCreationOptions = Partial<ApplicationOptions> & {
73
72
  name: string;
74
73
  uuid: string;
75
74
  };
76
75
 
77
- export type ApplicationOption = LegacyWinOptionsInAppOptions & {
76
+ export type ApplicationOptions = LegacyWinOptionsInAppOptions & {
78
77
  disableIabSecureLogging: boolean;
79
78
  loadErrorMessage: string;
80
79
  mainWindowOptions: WindowCreationOptions;
@@ -96,6 +95,7 @@ declare namespace OpenFin {
96
95
  apiDiagnostics: boolean;
97
96
  defaultDomainSettings: DefaultDomainSettings;
98
97
  enableJumpList: boolean;
98
+ enableBeforeUnload: boolean;
99
99
  };
100
100
 
101
101
  type InteropBrokerOptions = {
@@ -500,6 +500,7 @@ declare namespace OpenFin {
500
500
  zoomLevel: number;
501
501
  experimental: any;
502
502
  fdc3InteropApi?: string;
503
+ enableBeforeUnload: boolean;
503
504
  };
504
505
 
505
506
  export type Certificate = {
@@ -729,7 +730,7 @@ declare namespace OpenFin {
729
730
  type: 'component';
730
731
  componentName: 'view';
731
732
  componentState: {
732
- identity: Identity;
733
+ name: string;
733
734
  url: string;
734
735
  title?: string;
735
736
  };
@@ -870,8 +871,10 @@ declare namespace OpenFin {
870
871
  * @return { Promise<HostContextChangedPayload> } The event that it raised.
871
872
  */
872
873
  onWindowContextUpdated(
873
- payload: WindowOptionsChangedEvent<'window', 'options-changed'>
874
+ payload: import('./src/api/events/window').WindowOptionsChangedEvent<'window', 'options-changed'>
874
875
  ): Promise<OpenFin.HostContextChangedPayload | undefined>;
876
+
877
+ closeWindow(payload: CloseWindowPayload, callerIdentity: Identity): Promise<void>;
875
878
  };
876
879
 
877
880
  export type InitPlatformOptions = {
@@ -1341,10 +1344,6 @@ declare namespace OpenFin {
1341
1344
  // match pattern is a string type
1342
1345
  match: string[];
1343
1346
  };
1344
- export type ContextSubscription = {
1345
- handler: ContextHandler;
1346
- contextType?: string;
1347
- };
1348
1347
 
1349
1348
  export type ContextHandler = (context: OpenFin.Context) => void;
1350
1349
 
@@ -1359,9 +1358,10 @@ declare namespace OpenFin {
1359
1358
  };
1360
1359
 
1361
1360
  export type IntentHandler = (intent: OpenFin.Intent) => void;
1362
- type MatchPattern = string;
1363
1361
 
1364
1362
  export type ContentCreationBehaviorNames = 'window' | 'view' | 'block' | 'browser';
1363
+
1364
+ type MatchPattern = string;
1365
1365
  export type ContentCreationRule<T = ContentCreationBehaviorNames> = {
1366
1366
  behavior: T;
1367
1367
  match: MatchPattern[];
@@ -1423,6 +1423,31 @@ declare namespace OpenFin {
1423
1423
  type: string;
1424
1424
  };
1425
1425
 
1426
+ export interface ViewsPreventingUnloadPayload {
1427
+ windowShouldClose: boolean;
1428
+ windowId: OpenFin.Identity;
1429
+ viewsPreventingUnload: OpenFin.Identity[];
1430
+ viewsNotPreventingUnload: OpenFin.Identity[];
1431
+ closeType: 'view' | 'window';
1432
+ }
1433
+
1434
+ export interface BeforeUnloadUserDecision {
1435
+ windowShouldClose: boolean;
1436
+ viewsToClose: OpenFin.Identity[];
1437
+ }
1438
+
1439
+ export interface ViewStatuses {
1440
+ viewsPreventingUnload: OpenFin.Identity[];
1441
+ viewsNotPreventingUnload: OpenFin.Identity[];
1442
+ }
1443
+
1444
+ export interface CloseWindowPayload {
1445
+ windowId: Identity;
1446
+ options: {
1447
+ skipBeforeUnload?: boolean;
1448
+ };
1449
+ }
1450
+
1426
1451
  export type ProxyInfo = {
1427
1452
  config: ProxyConfig;
1428
1453
  system: ProxySystemInfo;
@@ -1441,492 +1466,6 @@ declare namespace OpenFin {
1441
1466
  proxy: string;
1442
1467
  };
1443
1468
 
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
1469
  export type ChannelAction = (payload: unknown, id: ProviderIdentity | OpenFin.ClientIdentity) => unknown;
1931
1470
 
1932
1471
  export type ChannelMiddleware = (
@@ -1941,7 +1480,7 @@ declare namespace OpenFin {
1941
1480
  id: ProviderIdentity | OpenFin.ClientIdentity
1942
1481
  ) => unknown;
1943
1482
 
1944
- export type SystemApplicationInfo = {
1483
+ export type ApplicationState = {
1945
1484
  isPlatform: boolean;
1946
1485
  isRunning: boolean;
1947
1486
  uuid: string;
@@ -1968,25 +1507,13 @@ declare namespace OpenFin {
1968
1507
  date: string;
1969
1508
  };
1970
1509
 
1510
+ export type SendApplicationLogResponse = {
1511
+ logId: string;
1512
+ };
1513
+
1971
1514
  // 2.4 supports string enum types, currently we use 2.2
1972
1515
  export type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
1973
1516
 
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
1517
  export type PermissionState = 'granted' | 'denied' | 'unavailable';
1991
1518
 
1992
1519
  export type RegistryInfo = {
@@ -1997,12 +1524,20 @@ declare namespace OpenFin {
1997
1524
  value: string;
1998
1525
  };
1999
1526
 
2000
- export type Entity = {
2001
- type: string;
1527
+ export type ApplicationType = {
1528
+ type: 'application' | 'external-app';
2002
1529
  uuid: string;
2003
1530
  };
2004
1531
 
2005
1532
  export type WindowInfo = {
1533
+ canNavigateBack: boolean;
1534
+ canNavigateForward: boolean;
1535
+ preloadScripts: Array<any>;
1536
+ title: string;
1537
+ url: string;
1538
+ };
1539
+
1540
+ export type ApplicationWindowInfo = {
2006
1541
  childWindows: Array<WindowDetail>;
2007
1542
  mainWindow: WindowDetail;
2008
1543
  uuid: string;
@@ -2020,25 +1555,6 @@ declare namespace OpenFin {
2020
1555
  width: number;
2021
1556
  };
2022
1557
 
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
1558
  export type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
2043
1559
 
2044
1560
  export type InitLayoutOptions = {
@@ -2049,302 +1565,55 @@ declare namespace OpenFin {
2049
1565
  presetType: LayoutPresetType;
2050
1566
  };
2051
1567
 
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
- };
1568
+ export type ResultBehavior = 'close' | 'hide' | 'none';
1569
+ export type PopupBaseBehavior = 'close' | 'hide';
2243
1570
 
2244
- export type MessageHandler = (data: any) => boolean;
1571
+ export type PopupResultBehavior = 'none' | PopupBaseBehavior;
2245
1572
 
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
- };
1573
+ export type PopupBlurBehavior = 'modal' | PopupBaseBehavior;
2256
1574
 
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;
1575
+ export interface PopupOptions {
1576
+ initialOptions?: OpenFin.WindowCreationOptions;
1577
+ additionalOptions?: OpenFin.UpdatableWindowOptions;
2284
1578
  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
- };
1579
+ url?: string;
1580
+ height?: number;
1581
+ width?: number;
1582
+ x?: number;
1583
+ y?: number;
1584
+ blurBehavior?: PopupBlurBehavior;
1585
+ resultDispatchBehavior?: PopupResultBehavior;
1586
+ hideOnClose?: boolean;
1587
+ focus?: boolean;
1588
+ onPopupReady?: (popupWindow: OpenFin.Window) => any;
1589
+ onPopupResult?: (payload: PopupResult) => any;
1590
+ }
1591
+
1592
+ export type PopupInteraction = 'clicked' | 'dismissed';
1593
+
1594
+ export interface PopupResult<T = any> {
1595
+ identity: {
1596
+ name: string;
1597
+ uuid: string;
1598
+ };
1599
+ result: PopupInteraction;
1600
+ data?: T;
1601
+ lastDispatchResult?: PopupResult;
1602
+ }
2321
1603
 
2322
- export type ExternalConfig = BaseConfig & {
2323
- manifestUrl: string;
2324
- };
1604
+ export type SystemEvents = import('./src/api/events/system').SystemEvents;
2325
1605
 
2326
- export type NewConnectConfig = ConfigWithUuid & ConfigWithRuntime;
1606
+ export type ApplicationEvents = import('./src/api/events/application').ApplicationEvents;
2327
1607
 
2328
- export type PortDiscoveryConfig = (ExternalConfig & ConfigWithRuntime) | NewConnectConfig;
1608
+ export type WindowEvents = import('./src/api/events/window').WindowEvents;
2329
1609
 
2330
- export type ConnectConfig = ExistingConnectConfig | NewConnectConfig | ExternalConfig;
1610
+ export type ViewEvents = import('./src/api/events/view').ViewEvents;
2331
1611
 
2332
- export type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
1612
+ export type GlobalHotkeyEvents = import('./src/api/events/globalHotkey').GlobalHotkeyEvents;
2333
1613
 
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.
1614
+ export type FrameEvents = import('./src/api/events/frame').FrameEvents;
2339
1615
 
2340
- export type ChildContentOptions = {
2341
- options: any;
2342
- entityType: EntityType;
2343
- };
1616
+ export type PlatformEvents = import('./src/api/events/platform').PlatformEvents;
2344
1617
 
2345
- export type ErrorPlainObject = {
2346
- stack: string;
2347
- message: string;
2348
- toString(): string;
2349
- };
1618
+ export type ExternalApplicationEvents = import('./src/api/events/externalApplication').ExternalApplicationEvents;
2350
1619
  }