@openfin/core 25.68.31 → 26.69.31
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.
- package/OpenFin.d.ts +81 -820
- package/README.md +12 -2
- package/package.json +1 -1
- package/src/api/application/Factory.d.ts +145 -145
- package/src/api/application/Factory.js +229 -229
- package/src/api/application/Instance.d.ts +301 -301
- package/src/api/application/Instance.js +412 -412
- package/src/api/application/index.d.ts +3 -3
- package/src/api/application/index.js +15 -15
- package/src/api/base.d.ts +43 -43
- package/src/api/base.js +177 -177
- package/src/api/clipboard/index.d.ts +69 -69
- package/src/api/clipboard/index.js +88 -88
- package/src/api/events/application.d.ts +69 -0
- package/src/api/events/application.js +2 -0
- package/src/api/events/base.d.ts +17 -0
- package/src/api/events/base.js +2 -0
- package/src/api/events/channel.d.ts +10 -11
- package/src/api/events/channel.js +2 -2
- package/src/api/events/emitterMap.d.ts +11 -11
- package/src/api/events/emitterMap.js +35 -35
- package/src/api/events/eventAggregator.d.ts +5 -5
- package/src/api/events/eventAggregator.js +43 -43
- package/src/api/events/externalApplication.d.ts +5 -0
- package/src/api/events/externalApplication.js +2 -0
- package/src/api/events/frame.d.ts +9 -0
- package/src/api/events/frame.js +2 -0
- package/src/api/events/globalHotkey.d.ts +10 -0
- package/src/api/events/globalHotkey.js +2 -0
- package/src/api/events/platform.d.ts +18 -0
- package/src/api/events/platform.js +2 -0
- package/src/api/events/system.d.ts +22 -0
- package/src/api/events/system.js +2 -0
- package/src/api/events/view.d.ts +56 -0
- package/src/api/events/view.js +2 -0
- package/src/api/events/webcontents.d.ts +48 -0
- package/src/api/events/webcontents.js +2 -0
- package/src/api/events/window.d.ts +176 -0
- package/src/api/events/window.js +2 -0
- package/src/api/external-application/Factory.d.ts +26 -26
- package/src/api/external-application/Factory.js +40 -40
- package/src/api/external-application/Instance.d.ts +101 -102
- package/src/api/external-application/Instance.js +109 -109
- package/src/api/external-application/index.d.ts +3 -3
- package/src/api/external-application/index.js +15 -15
- package/src/api/fin.d.ts +49 -49
- package/src/api/fin.js +43 -43
- package/src/api/frame/Factory.d.ts +36 -36
- package/src/api/frame/Factory.js +69 -69
- package/src/api/frame/Instance.d.ts +121 -121
- package/src/api/frame/Instance.js +130 -130
- package/src/api/frame/index.d.ts +3 -3
- package/src/api/frame/index.js +15 -15
- package/src/api/global-hotkey/index.d.ts +38 -38
- package/src/api/global-hotkey/index.js +58 -58
- package/src/api/interappbus/channel/channel.d.ts +26 -26
- package/src/api/interappbus/channel/channel.js +77 -77
- package/src/api/interappbus/channel/channels-docs.d.ts +318 -318
- package/src/api/interappbus/channel/channels-docs.js +376 -376
- package/src/api/interappbus/channel/client.d.ts +22 -22
- package/src/api/interappbus/channel/client.js +84 -84
- package/src/api/interappbus/channel/connection-manager.d.ts +28 -28
- package/src/api/interappbus/channel/connection-manager.js +244 -244
- package/src/api/interappbus/channel/index.d.ts +22 -23
- package/src/api/interappbus/channel/index.js +121 -121
- package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +13 -13
- package/src/api/interappbus/channel/protocols/classic/message-receiver.js +73 -73
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +22 -22
- package/src/api/interappbus/channel/protocols/classic/strategy.js +84 -84
- package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +20 -20
- package/src/api/interappbus/channel/protocols/combined/strategy.js +58 -58
- package/src/api/interappbus/channel/protocols/index.d.ts +44 -44
- package/src/api/interappbus/channel/protocols/index.js +2 -2
- package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +10 -10
- package/src/api/interappbus/channel/protocols/protocol-manager.js +43 -43
- package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +23 -23
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +135 -135
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +30 -30
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +131 -131
- package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +22 -22
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +87 -87
- package/src/api/interappbus/channel/protocols/strategy-types.d.ts +13 -13
- package/src/api/interappbus/channel/protocols/strategy-types.js +2 -2
- package/src/api/interappbus/channel/protocols/strategy.d.ts +15 -15
- package/src/api/interappbus/channel/protocols/strategy.js +2 -2
- package/src/api/interappbus/channel/provider.d.ts +31 -31
- package/src/api/interappbus/channel/provider.js +160 -160
- package/src/api/interappbus/index.d.ts +85 -86
- package/src/api/interappbus/index.js +175 -175
- package/src/api/interop/Factory.d.ts +37 -37
- package/src/api/interop/Factory.js +54 -54
- package/src/api/interop/InteropBroker.d.ts +363 -363
- package/src/api/interop/InteropBroker.js +914 -914
- package/src/api/interop/InteropClient.d.ts +268 -268
- package/src/api/interop/InteropClient.js +450 -450
- package/src/api/interop/SessionContextGroupBroker.d.ts +26 -26
- package/src/api/interop/SessionContextGroupBroker.js +107 -107
- package/src/api/interop/SessionContextGroupClient.d.ts +20 -20
- package/src/api/interop/SessionContextGroupClient.js +85 -85
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +187 -187
- package/src/api/interop/fdc3/fdc3-1.2.js +385 -385
- package/src/api/interop/fdc3/fdc3.js +17 -17
- package/src/api/interop/fdc3/utils.d.ts +6 -6
- package/src/api/interop/fdc3/utils.js +17 -17
- package/src/api/interop/index.d.ts +4 -4
- package/src/api/interop/index.js +16 -16
- package/src/api/interop/utils.d.ts +11 -11
- package/src/api/interop/utils.js +36 -36
- package/src/api/me.d.ts +38 -35
- package/src/api/me.js +128 -60
- package/src/api/platform/Factory.d.ts +109 -109
- package/src/api/platform/Factory.js +188 -188
- package/src/api/platform/Instance.d.ts +125 -122
- package/src/api/platform/Instance.js +305 -298
- package/src/api/platform/common-utils.d.ts +6 -6
- package/src/api/platform/common-utils.js +16 -16
- package/src/api/platform/index.d.ts +3 -3
- package/src/api/platform/index.js +15 -15
- package/src/api/platform/layout/Factory.d.ts +108 -108
- package/src/api/platform/layout/Factory.js +189 -189
- package/src/api/platform/layout/Instance.d.ts +49 -49
- package/src/api/platform/layout/Instance.js +99 -99
- package/src/api/platform/layout/index.d.ts +2 -2
- package/src/api/platform/layout/index.js +14 -14
- package/src/api/platform/layout/shapes.d.ts +11 -0
- package/src/api/platform/layout/shapes.js +2 -0
- package/src/api/snapshot-source/Factory.d.ts +36 -36
- package/src/api/snapshot-source/Factory.js +65 -65
- package/src/api/snapshot-source/Instance.d.ts +30 -30
- package/src/api/snapshot-source/Instance.js +134 -134
- package/src/api/snapshot-source/index.d.ts +3 -3
- package/src/api/snapshot-source/index.js +15 -15
- package/src/api/snapshot-source/utils.d.ts +1 -1
- package/src/api/snapshot-source/utils.js +5 -5
- package/src/api/system/index.d.ts +960 -961
- package/src/api/system/index.js +1241 -1241
- package/src/api/view/Factory.d.ts +49 -49
- package/src/api/view/Factory.js +103 -103
- package/src/api/view/Instance.d.ts +388 -380
- package/src/api/view/Instance.js +426 -415
- package/src/api/view/index.d.ts +3 -3
- package/src/api/view/index.js +15 -15
- package/src/api/webcontents/main.d.ts +36 -36
- package/src/api/webcontents/main.js +82 -82
- package/src/api/window/Factory.d.ts +44 -44
- package/src/api/window/Factory.js +91 -91
- package/src/api/window/Instance.d.ts +1009 -965
- package/src/api/window/Instance.js +1313 -1202
- package/src/api/window/index.d.ts +3 -3
- package/src/api/window/index.js +15 -15
- package/src/environment/environment.d.ts +28 -25
- package/src/environment/environment.js +4 -4
- package/src/environment/node-env.d.ts +25 -26
- package/src/environment/node-env.js +64 -64
- package/src/environment/openfin-env.d.ts +29 -30
- package/src/environment/openfin-env.js +107 -107
- package/src/mock.d.ts +3 -3
- package/src/mock.js +91 -90
- package/src/shapes/ERROR_BOX_TYPES.d.ts +1 -0
- package/src/shapes/ERROR_BOX_TYPES.js +2 -0
- package/src/shapes/WebOptions.d.ts +12 -0
- package/src/shapes/WebOptions.js +2 -0
- package/src/shapes/WindowOptions.d.ts +42 -0
- package/src/shapes/WindowOptions.js +2 -0
- package/src/shapes/protocol.d.ts +199 -0
- package/src/shapes/protocol.js +2 -0
- package/src/transport/fin_store.d.ts +4 -4
- package/src/transport/fin_store.js +16 -16
- package/src/transport/transport-errors.d.ts +18 -18
- package/src/transport/transport-errors.js +37 -37
- package/src/transport/transport.d.ts +56 -43
- package/src/transport/transport.js +181 -181
- package/src/transport/wire.d.ts +71 -11
- package/src/transport/wire.js +32 -32
- package/src/util/asyncFilter.d.ts +1 -1
- package/src/util/asyncFilter.js +7 -7
- package/src/util/errors.d.ts +9 -5
- package/src/util/errors.js +11 -11
- package/src/util/exhaustive.d.ts +1 -1
- package/src/util/exhaustive.js +7 -7
- package/src/util/http.d.ts +11 -11
- package/src/util/http.js +83 -83
- package/src/util/normalize-config.d.ts +3 -5
- package/src/util/normalize-config.js +47 -47
- package/src/util/promises.d.ts +5 -5
- package/src/util/promises.js +27 -27
- package/src/util/ref-counter.d.ts +7 -7
- package/src/util/ref-counter.js +51 -51
- package/src/util/runtimeVersioning.d.ts +3 -3
- package/src/util/runtimeVersioning.js +25 -25
- package/src/util/utilTypes.d.ts +8 -8
- package/src/util/utilTypes.js +2 -2
- package/src/util/validate.d.ts +3 -3
- package/src/util/validate.js +11 -11
- package/docs.README(OLD).md +0 -82
- package/resources/win/OpenFinRVM.exe +0 -0
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;
|
|
@@ -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
|
-
|
|
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
|
|
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,8 +1524,8 @@ declare namespace OpenFin {
|
|
|
1997
1524
|
value: string;
|
|
1998
1525
|
};
|
|
1999
1526
|
|
|
2000
|
-
export type
|
|
2001
|
-
type:
|
|
1527
|
+
export type ApplicationType = {
|
|
1528
|
+
type: 'application' | 'external-app';
|
|
2002
1529
|
uuid: string;
|
|
2003
1530
|
};
|
|
2004
1531
|
|
|
@@ -2010,7 +1537,7 @@ declare namespace OpenFin {
|
|
|
2010
1537
|
url: string;
|
|
2011
1538
|
};
|
|
2012
1539
|
|
|
2013
|
-
export type
|
|
1540
|
+
export type ApplicationWindowInfo = {
|
|
2014
1541
|
childWindows: Array<WindowDetail>;
|
|
2015
1542
|
mainWindow: WindowDetail;
|
|
2016
1543
|
uuid: string;
|
|
@@ -2028,25 +1555,6 @@ declare namespace OpenFin {
|
|
|
2028
1555
|
width: number;
|
|
2029
1556
|
};
|
|
2030
1557
|
|
|
2031
|
-
export type WebOptions = {
|
|
2032
|
-
preloadScripts?: OpenFin.PreloadScript[];
|
|
2033
|
-
uuid: string;
|
|
2034
|
-
name: string;
|
|
2035
|
-
contentCreation?: OpenFin.ContentCreationOptions;
|
|
2036
|
-
contentRedirect?: Partial<OpenFin.ContentRedirect>;
|
|
2037
|
-
customContext?: any;
|
|
2038
|
-
experimental?: any;
|
|
2039
|
-
processAffinity?: string;
|
|
2040
|
-
backgroundThrottling?: boolean;
|
|
2041
|
-
interop?: OpenFin.InteropConfig;
|
|
2042
|
-
};
|
|
2043
|
-
|
|
2044
|
-
// Error types
|
|
2045
|
-
export type ERROR_BOX_TYPES =
|
|
2046
|
-
| 'OF_error_box:app_initialization'
|
|
2047
|
-
| 'OF_error_box:main_process'
|
|
2048
|
-
| 'OF_error_box:renderer_crash';
|
|
2049
|
-
|
|
2050
1558
|
export type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
|
|
2051
1559
|
|
|
2052
1560
|
export type InitLayoutOptions = {
|
|
@@ -2057,302 +1565,55 @@ declare namespace OpenFin {
|
|
|
2057
1565
|
presetType: LayoutPresetType;
|
|
2058
1566
|
};
|
|
2059
1567
|
|
|
2060
|
-
export type
|
|
2061
|
-
|
|
2062
|
-
'view-identity': [string, string, string]; // [componentState, uuid, name]
|
|
2063
|
-
};
|
|
2064
|
-
|
|
2065
|
-
export type Message<T> = {
|
|
2066
|
-
action: string;
|
|
2067
|
-
payload: T;
|
|
2068
|
-
correlationId?: number;
|
|
2069
|
-
};
|
|
1568
|
+
export type ResultBehavior = 'close' | 'hide' | 'none';
|
|
1569
|
+
export type PopupBaseBehavior = 'close' | 'hide';
|
|
2070
1570
|
|
|
2071
|
-
export type
|
|
2072
|
-
action: 'process-desktop-event';
|
|
2073
|
-
payload: RuntimeEvent;
|
|
2074
|
-
};
|
|
1571
|
+
export type PopupResultBehavior = 'none' | PopupBaseBehavior;
|
|
2075
1572
|
|
|
2076
|
-
export type
|
|
2077
|
-
success: boolean;
|
|
2078
|
-
data: any;
|
|
2079
|
-
};
|
|
1573
|
+
export type PopupBlurBehavior = 'modal' | PopupBaseBehavior;
|
|
2080
1574
|
|
|
2081
|
-
export
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
};
|
|
2085
|
-
|
|
2086
|
-
/*
|
|
2087
|
-
To Add an api call:
|
|
2088
|
-
1. The action (string passed to wire.sendAction and key in the actionMap on the core side) should be the key in the protocolmap
|
|
2089
|
-
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
|
|
2090
|
-
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
|
|
2091
|
-
*/
|
|
2092
|
-
export type ProtocolMap = ProtocolMapBase & {
|
|
2093
|
-
'request-external-authorization': {
|
|
2094
|
-
request: any;
|
|
2095
|
-
response: void;
|
|
2096
|
-
specialResponse: AuthorizationPayload;
|
|
2097
|
-
};
|
|
2098
|
-
'application-get-views': {
|
|
2099
|
-
request: OpenFin.ApplicationIdentity;
|
|
2100
|
-
response: OpenFin.Identity[];
|
|
2101
|
-
};
|
|
2102
|
-
'set-jump-list': {
|
|
2103
|
-
request: { config: OpenFin.JumpListCategory[] | null } & OpenFin.ApplicationIdentity;
|
|
2104
|
-
response: void;
|
|
2105
|
-
};
|
|
2106
|
-
'get-view-window': {
|
|
2107
|
-
request: OpenFin.Identity;
|
|
2108
|
-
response: OpenFin.Identity;
|
|
2109
|
-
};
|
|
2110
|
-
'window-get-views': {
|
|
2111
|
-
request: OpenFin.Identity;
|
|
2112
|
-
response: OpenFin.Identity[];
|
|
2113
|
-
};
|
|
2114
|
-
'hide-view': {
|
|
2115
|
-
request: OpenFin.Identity;
|
|
2116
|
-
response: void;
|
|
2117
|
-
};
|
|
2118
|
-
'launch-manifest': {
|
|
2119
|
-
request: { manifestUrl: string; opts?: OpenFin.RvmLaunchOptions };
|
|
2120
|
-
response: { manifest: OpenFin.Manifest };
|
|
2121
|
-
};
|
|
2122
|
-
'get-system-app-configuration': {
|
|
2123
|
-
request: { name: string };
|
|
2124
|
-
response: any;
|
|
2125
|
-
};
|
|
2126
|
-
'show-popup-menu': {
|
|
2127
|
-
request: OpenFin.Identity & { options: OpenFin.ShowPopupMenuOptions };
|
|
2128
|
-
response: OpenFin.MenuResult;
|
|
2129
|
-
};
|
|
2130
|
-
'enable-native-window-integration-provider': {
|
|
2131
|
-
request: { permissions: any };
|
|
2132
|
-
response: OpenFin.NativeWindowIntegrationProviderAuthorization;
|
|
2133
|
-
};
|
|
2134
|
-
'get-permissions': {
|
|
2135
|
-
request: void;
|
|
2136
|
-
response: any;
|
|
2137
|
-
};
|
|
2138
|
-
'set-file-download-location': {
|
|
2139
|
-
request: OpenFin.ApplicationIdentity & { downloadLocation: string };
|
|
2140
|
-
response: void;
|
|
2141
|
-
};
|
|
2142
|
-
'close-popup-menu': {
|
|
2143
|
-
request: OpenFin.Identity;
|
|
2144
|
-
response: void;
|
|
2145
|
-
};
|
|
2146
|
-
'fdc3-add-context-listener': {
|
|
2147
|
-
request: void;
|
|
2148
|
-
response: void;
|
|
2149
|
-
};
|
|
2150
|
-
'fdc3-broadcast': {
|
|
2151
|
-
request: void;
|
|
2152
|
-
response: void;
|
|
2153
|
-
};
|
|
2154
|
-
'fdc3-get-system-channels': {
|
|
2155
|
-
request: void;
|
|
2156
|
-
response: void;
|
|
2157
|
-
};
|
|
2158
|
-
'fdc3-join-channel': {
|
|
2159
|
-
request: void;
|
|
2160
|
-
response: void;
|
|
2161
|
-
};
|
|
2162
|
-
'fdc3-leave-current-channel': {
|
|
2163
|
-
request: void;
|
|
2164
|
-
response: void;
|
|
2165
|
-
};
|
|
2166
|
-
'interop-connect-sync': {
|
|
2167
|
-
request: void;
|
|
2168
|
-
response: void;
|
|
2169
|
-
};
|
|
2170
|
-
'interop-client-set-context': {
|
|
2171
|
-
request: void;
|
|
2172
|
-
response: void;
|
|
2173
|
-
};
|
|
2174
|
-
'interop-client-add-context-handler': {
|
|
2175
|
-
request: void;
|
|
2176
|
-
response: void;
|
|
2177
|
-
};
|
|
2178
|
-
'interop-client-get-context-groups': {
|
|
2179
|
-
request: void;
|
|
2180
|
-
response: void;
|
|
2181
|
-
};
|
|
2182
|
-
'interop-client-join-context-group': {
|
|
2183
|
-
request: void;
|
|
2184
|
-
response: void;
|
|
2185
|
-
};
|
|
2186
|
-
'interop-client-remove-from-context-group': {
|
|
2187
|
-
request: void;
|
|
2188
|
-
response: void;
|
|
2189
|
-
};
|
|
2190
|
-
'interop-client-get-all-clients-in-context-group': {
|
|
2191
|
-
request: void;
|
|
2192
|
-
response: void;
|
|
2193
|
-
};
|
|
2194
|
-
'interop-client-get-info-for-context-group': {
|
|
2195
|
-
request: void;
|
|
2196
|
-
response: void;
|
|
2197
|
-
};
|
|
2198
|
-
'interop-broker-add-client-to-context-group': {
|
|
2199
|
-
request: void;
|
|
2200
|
-
response: void;
|
|
2201
|
-
};
|
|
2202
|
-
'interop-broker-get-all-clients-in-context-group': {
|
|
2203
|
-
request: void;
|
|
2204
|
-
response: void;
|
|
2205
|
-
};
|
|
2206
|
-
'interop-broker-get-context-groups': {
|
|
2207
|
-
request: void;
|
|
2208
|
-
response: void;
|
|
2209
|
-
};
|
|
2210
|
-
'interop-broker-get-info-for-context-group': {
|
|
2211
|
-
request: void;
|
|
2212
|
-
response: void;
|
|
2213
|
-
};
|
|
2214
|
-
'interop-broker-is-action-authorized': {
|
|
2215
|
-
request: void;
|
|
2216
|
-
response: void;
|
|
2217
|
-
};
|
|
2218
|
-
'interop-broker-is-connection-authorized': {
|
|
2219
|
-
request: void;
|
|
2220
|
-
response: void;
|
|
2221
|
-
};
|
|
2222
|
-
'interop-broker-join-context-group': {
|
|
2223
|
-
request: void;
|
|
2224
|
-
response: void;
|
|
2225
|
-
};
|
|
2226
|
-
'interop-broker-remove-client-from-context-group': {
|
|
2227
|
-
request: void;
|
|
2228
|
-
response: void;
|
|
2229
|
-
};
|
|
2230
|
-
'interop-broker-remove-from-context-group': {
|
|
2231
|
-
request: void;
|
|
2232
|
-
response: void;
|
|
2233
|
-
};
|
|
2234
|
-
'interop-broker-set-context': {
|
|
2235
|
-
request: void;
|
|
2236
|
-
response: void;
|
|
2237
|
-
};
|
|
2238
|
-
'query-permission-for-current-context': {
|
|
2239
|
-
request: { apiName: string; identity: OpenFin.Identity };
|
|
2240
|
-
response: OpenFin.QueryPermissionResult;
|
|
2241
|
-
};
|
|
2242
|
-
};
|
|
2243
|
-
|
|
2244
|
-
type ProtocolMapBase = {
|
|
2245
|
-
[action: string]: {
|
|
2246
|
-
request: any;
|
|
2247
|
-
response: any;
|
|
2248
|
-
specialResponse?: any; // Used for anything not on payload.data (only request-external-authorization for now)
|
|
2249
|
-
};
|
|
2250
|
-
};
|
|
2251
|
-
|
|
2252
|
-
export type MessageHandler = (data: any) => boolean;
|
|
2253
|
-
|
|
2254
|
-
export type ViewState = OpenFin.ViewCreationOptions & {
|
|
2255
|
-
url: string;
|
|
2256
|
-
};
|
|
2257
|
-
|
|
2258
|
-
export type OsConfig = {
|
|
2259
|
-
manifestLocation: string;
|
|
2260
|
-
namedPipeName: string;
|
|
2261
|
-
urlPath: string;
|
|
2262
|
-
executablePath: string;
|
|
2263
|
-
};
|
|
2264
|
-
|
|
2265
|
-
export type Wire = EventEmitter & {
|
|
2266
|
-
connect(address: string): Promise<any>;
|
|
2267
|
-
connectSync(): any;
|
|
2268
|
-
send(data: any): Promise<any>;
|
|
2269
|
-
shutdown(): Promise<void>;
|
|
2270
|
-
};
|
|
2271
|
-
export type WireConstructor = {
|
|
2272
|
-
new (onmessage: (data: any) => void): Wire;
|
|
2273
|
-
};
|
|
2274
|
-
|
|
2275
|
-
export type RuntimeConfig = {
|
|
2276
|
-
version: string;
|
|
2277
|
-
fallbackVersion?: string;
|
|
2278
|
-
securityRealm?: string;
|
|
2279
|
-
verboseLogging?: boolean;
|
|
2280
|
-
arguments?: string;
|
|
2281
|
-
rvmDir?: string;
|
|
2282
|
-
};
|
|
2283
|
-
|
|
2284
|
-
export type ServiceConfig = {
|
|
2285
|
-
name: string;
|
|
2286
|
-
manifestUrl: string;
|
|
2287
|
-
};
|
|
2288
|
-
|
|
2289
|
-
export type BaseConfig = {
|
|
2290
|
-
uuid?: string;
|
|
2291
|
-
address?: string;
|
|
1575
|
+
export interface PopupOptions {
|
|
1576
|
+
initialOptions?: OpenFin.WindowCreationOptions;
|
|
1577
|
+
additionalOptions?: OpenFin.UpdatableWindowOptions;
|
|
2292
1578
|
name?: string;
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
|
-
export type ConfigWithUuid = BaseConfig & {
|
|
2319
|
-
uuid: string;
|
|
2320
|
-
};
|
|
2321
|
-
|
|
2322
|
-
export type ExistingConnectConfig = ConfigWithUuid & {
|
|
2323
|
-
address: string;
|
|
2324
|
-
};
|
|
2325
|
-
|
|
2326
|
-
export type ConfigWithRuntime = BaseConfig & {
|
|
2327
|
-
runtime: RuntimeConfig;
|
|
2328
|
-
};
|
|
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
|
+
}
|
|
2329
1603
|
|
|
2330
|
-
export type
|
|
2331
|
-
manifestUrl: string;
|
|
2332
|
-
};
|
|
1604
|
+
export type SystemEvents = import('./src/api/events/system').SystemEvents;
|
|
2333
1605
|
|
|
2334
|
-
export type
|
|
1606
|
+
export type ApplicationEvents = import('./src/api/events/application').ApplicationEvents;
|
|
2335
1607
|
|
|
2336
|
-
export type
|
|
1608
|
+
export type WindowEvents = import('./src/api/events/window').WindowEvents;
|
|
2337
1609
|
|
|
2338
|
-
export type
|
|
1610
|
+
export type ViewEvents = import('./src/api/events/view').ViewEvents;
|
|
2339
1611
|
|
|
2340
|
-
export type
|
|
1612
|
+
export type GlobalHotkeyEvents = import('./src/api/events/globalHotkey').GlobalHotkeyEvents;
|
|
2341
1613
|
|
|
2342
|
-
export type
|
|
2343
|
-
| 'CONNECTING' // The connection is not yet open.
|
|
2344
|
-
| 'OPEN' // The connection is open and ready to communicate.
|
|
2345
|
-
| 'CLOSING' // The connection is in the process of closing.
|
|
2346
|
-
| 'CLOSED'; // The connection is closed.
|
|
1614
|
+
export type FrameEvents = import('./src/api/events/frame').FrameEvents;
|
|
2347
1615
|
|
|
2348
|
-
export type
|
|
2349
|
-
options: any;
|
|
2350
|
-
entityType: EntityType;
|
|
2351
|
-
};
|
|
1616
|
+
export type PlatformEvents = import('./src/api/events/platform').PlatformEvents;
|
|
2352
1617
|
|
|
2353
|
-
export type
|
|
2354
|
-
stack: string;
|
|
2355
|
-
message: string;
|
|
2356
|
-
toString(): string;
|
|
2357
|
-
};
|
|
1618
|
+
export type ExternalApplicationEvents = import('./src/api/events/externalApplication').ExternalApplicationEvents;
|
|
2358
1619
|
}
|