@openfin/core 25.68.27 → 25.68.28
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 +1064 -33
- package/README.md +5 -1
- package/openfin-core-25.68.26.tgz +0 -0
- package/package.json +1 -1
- package/src/api/application/Instance.d.ts +2 -2
- package/src/api/application/Instance.js +1 -1
- package/src/api/base.d.ts +1 -1
- package/src/api/events/channel.d.ts +2 -1
- package/src/api/events/eventAggregator.d.ts +1 -1
- package/src/api/external-application/Instance.d.ts +1 -1
- package/src/api/fin.d.ts +1 -1
- package/src/api/frame/Instance.d.ts +1 -1
- package/src/api/global-hotkey/index.d.ts +1 -1
- package/src/api/interappbus/channel/channel.d.ts +3 -3
- package/src/api/interappbus/channel/index.d.ts +2 -1
- package/src/api/interappbus/index.d.ts +2 -1
- package/src/api/me.d.ts +1 -1
- package/src/api/platform/Instance.d.ts +1 -1
- package/src/api/platform/Instance.js +1 -2
- package/src/api/platform/common-utils.d.ts +1 -1
- package/src/api/platform/layout/Factory.d.ts +1 -1
- package/src/api/platform/layout/Factory.js +1 -0
- package/src/api/platform/layout/Instance.d.ts +2 -1
- package/src/api/platform/layout/index.d.ts +0 -1
- package/src/api/platform/layout/index.js +0 -1
- package/src/api/system/index.d.ts +17 -13
- package/src/api/system/index.js +3 -3
- package/src/api/view/Instance.d.ts +1 -1
- package/src/api/webcontents/main.d.ts +1 -1
- package/src/api/window/Instance.d.ts +2 -2
- package/src/environment/environment.d.ts +5 -8
- package/src/environment/node-env.d.ts +5 -4
- package/src/environment/openfin-env.d.ts +5 -4
- package/src/environment/openfin-env.js +2 -0
- package/src/transport/transport-errors.d.ts +3 -2
- package/src/transport/transport-errors.js +1 -3
- package/src/transport/transport.d.ts +10 -24
- package/src/transport/transport.js +0 -14
- package/src/transport/wire.d.ts +6 -71
- package/src/transport/wire.js +1 -8
- package/src/util/errors.d.ts +1 -5
- package/src/util/errors.js +0 -3
- package/src/util/normalize-config.d.ts +3 -1
- package/src/api/events/application.d.ts +0 -69
- package/src/api/events/application.js +0 -2
- package/src/api/events/base.d.ts +0 -17
- package/src/api/events/base.js +0 -2
- package/src/api/events/externalApplication.d.ts +0 -5
- package/src/api/events/externalApplication.js +0 -2
- package/src/api/events/frame.d.ts +0 -9
- package/src/api/events/frame.js +0 -2
- package/src/api/events/globalHotkey.d.ts +0 -10
- package/src/api/events/globalHotkey.js +0 -2
- package/src/api/events/platform.d.ts +0 -18
- package/src/api/events/platform.js +0 -2
- package/src/api/events/system.d.ts +0 -22
- package/src/api/events/system.js +0 -2
- package/src/api/events/view.d.ts +0 -56
- package/src/api/events/view.js +0 -2
- package/src/api/events/webcontents.d.ts +0 -48
- package/src/api/events/webcontents.js +0 -2
- package/src/api/events/window.d.ts +0 -169
- package/src/api/events/window.js +0 -2
- package/src/api/platform/layout/shapes.d.ts +0 -11
- package/src/api/platform/layout/shapes.js +0 -2
- package/src/api/system/application.d.ts +0 -6
- package/src/api/system/application.js +0 -2
- package/src/api/system/entity.d.ts +0 -11
- package/src/api/system/entity.js +0 -2
- package/src/api/system/installedApps.d.ts +0 -6
- package/src/api/system/installedApps.js +0 -2
- package/src/api/system/log.d.ts +0 -11
- package/src/api/system/log.js +0 -2
- package/src/api/system/process.d.ts +0 -15
- package/src/api/system/process.js +0 -2
- package/src/api/system/proxy.d.ts +0 -15
- package/src/api/system/proxy.js +0 -2
- package/src/api/system/queryPermissionTypes.d.ts +0 -1
- package/src/api/system/queryPermissionTypes.js +0 -2
- package/src/api/system/registry-info.d.ts +0 -7
- package/src/api/system/registry-info.js +0 -2
- package/src/api/system/window.d.ts +0 -16
- package/src/api/system/window.js +0 -2
- package/src/shapes/ERROR_BOX_TYPES.d.ts +0 -6
- package/src/shapes/ERROR_BOX_TYPES.js +0 -10
- package/src/shapes/EntityType.d.ts +0 -1
- package/src/shapes/EntityType.js +0 -2
- package/src/shapes/LayoutPresetType.d.ts +0 -1
- package/src/shapes/LayoutPresetType.js +0 -2
- package/src/shapes/Platform.d.ts +0 -112
- package/src/shapes/Platform.js +0 -16
- package/src/shapes/WebOptions.d.ts +0 -12
- package/src/shapes/WebOptions.js +0 -2
- package/src/shapes/WindowOptions.d.ts +0 -42
- package/src/shapes/WindowOptions.js +0 -2
- package/src/shapes/protocol.d.ts +0 -178
- package/src/shapes/protocol.js +0 -2
package/OpenFin.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
/// <reference lib="dom"/>
|
|
2
|
+
|
|
1
3
|
declare namespace OpenFin {
|
|
2
4
|
// "wrappable entities"
|
|
5
|
+
import EventEmitter = NodeJS.EventEmitter;
|
|
3
6
|
export type Application = import('./src/api/application/index').Application;
|
|
4
7
|
export type ExternalApplication = import('./src/api/external-application/index').ExternalApplication;
|
|
5
8
|
export type Frame = import('./src/api/frame/index')._Frame;
|
|
@@ -41,7 +44,8 @@ declare namespace OpenFin {
|
|
|
41
44
|
name: string;
|
|
42
45
|
entityType: EntityType;
|
|
43
46
|
}
|
|
44
|
-
|
|
47
|
+
|
|
48
|
+
export type EntityType = 'window' | 'iframe' | 'external connection' | 'view' | 'unknown';
|
|
45
49
|
|
|
46
50
|
export interface Bounds {
|
|
47
51
|
top: number;
|
|
@@ -314,7 +318,6 @@ declare namespace OpenFin {
|
|
|
314
318
|
}
|
|
315
319
|
|
|
316
320
|
export interface WorkspacePlatformOptions {
|
|
317
|
-
pages: Page[];
|
|
318
321
|
/** Leaving this as any for now until we figure out what the shape should look like in Workspace */
|
|
319
322
|
[key: string]: any;
|
|
320
323
|
}
|
|
@@ -348,28 +351,6 @@ declare namespace OpenFin {
|
|
|
348
351
|
machineName?: string;
|
|
349
352
|
}
|
|
350
353
|
|
|
351
|
-
type PageLayout = LayoutExtended & { layoutDetails: PageLayoutDetails };
|
|
352
|
-
|
|
353
|
-
interface Page {
|
|
354
|
-
/** A UI friendly title for the page. */
|
|
355
|
-
title: string;
|
|
356
|
-
|
|
357
|
-
/** The unique ID of the page. */
|
|
358
|
-
pageId: string;
|
|
359
|
-
|
|
360
|
-
/** An optional UI friendly description of the page. */
|
|
361
|
-
description?: string;
|
|
362
|
-
|
|
363
|
-
/** A optional UI friendly tooltip for the page. */
|
|
364
|
-
tooltip?: string;
|
|
365
|
-
|
|
366
|
-
/** True if the page is read only. In this state, the page is locked and cannot be unlocked. */
|
|
367
|
-
isReadOnly?: boolean;
|
|
368
|
-
|
|
369
|
-
/** The layout of the page. */
|
|
370
|
-
layout: PageLayout;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
354
|
export interface WebRequestHeader {
|
|
374
355
|
[key: string]: string;
|
|
375
356
|
}
|
|
@@ -563,9 +544,6 @@ declare namespace OpenFin {
|
|
|
563
544
|
state: string;
|
|
564
545
|
}
|
|
565
546
|
|
|
566
|
-
export type HostContextChangedReasons = import('./src/shapes/Platform').HostContextChangedReasons;
|
|
567
|
-
export type WindowCreationReason = import('./src/shapes/Platform').WindowCreationReason;
|
|
568
|
-
|
|
569
547
|
export type HostContextChangedPayload = {
|
|
570
548
|
context: any;
|
|
571
549
|
reason: HostContextChangedReasons;
|
|
@@ -784,7 +762,138 @@ declare namespace OpenFin {
|
|
|
784
762
|
|
|
785
763
|
export type Constructor<T = {}> = new (...args: any[]) => T;
|
|
786
764
|
|
|
787
|
-
type
|
|
765
|
+
export type HostContextChangedReasons = 'updated' | 'reparented';
|
|
766
|
+
|
|
767
|
+
export type WindowCreationReason =
|
|
768
|
+
| 'tearout'
|
|
769
|
+
| 'create-view-without-target'
|
|
770
|
+
| 'api-call'
|
|
771
|
+
| 'app-creation'
|
|
772
|
+
| 'restore';
|
|
773
|
+
|
|
774
|
+
// TODO: Real PlatformProvider type def
|
|
775
|
+
export interface PlatformProvider {
|
|
776
|
+
/**
|
|
777
|
+
* Handles requests to create a window in the current platform.
|
|
778
|
+
* @param { WindowOption } payload Window options for the window to be created.
|
|
779
|
+
* @param { Identity } [identity] If {@link Platform#createWindow Platform.createWindow} was called, the identity of the caller will be here.
|
|
780
|
+
* If `createWindow` was called as part of applying a snapshot or creating a view without a target window, `identity` will be undefined.
|
|
781
|
+
*/
|
|
782
|
+
createWindow(
|
|
783
|
+
options: OpenFin.PlatformWindowCreationOptions,
|
|
784
|
+
identity?: OpenFin.Identity
|
|
785
|
+
): Promise<OpenFin.Window>;
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Gets the current state of windows and their views and returns a snapshot object containing that info.
|
|
789
|
+
* @param { undefined } payload Undefined unless you've defined a custom `getSnapshot` protocol.
|
|
790
|
+
* @param { Identity } identity Identity of the entity that called {@link Platform#getSnapshot Platform.getSnapshot}.
|
|
791
|
+
* @return { Promise<Snapshot> } Snapshot of current platform state.
|
|
792
|
+
*/
|
|
793
|
+
getSnapshot(payload: undefined, identity: OpenFin.Identity): Promise<OpenFin.Snapshot>;
|
|
794
|
+
|
|
795
|
+
/**
|
|
796
|
+
* Called when a snapshot is being applied and some windows in that snapshot would be fully or partially off-screen.
|
|
797
|
+
* Returns an array of windows with modified positions, such that any off-screen windows are positioned in the top left
|
|
798
|
+
* corner of the main monitor.
|
|
799
|
+
* @param { Snapshot } snapshot The snapshot to be applied.
|
|
800
|
+
* @param { WindowOptions[] } outOfBoundsWindows An array of WindowOptions for any windows that would be off-screen.
|
|
801
|
+
* @return { Promise<WindowOptions[]> } An array of WindowOptions with their position modified to fit on screen.
|
|
802
|
+
*/
|
|
803
|
+
positionOutOfBoundsWindows(
|
|
804
|
+
snapshot: OpenFin.Snapshot,
|
|
805
|
+
outOfBoundsWindows: OpenFin.WindowCreationOptions[]
|
|
806
|
+
): Promise<OpenFin.WindowCreationOptions[]>;
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Handles requests to apply a snapshot to the current Platform.
|
|
810
|
+
* @param { ApplySnapshotPayload } payload Payload containing the snapshot to be applied, as well as any options.
|
|
811
|
+
* @param { Identity } [identity] Identity of the entity that called {@link Platform#applySnapshot Platform.applySnapshot}.
|
|
812
|
+
* Undefined if called internally (e.g. when opening the initial snapshot).
|
|
813
|
+
* @return { Promise<void> }
|
|
814
|
+
*/
|
|
815
|
+
applySnapshot(payload: OpenFin.ApplySnapshotPayload, identity?: OpenFin.Identity): Promise<void>;
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* Closes the current Platform and all child windows and views.
|
|
819
|
+
* @param { undefined } payload Undefined unless you have implemented a custom quite protocol.
|
|
820
|
+
* @param { Identity } identity Identity of the entity that called {@link Platform#quit Platform.quit}.
|
|
821
|
+
* @return { Promise<void> }
|
|
822
|
+
*/
|
|
823
|
+
quit(payload: undefined, identity: OpenFin.Identity): Promise<void>;
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* Closes a view
|
|
827
|
+
* @param { CloseViewPayload } payload Specifies the `target` view to be closed.
|
|
828
|
+
* @param { Identity } identity Identity of the entity that called {@link Platform#closeView Platform.closeView}.
|
|
829
|
+
*/
|
|
830
|
+
closeView(payload: OpenFin.CloseViewPayload, identity?: OpenFin.Identity): Promise<any>;
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* Creates a new view and attaches it to a specified target window.
|
|
834
|
+
* @param { CreateViewPayload } payload Creation options for the new view.
|
|
835
|
+
* @param { Identity } identity Identity of the entity that called {@link Platform#createView Platform.createView}.
|
|
836
|
+
* @return { Promise<void> }
|
|
837
|
+
*/
|
|
838
|
+
createView(payload: OpenFin.CreateViewPayload, identity: OpenFin.Identity): Promise<OpenFin.View>;
|
|
839
|
+
|
|
840
|
+
/** Handles requests to fetch manifests in the current platform.
|
|
841
|
+
* @param { FetchManifestPayload } payload Payload containing the manifestUrl to be fetched.
|
|
842
|
+
* @param { Identity } callerIdentity If {@link Platform#fetchManifest Platform.fetchManifest}
|
|
843
|
+
* was called, the identity of the caller will be here.
|
|
844
|
+
* If `fetchManifest` was called internally, `callerIdentity` will be the provider's identity.
|
|
845
|
+
*/
|
|
846
|
+
fetchManifest(payload: OpenFin.FetchManifestPayload, callerIdentity: OpenFin.Identity): Promise<any>;
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* Replaces a Platform window's layout with a new layout. Any views that were in the old layout but not the new layout will be destroyed.
|
|
850
|
+
* @param { ReplaceLayoutPayload } payload Contains the `target` window and an `opts` object with a `layout` property to apply.
|
|
851
|
+
* @param { Identity } [identity] Identity of the entity that called {@link Platform#replaceLayout Platform.replaceLayout}.
|
|
852
|
+
* Undefined if `replaceLayout` is called internally (e.g. while applying a snapshot).
|
|
853
|
+
* @return { Promise<void> }
|
|
854
|
+
*/
|
|
855
|
+
replaceLayout(payload: OpenFin.ReplaceLayoutPayload, identity?: OpenFin.Identity): Promise<void>;
|
|
856
|
+
|
|
857
|
+
replaceView(payload: OpenFin.ReplaceViewPayload, identity?: OpenFin.Identity): Promise<void>;
|
|
858
|
+
|
|
859
|
+
launchIntoPlatform(payload: OpenFin.LaunchIntoPlatformPayload): Promise<void>;
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* Handles requests to set a window's context. `target` may be a window or a view.
|
|
863
|
+
* If it is a window, that window's `customContext` will be updated.
|
|
864
|
+
* If it is a view, the `customContext` of that view's current host window will be updated.
|
|
865
|
+
* @param { SetWindowContextPayload } payload Object containing the requested `context` update,
|
|
866
|
+
* the `target`'s identity, and the target's `entityType`.
|
|
867
|
+
* @param { Identity } [identity] Identity of the entity that called {@link Platform#setWindowContext Platform.setWindowContext}.
|
|
868
|
+
* Undefined if `setWindowContext` is called internally (e.g. while applying a snapshot).
|
|
869
|
+
* @return { Promise<any> } The new context.
|
|
870
|
+
*/
|
|
871
|
+
setWindowContext(payload: OpenFin.SetWindowContextPayload, identity?: OpenFin.Identity): Promise<any>;
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* Handles requests to get a window's context. `target` may be a window or a view.
|
|
875
|
+
* If it is a window, that window's `customContext` will be returned.
|
|
876
|
+
* If it is a view, the `customContext` of that view's current host window will be returned.
|
|
877
|
+
* @param { GetWindowContextPayload } payload Object containing the requested `context` update,
|
|
878
|
+
* the `target`'s identity, and the target's `entityType`.
|
|
879
|
+
* @param { Identity } [identity] Identity of the entity that called {@link Platform#getWindowContext Platform.getWindowContext}.
|
|
880
|
+
* Undefined when `getWindowContext` is called internally
|
|
881
|
+
* (e.g. when getting a window's context for the purpose of raising a "host-context-changed" event on a reparented view).
|
|
882
|
+
* @return { Promise<any> } The new context.
|
|
883
|
+
*/
|
|
884
|
+
getWindowContext(payload: OpenFin.GetWindowContextPayload, identity?: OpenFin.Identity): Promise<any>;
|
|
885
|
+
|
|
886
|
+
/**
|
|
887
|
+
* Called when a window's `customContext` is updated. Responsible for raising the `host-context-updated` event on that window's child views.
|
|
888
|
+
* @param { WindowOptionsChangedEvent<'window', 'options-changed'> } payload The event payload for the window whose context has changed.
|
|
889
|
+
* The new context will be contained as `payload.diff.customContext.newVal`.
|
|
890
|
+
* @return { Promise<HostContextChangedPayload> } The event that it raised.
|
|
891
|
+
*/
|
|
892
|
+
onWindowContextUpdated(
|
|
893
|
+
payload: WindowOptionsChangedEvent<'window', 'options-changed'>
|
|
894
|
+
): Promise<OpenFin.HostContextChangedPayload | undefined>;
|
|
895
|
+
}
|
|
896
|
+
|
|
788
897
|
export interface InitPlatformOptions {
|
|
789
898
|
overrideCallback?: OverrideCallback<PlatformProvider>;
|
|
790
899
|
interopOverride?: OverrideCallback<InteropBroker>;
|
|
@@ -1144,6 +1253,7 @@ declare namespace OpenFin {
|
|
|
1144
1253
|
export interface JumpListSeparator {
|
|
1145
1254
|
type: 'separator';
|
|
1146
1255
|
}
|
|
1256
|
+
|
|
1147
1257
|
export interface ApplicationInfo {
|
|
1148
1258
|
initialOptions: OpenFin.ApplicationCreationOptions;
|
|
1149
1259
|
launchMode: string;
|
|
@@ -1153,10 +1263,6 @@ declare namespace OpenFin {
|
|
|
1153
1263
|
runtime: { version: string };
|
|
1154
1264
|
}
|
|
1155
1265
|
|
|
1156
|
-
export interface LogInfo {
|
|
1157
|
-
logId: string;
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1160
1266
|
export interface ManifestInfo {
|
|
1161
1267
|
uuid: string;
|
|
1162
1268
|
manifestUrl: string;
|
|
@@ -1290,7 +1396,6 @@ declare namespace OpenFin {
|
|
|
1290
1396
|
applySnapshot: (snapshot: T) => Promise<void>;
|
|
1291
1397
|
}
|
|
1292
1398
|
|
|
1293
|
-
export type PermissionState = import('./src/api/system/queryPermissionTypes').PermissionState;
|
|
1294
1399
|
export interface QueryPermissionResult {
|
|
1295
1400
|
permission: string;
|
|
1296
1401
|
state: PermissionState;
|
|
@@ -1337,4 +1442,930 @@ declare namespace OpenFin {
|
|
|
1337
1442
|
data: unknown;
|
|
1338
1443
|
type: string;
|
|
1339
1444
|
}
|
|
1445
|
+
|
|
1446
|
+
export interface ProxyInfo {
|
|
1447
|
+
config: ProxyConfig;
|
|
1448
|
+
system: ProxySystemInfo;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
export interface ProxyConfig {
|
|
1452
|
+
proxyAddress: string;
|
|
1453
|
+
proxyPort: number;
|
|
1454
|
+
type: string;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
export interface ProxySystemInfo {
|
|
1458
|
+
autoConfigUrl: string;
|
|
1459
|
+
bypass: string;
|
|
1460
|
+
enabled: boolean;
|
|
1461
|
+
proxy: string;
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
export interface BaseEvent<Topic, Type> {
|
|
1465
|
+
topic: Topic;
|
|
1466
|
+
type: Type;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
export interface ApplicationEvent<Topic, Type> extends BaseEvent<Topic, Type> {
|
|
1470
|
+
uuid: string;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
export interface WindowEvent<Topic, Type> extends ApplicationEvent<Topic, Type> {
|
|
1474
|
+
name: string;
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
export interface BaseEventMap {
|
|
1478
|
+
[name: string]: any;
|
|
1479
|
+
newListener: string;
|
|
1480
|
+
listenerRemoved: string;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
export interface WindowResourceLoadFailedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1484
|
+
errorCode: number;
|
|
1485
|
+
errorDescription: string;
|
|
1486
|
+
validatedURL: string;
|
|
1487
|
+
isMainFrame: boolean;
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
export interface WindowResourceResponseReceivedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1491
|
+
status: boolean;
|
|
1492
|
+
newUrl: string;
|
|
1493
|
+
originalUrl: string;
|
|
1494
|
+
httpResponseCode: number;
|
|
1495
|
+
requestMethod: string;
|
|
1496
|
+
referrer: string;
|
|
1497
|
+
headers: any;
|
|
1498
|
+
resourceType: 'mainFrame' | 'subFrame' | 'styleSheet' | 'script' | 'image' | 'object' | 'xhr' | 'other';
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
export interface PageTitleUpdatedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1502
|
+
title: string;
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
export interface CertificateErrorEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1506
|
+
error: string;
|
|
1507
|
+
url: string;
|
|
1508
|
+
certificate: OpenFin.Certificate;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
export interface CertificateSelectionShownEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1512
|
+
url: string;
|
|
1513
|
+
certificates: OpenFin.Certificate[];
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
export interface FaviconUpdatedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1517
|
+
favicons: string[];
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
export interface CrashedEvent {
|
|
1521
|
+
reason:
|
|
1522
|
+
| 'normal-termination'
|
|
1523
|
+
| 'abnormal-termination'
|
|
1524
|
+
| 'killed'
|
|
1525
|
+
| 'crashed'
|
|
1526
|
+
| 'still-running'
|
|
1527
|
+
| 'launch-failed'
|
|
1528
|
+
| 'out-of-memory'
|
|
1529
|
+
| 'integrity-failure';
|
|
1530
|
+
exitCode: number;
|
|
1531
|
+
details: {
|
|
1532
|
+
reason: string;
|
|
1533
|
+
exitCode: number;
|
|
1534
|
+
};
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
export interface WindowNavigationRejectedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1538
|
+
sourceName?: string; // DEPRECATED
|
|
1539
|
+
url: string;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
export interface FrameEvent<Type> extends WindowEvent<'frame', Type> {
|
|
1543
|
+
entityType: 'iframe';
|
|
1544
|
+
frameName: string;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
export interface FrameEvents extends BaseEventMap {
|
|
1548
|
+
connected: FrameEvent<'connected'>;
|
|
1549
|
+
disconnected: FrameEvent<'disconnected'>;
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
// This file exports base event types to level specific events
|
|
1553
|
+
// Those files map event names to event shapes and use a mapped type to specify topic and type
|
|
1554
|
+
export type RuntimeEvent<Topic = string, Type = string> = Topic extends 'window' | 'view'
|
|
1555
|
+
? WindowEvent<Topic, Type>
|
|
1556
|
+
: Topic extends 'frame'
|
|
1557
|
+
? FrameEvent<Type>
|
|
1558
|
+
: Topic extends 'application'
|
|
1559
|
+
? ApplicationEvent<Topic, Type>
|
|
1560
|
+
: BaseEvent<Topic, Type>;
|
|
1561
|
+
|
|
1562
|
+
export interface WebContentsEventMapping<Topic = string, Type = string> extends BaseEventMap {
|
|
1563
|
+
'blurred': WindowEvent<Topic, Type>;
|
|
1564
|
+
'certificate-error': CertificateErrorEvent<Topic, Type>;
|
|
1565
|
+
'certificate-selection-shown': CertificateSelectionShownEvent<Topic, Type>;
|
|
1566
|
+
'crashed': CrashedEvent & WindowEvent<Topic, Type>;
|
|
1567
|
+
'did-change-theme-color': WindowEvent<Topic, Type>;
|
|
1568
|
+
'focused': WindowEvent<Topic, Type>;
|
|
1569
|
+
'found-in-page': WindowEvent<Topic, Type>;
|
|
1570
|
+
'navigation-rejected': WindowNavigationRejectedEvent<Topic, Type>;
|
|
1571
|
+
'page-favicon-updated': FaviconUpdatedEvent<Topic, Type>;
|
|
1572
|
+
'page-title-updated': PageTitleUpdatedEvent<Topic, Type>;
|
|
1573
|
+
'resource-load-failed': WindowResourceLoadFailedEvent<Topic, Type>;
|
|
1574
|
+
'resource-response-received': WindowResourceResponseReceivedEvent<Topic, Type>;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
export interface RunRequestedEvent<Topic, Type> extends ApplicationEvent<Topic, Type> {
|
|
1578
|
+
userAppConfigArgs: any;
|
|
1579
|
+
manifest: OpenFin.ManifestInfo;
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
export interface TrayIconClicked<Topic, Type> extends ApplicationEvent<Topic, Type> {
|
|
1583
|
+
button: 0 | 1 | 2;
|
|
1584
|
+
bounds: OpenFin.Rectangle;
|
|
1585
|
+
x: number;
|
|
1586
|
+
y: number;
|
|
1587
|
+
monitorInfo: any;
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
export interface WindowAlertRequestedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1591
|
+
message: string;
|
|
1592
|
+
url: string;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
export interface WindowAuthRequestedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1596
|
+
authInfo: {
|
|
1597
|
+
host: string;
|
|
1598
|
+
isProxy: boolean;
|
|
1599
|
+
port: number;
|
|
1600
|
+
realm: string;
|
|
1601
|
+
scheme: string;
|
|
1602
|
+
};
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
export interface WindowEndLoadEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1606
|
+
documentName: string;
|
|
1607
|
+
isMain: boolean;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
export interface WindowReloadedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1611
|
+
url: string;
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
export interface WindowOptionsChangedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1615
|
+
options: OpenFin.WindowOptions;
|
|
1616
|
+
diff: OpenFin.WindowOptionDiff;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
export interface WindowExternalProcessExitedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1620
|
+
processUuid: string;
|
|
1621
|
+
exitCode: number;
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
export interface WindowExternalProcessStartedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1625
|
+
processUuid: string;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
export interface WindowHiddenEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1629
|
+
reason: 'closing' | 'hide' | 'hide-on-close';
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
export interface PreloadScriptInfoRunning {
|
|
1633
|
+
state:
|
|
1634
|
+
| 'load-started' // started loading preload script
|
|
1635
|
+
| 'load-failed' // preload script failed to load
|
|
1636
|
+
| 'load-succeeded' // preload script is loaded and ready to be eval'ed
|
|
1637
|
+
| 'failed' // preload script failed to eval
|
|
1638
|
+
| 'succeeded'; // preload script eval'ed successfully
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
export interface PreloadScriptInfo {
|
|
1642
|
+
state:
|
|
1643
|
+
| 'load-failed' // preload script failed to load
|
|
1644
|
+
| 'failed' // preload script failed to eval
|
|
1645
|
+
| 'succeeded'; // preload script eval'ed successfully
|
|
1646
|
+
}
|
|
1647
|
+
export interface WindowPreloadScriptsStateChangeEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1648
|
+
preloadScripts: (PreloadScriptInfoRunning & any)[];
|
|
1649
|
+
}
|
|
1650
|
+
export interface WindowPreloadScriptsStateChangedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1651
|
+
preloadScripts: (PreloadScriptInfoRunning & any)[];
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
export interface WindowBeginBoundsChangingEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1655
|
+
height: number;
|
|
1656
|
+
left: number;
|
|
1657
|
+
top: number;
|
|
1658
|
+
width: number;
|
|
1659
|
+
windowState: 'minimized' | 'normal' | 'maximized';
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
export interface WindowEndBoundsChangingEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1663
|
+
height: number;
|
|
1664
|
+
left: number;
|
|
1665
|
+
top: number;
|
|
1666
|
+
width: number;
|
|
1667
|
+
windowState: 'minimized' | 'normal' | 'maximized';
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
export interface WindowBoundsChange<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1671
|
+
changeType: 0 | 1 | 2;
|
|
1672
|
+
deferred: boolean;
|
|
1673
|
+
height: number;
|
|
1674
|
+
left: number;
|
|
1675
|
+
top: number;
|
|
1676
|
+
width: number;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
export interface WillMoveOrResize<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1680
|
+
height: number;
|
|
1681
|
+
left: number;
|
|
1682
|
+
top: number;
|
|
1683
|
+
width: number;
|
|
1684
|
+
monitorScaleFactor: number;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
export type WindowPerformanceReport<Topic, Type> = Performance & WindowEvent<Topic, Type>;
|
|
1688
|
+
|
|
1689
|
+
export interface ViewDetached<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1690
|
+
previousTarget: OpenFin.Identity;
|
|
1691
|
+
target: OpenFin.Identity;
|
|
1692
|
+
viewIdentity: OpenFin.Identity;
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
export interface WindowEventMapping<Topic = string, Type = string> extends WebContentsEventMapping {
|
|
1696
|
+
'auth-requested': WindowAuthRequestedEvent<Topic, Type>;
|
|
1697
|
+
'begin-user-bounds-changing': WindowBeginBoundsChangingEvent<Topic, Type>;
|
|
1698
|
+
'bounds-changed': WindowBoundsChange<Topic, Type>;
|
|
1699
|
+
'bounds-changing': WindowBoundsChange<Topic, Type>;
|
|
1700
|
+
'close-requested': WindowEvent<Topic, Type>;
|
|
1701
|
+
'closed': WindowEvent<Topic, Type>;
|
|
1702
|
+
'closing': WindowEvent<Topic, Type>;
|
|
1703
|
+
'disabled-movement-bounds-changed': WindowBoundsChange<Topic, Type>;
|
|
1704
|
+
'disabled-movement-bounds-changing': WindowBoundsChange<Topic, Type>;
|
|
1705
|
+
'embedded': WindowEvent<Topic, Type>;
|
|
1706
|
+
'end-user-bounds-changing': WindowEndBoundsChangingEvent<Topic, Type>;
|
|
1707
|
+
'external-process-exited': WindowExternalProcessExitedEvent<Topic, Type>;
|
|
1708
|
+
'external-process-started': WindowExternalProcessStartedEvent<Topic, Type>;
|
|
1709
|
+
'hidden': WindowHiddenEvent<Topic, Type>;
|
|
1710
|
+
'hotkey': InputEvent & WindowEvent<Topic, Type>;
|
|
1711
|
+
'initialized': WindowEvent<Topic, Type>;
|
|
1712
|
+
'layout-initialized': WindowEvent<Topic, Type>;
|
|
1713
|
+
'layout-ready': WindowEvent<Topic, Type>;
|
|
1714
|
+
'maximized': WindowEvent<Topic, Type>;
|
|
1715
|
+
'minimized': WindowEvent<Topic, Type>;
|
|
1716
|
+
'options-changed': WindowOptionsChangedEvent<Topic, Type>;
|
|
1717
|
+
'performance-report': WindowPerformanceReport<Topic, Type>;
|
|
1718
|
+
'preload-scripts-state-changed': WindowPreloadScriptsStateChangeEvent<Topic, Type>;
|
|
1719
|
+
'preload-scripts-state-changing': WindowPreloadScriptsStateChangeEvent<Topic, Type>;
|
|
1720
|
+
'reloaded': WindowReloadedEvent<Topic, Type>;
|
|
1721
|
+
'restored': WindowEvent<Topic, Type>;
|
|
1722
|
+
'show-requested': WindowEvent<Topic, Type>;
|
|
1723
|
+
'shown': WindowEvent<Topic, Type>;
|
|
1724
|
+
'user-movement-disabled': WindowEvent<Topic, Type>;
|
|
1725
|
+
'user-movement-enabled': WindowEvent<Topic, Type>;
|
|
1726
|
+
'view-attached': WindowEvent<Topic, Type>;
|
|
1727
|
+
'view-detached': ViewDetached<Topic, Type>;
|
|
1728
|
+
'will-move': WillMoveOrResize<Topic, Type>;
|
|
1729
|
+
'will-resize': WillMoveOrResize<Topic, Type>;
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
export interface PropagatedWindowEventMapping<Topic = string, Type = string> extends BaseEventMap {
|
|
1733
|
+
'window-begin-user-bounds-changing': WindowBeginBoundsChangingEvent<Topic, Type>;
|
|
1734
|
+
'window-blurred': WindowEvent<Topic, Type>;
|
|
1735
|
+
'window-bounds-changed': WindowBoundsChange<Topic, Type>;
|
|
1736
|
+
'window-bounds-changing': WindowBoundsChange<Topic, Type>;
|
|
1737
|
+
'window-certificate-selection-shown': CertificateSelectionShownEvent<Topic, Type>;
|
|
1738
|
+
'window-closed': WindowEvent<Topic, Type>;
|
|
1739
|
+
'window-closing': WindowEvent<Topic, Type>;
|
|
1740
|
+
'window-crashed': CrashedEvent & WindowEvent<Topic, Type>;
|
|
1741
|
+
'window-disabled-movement-bounds-changed': WindowBoundsChange<Topic, Type>;
|
|
1742
|
+
'window-disabled-movement-bounds-changing': WindowBoundsChange<Topic, Type>;
|
|
1743
|
+
'window-embedded': WindowEvent<Topic, Type>;
|
|
1744
|
+
'window-end-user-bounds-changing': WindowBeginBoundsChangingEvent<Topic, Type>;
|
|
1745
|
+
'window-external-process-exited': WindowExternalProcessExitedEvent<Topic, Type>;
|
|
1746
|
+
'window-external-process-started': WindowExternalProcessStartedEvent<Topic, Type>;
|
|
1747
|
+
'window-focused': WindowEvent<Topic, Type>;
|
|
1748
|
+
'window-hidden': WindowHiddenEvent<Topic, Type>;
|
|
1749
|
+
'window-hotkey': InputEvent & WindowEvent<Topic, Type>;
|
|
1750
|
+
'window-initialized': WindowEvent<Topic, Type>;
|
|
1751
|
+
'window-layout-initialized': WindowEvent<Topic, Type>;
|
|
1752
|
+
'window-layout-ready': WindowEvent<Topic, Type>;
|
|
1753
|
+
'window-maximized': WindowEvent<Topic, Type>;
|
|
1754
|
+
'window-minimized': WindowEvent<Topic, Type>;
|
|
1755
|
+
'window-navigation-rejected': WindowNavigationRejectedEvent<Topic, Type>;
|
|
1756
|
+
'window-options-changed': WindowOptionsChangedEvent<Topic, Type>;
|
|
1757
|
+
'window-performance-report': WindowPerformanceReport<Topic, Type>;
|
|
1758
|
+
'window-preload-scripts-state-changed': WindowPreloadScriptsStateChangeEvent<Topic, Type>;
|
|
1759
|
+
'window-preload-scripts-state-changing': WindowPreloadScriptsStateChangedEvent<Topic, Type>;
|
|
1760
|
+
'window-resource-load-failed': WindowResourceLoadFailedEvent<Topic, Type>;
|
|
1761
|
+
'window-resource-response-received': WindowResourceResponseReceivedEvent<Topic, Type>;
|
|
1762
|
+
'window-reloaded': WindowReloadedEvent<Topic, Type>;
|
|
1763
|
+
'window-restored': WindowEvent<Topic, Type>;
|
|
1764
|
+
'window-shown': WindowEvent<Topic, Type>;
|
|
1765
|
+
'window-user-movement-disabled': WindowEvent<Topic, Type>;
|
|
1766
|
+
'window-user-movement-enabled': WindowEvent<Topic, Type>;
|
|
1767
|
+
'window-will-move': WillMoveOrResize<Topic, Type>;
|
|
1768
|
+
'window-will-resize': WillMoveOrResize<Topic, Type>;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
export interface ViewEventMapping<Topic = string, Type = string> extends WebContentsEventMapping {
|
|
1772
|
+
'attached': WindowEvent<Topic, Type>;
|
|
1773
|
+
'created': WindowEvent<Topic, Type>;
|
|
1774
|
+
'destroyed': WindowEvent<Topic, Type>;
|
|
1775
|
+
'hidden': WindowEvent<Topic, Type>;
|
|
1776
|
+
'hotkey': InputEvent & WindowEvent<Topic, Type>;
|
|
1777
|
+
'shown': WindowEvent<Topic, Type>;
|
|
1778
|
+
'target-changed': TargetChangedEvent<Topic, Type>;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
interface PropagatedViewIdentity {
|
|
1782
|
+
viewIdentity: OpenFin.Identity;
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
export interface PropagatedViewEventMapping<Topic = string, Type = string> extends BaseEventMap {
|
|
1786
|
+
'view-blurred': WindowEvent<Topic, Type> & PropagatedViewIdentity;
|
|
1787
|
+
'view-certificate-selection-shown': CertificateSelectionShownEvent<Topic, Type> & PropagatedViewIdentity;
|
|
1788
|
+
'view-crashed': CrashedEvent & WindowEvent<Topic, Type> & PropagatedViewIdentity;
|
|
1789
|
+
'view-created': CrashedEvent & WindowEvent<Topic, Type> & PropagatedViewIdentity;
|
|
1790
|
+
'view-destroyed': WindowEvent<Topic, Type> & PropagatedViewIdentity;
|
|
1791
|
+
'view-did-change-theme-color': WindowEvent<Topic, Type> & PropagatedViewIdentity;
|
|
1792
|
+
'view-focused': WindowEvent<Topic, Type> & PropagatedViewIdentity;
|
|
1793
|
+
'view-hidden': WindowEvent<Topic, Type> & PropagatedViewIdentity;
|
|
1794
|
+
'view-hotkey': InputEvent & WindowEvent<Topic, Type> & PropagatedViewIdentity;
|
|
1795
|
+
'view-navigation-rejected': WindowNavigationRejectedEvent<Topic, Type> & PropagatedViewIdentity;
|
|
1796
|
+
'view-page-favicon-updated': WindowEvent<Topic, Type> & PropagatedViewIdentity;
|
|
1797
|
+
'view-page-title-updated': WindowEvent<Topic, Type> & PropagatedViewIdentity;
|
|
1798
|
+
'view-resource-load-failed': WindowResourceLoadFailedEvent<Topic, Type> & PropagatedViewIdentity;
|
|
1799
|
+
'view-resource-response-received': WindowResourceResponseReceivedEvent<Topic, Type> & PropagatedViewIdentity;
|
|
1800
|
+
'view-shown': WindowEvent<Topic, Type> & PropagatedViewIdentity;
|
|
1801
|
+
'view-target-changed': TargetChangedEvent<Topic, Type> & PropagatedViewIdentity;
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
export type ViewEvents = {
|
|
1805
|
+
[Type in keyof ViewEventMapping]: ViewEventMapping<'view', Type>[Type];
|
|
1806
|
+
};
|
|
1807
|
+
|
|
1808
|
+
export type PropagatedViewEvents<Topic> = {
|
|
1809
|
+
[Type in keyof PropagatedViewEventMapping]: PropagatedViewEventMapping<Topic, Type>[Type];
|
|
1810
|
+
};
|
|
1811
|
+
|
|
1812
|
+
export interface InputEvent {
|
|
1813
|
+
inputType: 'keyUp' | 'keyDown';
|
|
1814
|
+
ctrlKey: boolean;
|
|
1815
|
+
shiftKey: boolean;
|
|
1816
|
+
altKey: boolean;
|
|
1817
|
+
metaKey: boolean;
|
|
1818
|
+
key: string;
|
|
1819
|
+
code: string;
|
|
1820
|
+
repeat: boolean;
|
|
1821
|
+
command?: string;
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
export interface TargetChangedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
1825
|
+
previousTarget: OpenFin.Identity;
|
|
1826
|
+
target: OpenFin.Identity;
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
// This is the type we should be using. It takes the more generic mapping and applies the proper Topic and Type to each event
|
|
1830
|
+
export type WindowEvents = PropagatedViewEventMapping<'window'> &
|
|
1831
|
+
{
|
|
1832
|
+
[Type in keyof WindowEventMapping]: WindowEventMapping<'window', Type>[Type];
|
|
1833
|
+
};
|
|
1834
|
+
|
|
1835
|
+
export type PropagatedWindowEvents<Topic> = {
|
|
1836
|
+
[Type in keyof PropagatedWindowEventMapping]: PropagatedWindowEventMapping<Topic, Type>[Type];
|
|
1837
|
+
};
|
|
1838
|
+
|
|
1839
|
+
export interface ApplicationEventMapping<Topic = string, Type = string> extends BaseEventMap {
|
|
1840
|
+
'closed': ApplicationEvent<Topic, Type>;
|
|
1841
|
+
'connected': ApplicationEvent<Topic, Type>;
|
|
1842
|
+
'crashed': CrashedEvent & ApplicationEvent<Topic, Type>;
|
|
1843
|
+
'initialized': ApplicationEvent<Topic, Type>;
|
|
1844
|
+
'manifest-changed': ApplicationEvent<Topic, Type>;
|
|
1845
|
+
'not-responding': ApplicationEvent<Topic, Type>;
|
|
1846
|
+
'responding': ApplicationEvent<Topic, Type>;
|
|
1847
|
+
'run-requested': RunRequestedEvent<Topic, Type>;
|
|
1848
|
+
'started': ApplicationEvent<Topic, Type>;
|
|
1849
|
+
'tray-icon-clicked': TrayIconClicked<Topic, Type>;
|
|
1850
|
+
'window-alert-requested': WindowAlertRequestedEvent<Topic, Type>;
|
|
1851
|
+
'window-auth-requested': WindowAuthRequestedEvent<Topic, Type>;
|
|
1852
|
+
'window-created': WindowEvent<Topic, Type>;
|
|
1853
|
+
'window-end-load': WindowEndLoadEvent<Topic, Type>;
|
|
1854
|
+
'window-not-responding': WindowEvent<Topic, Type>;
|
|
1855
|
+
'window-performance-report': WindowPerformanceReport<Topic, Type>;
|
|
1856
|
+
'window-responding': WindowEvent<Topic, Type>;
|
|
1857
|
+
'window-show-requested': WindowEvent<Topic, Type>;
|
|
1858
|
+
'window-start-load': WindowEvent<Topic, Type>;
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
export interface PropagatedApplicationEventMapping<Topic = string, Type = string> {
|
|
1862
|
+
'application-closed': ApplicationEvent<Topic, Type>;
|
|
1863
|
+
'application-connected': ApplicationEvent<Topic, Type>;
|
|
1864
|
+
'application-crashed': CrashedEvent & ApplicationEvent<Topic, Type>;
|
|
1865
|
+
'application-initialized': ApplicationEvent<Topic, Type>;
|
|
1866
|
+
'application-manifest-changed': ApplicationEvent<Topic, Type>;
|
|
1867
|
+
'application-not-responding': ApplicationEvent<Topic, Type>;
|
|
1868
|
+
'application-responding': ApplicationEvent<Topic, Type>;
|
|
1869
|
+
'application-started': ApplicationEvent<Topic, Type>;
|
|
1870
|
+
'application-tray-icon-clicked': TrayIconClicked<Topic, Type>;
|
|
1871
|
+
'window-created': WindowEvent<Topic, Type>;
|
|
1872
|
+
'window-did-change-theme-color': WindowEvent<Topic, Type>;
|
|
1873
|
+
'window-end-load': WindowEndLoadEvent<Topic, Type>;
|
|
1874
|
+
'window-not-responding': WindowEvent<Topic, Type>;
|
|
1875
|
+
'window-page-favicon-updated': WindowEvent<Topic, Type>;
|
|
1876
|
+
'window-page-title-updated': WindowEvent<Topic, Type>;
|
|
1877
|
+
'window-performance-report': WindowPerformanceReport<Topic, Type>;
|
|
1878
|
+
'window-responding': WindowEvent<Topic, Type>;
|
|
1879
|
+
'window-start-load': WindowEvent<Topic, Type>;
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
export type ApplicationEvents = PropagatedWindowEvents<'application'> &
|
|
1883
|
+
PropagatedViewEvents<'application'> &
|
|
1884
|
+
{
|
|
1885
|
+
[Type in keyof ApplicationEventMapping]: ApplicationEventMapping<'application', Type>[Type];
|
|
1886
|
+
};
|
|
1887
|
+
export type PropagatedApplicationEvents<Topic> = {
|
|
1888
|
+
[Type in keyof PropagatedApplicationEventMapping]: PropagatedApplicationEventMapping<Topic, Type>[Type];
|
|
1889
|
+
};
|
|
1890
|
+
|
|
1891
|
+
export interface PlatformEventMapping<Topic = string, Type = string> extends ApplicationEventMapping {
|
|
1892
|
+
'platform-api-ready': ApplicationEvent<Topic, Type>;
|
|
1893
|
+
'platform-snapshot-applied': ApplicationEvent<Topic, Type>;
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
export interface PropagatedPlatformEventMapping<Topic = string, Type = string>
|
|
1897
|
+
extends PropagatedApplicationEventMapping {
|
|
1898
|
+
'platform-api-ready': ApplicationEvent<Topic, Type>;
|
|
1899
|
+
'platform-snapshot-applied': ApplicationEvent<Topic, Type>;
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
export type PlatformEvents = PropagatedWindowEvents<'application'> &
|
|
1903
|
+
PropagatedViewEvents<'application'> &
|
|
1904
|
+
{
|
|
1905
|
+
[Type in keyof PlatformEventMapping]: PlatformEventMapping<'application', Type>[Type];
|
|
1906
|
+
};
|
|
1907
|
+
export type PropagatedPlatformEvents<Topic> = {
|
|
1908
|
+
[Type in keyof PropagatedPlatformEventMapping]: PropagatedPlatformEventMapping<Topic, Type>[Type];
|
|
1909
|
+
};
|
|
1910
|
+
|
|
1911
|
+
export interface IdleEvent<Topic, Type> extends BaseEvent<Topic, Type> {
|
|
1912
|
+
elapsedTime: number;
|
|
1913
|
+
isIdle: boolean;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
export type MonitorEvent<Topic, Type> = OpenFin.MonitorInfo & BaseEvent<Topic, Type>;
|
|
1917
|
+
|
|
1918
|
+
export interface SessionChangedEvent<Topic, Type> extends BaseEvent<Topic, Type> {
|
|
1919
|
+
reason: 'lock' | 'unlock' | 'remote-connect' | 'remote-disconnect' | 'unknown';
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
export interface SystemEventMapping<Topic = string, Type = string> extends BaseEventMap {
|
|
1923
|
+
'application-created': ApplicationEvent<Topic, Type>;
|
|
1924
|
+
'desktop-icon-clicked': ApplicationEvent<Topic, Type>;
|
|
1925
|
+
'idle-state-changed': IdleEvent<Topic, Type>;
|
|
1926
|
+
'monitor-info-changed': MonitorEvent<Topic, Type>;
|
|
1927
|
+
'session-changed': SessionChangedEvent<Topic, Type>;
|
|
1928
|
+
}
|
|
1929
|
+
export type SystemEvents = PropagatedWindowEvents<'system'> &
|
|
1930
|
+
PropagatedApplicationEvents<'system'> &
|
|
1931
|
+
PropagatedViewEvents<'system'> &
|
|
1932
|
+
{
|
|
1933
|
+
[Type in keyof SystemEventMapping]: SystemEventMapping<'system', Type>[Type];
|
|
1934
|
+
};
|
|
1935
|
+
|
|
1936
|
+
export interface GlobalHotkeyEvent<Type> extends RuntimeEvent<'global-hotkey', Type> {
|
|
1937
|
+
identity: Identity;
|
|
1938
|
+
hotkey: string;
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
export interface GlobalHotkeyEvents extends BaseEventMap {
|
|
1942
|
+
registered: GlobalHotkeyEvent<'registered'>;
|
|
1943
|
+
unregistered: GlobalHotkeyEvent<'unregistered'>;
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
export interface ExternalApplicationEvents extends BaseEventMap {
|
|
1947
|
+
connected: RuntimeEvent<'externalapplication', 'connected'>;
|
|
1948
|
+
disconnected: RuntimeEvent<'externalapplication', 'disconnected'>;
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
export type ChannelAction = (payload: unknown, id: ProviderIdentity | OpenFin.ClientIdentity) => unknown;
|
|
1952
|
+
|
|
1953
|
+
export type ChannelMiddleware = (
|
|
1954
|
+
topic: string,
|
|
1955
|
+
payload: unknown,
|
|
1956
|
+
senderIdentity: ProviderIdentity | OpenFin.ClientIdentity
|
|
1957
|
+
) => unknown;
|
|
1958
|
+
|
|
1959
|
+
export type ErrorMiddleware = (
|
|
1960
|
+
topic: string,
|
|
1961
|
+
error: Error,
|
|
1962
|
+
id: ProviderIdentity | OpenFin.ClientIdentity
|
|
1963
|
+
) => unknown;
|
|
1964
|
+
|
|
1965
|
+
export interface SystemApplicationInfo {
|
|
1966
|
+
isPlatform: boolean;
|
|
1967
|
+
isRunning: boolean;
|
|
1968
|
+
uuid: string;
|
|
1969
|
+
parentUuid?: string;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
export interface InstalledApps {
|
|
1973
|
+
[key: string]: InstallationInfo;
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
export interface InstallationInfo {
|
|
1977
|
+
cachedManifest: any;
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
export interface GetLogRequestType {
|
|
1981
|
+
name: string;
|
|
1982
|
+
endFile?: string;
|
|
1983
|
+
sizeLimit?: number;
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
export interface LogInfo {
|
|
1987
|
+
name: string;
|
|
1988
|
+
size: number;
|
|
1989
|
+
date: string;
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
// 2.4 supports string enum types, currently we use 2.2
|
|
1993
|
+
export type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
|
|
1994
|
+
|
|
1995
|
+
export interface ProcessInfo {
|
|
1996
|
+
cpuUsage?: number;
|
|
1997
|
+
name?: string;
|
|
1998
|
+
nonPagedPoolUsage?: number;
|
|
1999
|
+
pageFaultCount?: number;
|
|
2000
|
+
pagedPoolUsage?: number;
|
|
2001
|
+
pagefileUsage?: number;
|
|
2002
|
+
peakNonPagedPoolUsage?: number;
|
|
2003
|
+
peakPagedPoolUsage?: number;
|
|
2004
|
+
peakPagefileUsage?: number;
|
|
2005
|
+
peakWorkingSetSize?: number;
|
|
2006
|
+
processId?: number;
|
|
2007
|
+
uuid?: string;
|
|
2008
|
+
workingSetSize?: number;
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
export type PermissionState = 'granted' | 'denied' | 'unavailable';
|
|
2012
|
+
|
|
2013
|
+
export interface RegistryInfo {
|
|
2014
|
+
data: any;
|
|
2015
|
+
rootKey: string;
|
|
2016
|
+
subkey: string;
|
|
2017
|
+
type: string;
|
|
2018
|
+
value: string;
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
export interface Entity {
|
|
2022
|
+
type: string;
|
|
2023
|
+
uuid: string;
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
export interface WindowInfo {
|
|
2027
|
+
childWindows: Array<WindowDetail>;
|
|
2028
|
+
mainWindow: WindowDetail;
|
|
2029
|
+
uuid: string;
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
export interface WindowDetail {
|
|
2033
|
+
bottom: number;
|
|
2034
|
+
height: number;
|
|
2035
|
+
isShowing: boolean;
|
|
2036
|
+
left: number;
|
|
2037
|
+
name: string;
|
|
2038
|
+
right: number;
|
|
2039
|
+
state: string;
|
|
2040
|
+
top: number;
|
|
2041
|
+
width: number;
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
export interface WebOptions {
|
|
2045
|
+
preloadScripts?: OpenFin.PreloadScript[];
|
|
2046
|
+
uuid: string;
|
|
2047
|
+
name: string;
|
|
2048
|
+
contentCreation?: OpenFin.ContentCreationOptions;
|
|
2049
|
+
contentRedirect?: Partial<OpenFin.ContentRedirect>;
|
|
2050
|
+
customContext?: any;
|
|
2051
|
+
experimental?: any;
|
|
2052
|
+
processAffinity?: string;
|
|
2053
|
+
backgroundThrottling?: boolean;
|
|
2054
|
+
interop?: OpenFin.InteropConfig;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
// Error types
|
|
2058
|
+
export type ERROR_BOX_TYPES =
|
|
2059
|
+
| 'OF_error_box:app_initialization'
|
|
2060
|
+
| 'OF_error_box:main_process'
|
|
2061
|
+
| 'OF_error_box:renderer_crash';
|
|
2062
|
+
|
|
2063
|
+
export type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
|
|
2064
|
+
|
|
2065
|
+
export interface InitLayoutOptions {
|
|
2066
|
+
containerId?: string;
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
export interface PresetLayoutOptions {
|
|
2070
|
+
presetType: LayoutPresetType;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
export interface DragPayload {
|
|
2074
|
+
'view-config': OpenFin.ViewCreationOptions;
|
|
2075
|
+
'view-identity': [string, string, string]; // [componentState, uuid, name]
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
export interface Message<T> {
|
|
2079
|
+
action: string;
|
|
2080
|
+
payload: T;
|
|
2081
|
+
correlationId?: number;
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
export interface EventMessage extends Message<RuntimeEvent> {
|
|
2085
|
+
action: 'process-desktop-event';
|
|
2086
|
+
payload: RuntimeEvent;
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
export interface Payload {
|
|
2090
|
+
success: boolean;
|
|
2091
|
+
data: any;
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
export interface AuthorizationPayload {
|
|
2095
|
+
token: string;
|
|
2096
|
+
file: string;
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
/*
|
|
2100
|
+
To Add an api call:
|
|
2101
|
+
1. The action (string passed to wire.sendAction and key in the actionMap on the core side) should be the key in the protocolmap
|
|
2102
|
+
2. The request for that key is the interface of the second object passed to wire.sendAction, it will be picked up as message.payload in the handler
|
|
2103
|
+
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
|
|
2104
|
+
*/
|
|
2105
|
+
export interface ProtocolMap extends ProtocolMapBase {
|
|
2106
|
+
'request-external-authorization': {
|
|
2107
|
+
request: any;
|
|
2108
|
+
response: void;
|
|
2109
|
+
specialResponse: AuthorizationPayload;
|
|
2110
|
+
};
|
|
2111
|
+
'application-get-views': {
|
|
2112
|
+
request: OpenFin.ApplicationIdentity;
|
|
2113
|
+
response: OpenFin.Identity[];
|
|
2114
|
+
};
|
|
2115
|
+
'set-jump-list': {
|
|
2116
|
+
request: { config: OpenFin.JumpListCategory[] | null } & OpenFin.ApplicationIdentity;
|
|
2117
|
+
response: void;
|
|
2118
|
+
};
|
|
2119
|
+
'get-view-window': {
|
|
2120
|
+
request: OpenFin.Identity;
|
|
2121
|
+
response: OpenFin.Identity;
|
|
2122
|
+
};
|
|
2123
|
+
'window-get-views': {
|
|
2124
|
+
request: OpenFin.Identity;
|
|
2125
|
+
response: OpenFin.Identity[];
|
|
2126
|
+
};
|
|
2127
|
+
'hide-view': {
|
|
2128
|
+
request: OpenFin.Identity;
|
|
2129
|
+
response: void;
|
|
2130
|
+
};
|
|
2131
|
+
'launch-manifest': {
|
|
2132
|
+
request: { manifestUrl: string; opts?: OpenFin.RvmLaunchOptions };
|
|
2133
|
+
response: { manifest: OpenFin.Manifest };
|
|
2134
|
+
};
|
|
2135
|
+
'get-system-app-configuration': {
|
|
2136
|
+
request: { name: string };
|
|
2137
|
+
response: any;
|
|
2138
|
+
};
|
|
2139
|
+
'show-popup-menu': {
|
|
2140
|
+
request: OpenFin.Identity & { options: OpenFin.ShowPopupMenuOptions };
|
|
2141
|
+
response: OpenFin.MenuResult;
|
|
2142
|
+
};
|
|
2143
|
+
'enable-native-window-integration-provider': {
|
|
2144
|
+
request: { permissions: any };
|
|
2145
|
+
response: OpenFin.NativeWindowIntegrationProviderAuthorization;
|
|
2146
|
+
};
|
|
2147
|
+
'get-permissions': {
|
|
2148
|
+
request: void;
|
|
2149
|
+
response: any;
|
|
2150
|
+
};
|
|
2151
|
+
'set-file-download-location': {
|
|
2152
|
+
request: OpenFin.ApplicationIdentity & { downloadLocation: string };
|
|
2153
|
+
response: void;
|
|
2154
|
+
};
|
|
2155
|
+
'close-popup-menu': {
|
|
2156
|
+
request: OpenFin.Identity;
|
|
2157
|
+
response: void;
|
|
2158
|
+
};
|
|
2159
|
+
'fdc3-add-context-listener': {
|
|
2160
|
+
request: void;
|
|
2161
|
+
response: void;
|
|
2162
|
+
};
|
|
2163
|
+
'fdc3-broadcast': {
|
|
2164
|
+
request: void;
|
|
2165
|
+
response: void;
|
|
2166
|
+
};
|
|
2167
|
+
'fdc3-get-system-channels': {
|
|
2168
|
+
request: void;
|
|
2169
|
+
response: void;
|
|
2170
|
+
};
|
|
2171
|
+
'fdc3-join-channel': {
|
|
2172
|
+
request: void;
|
|
2173
|
+
response: void;
|
|
2174
|
+
};
|
|
2175
|
+
'fdc3-leave-current-channel': {
|
|
2176
|
+
request: void;
|
|
2177
|
+
response: void;
|
|
2178
|
+
};
|
|
2179
|
+
'interop-connect-sync': {
|
|
2180
|
+
request: void;
|
|
2181
|
+
response: void;
|
|
2182
|
+
};
|
|
2183
|
+
'interop-client-set-context': {
|
|
2184
|
+
request: void;
|
|
2185
|
+
response: void;
|
|
2186
|
+
};
|
|
2187
|
+
'interop-client-add-context-handler': {
|
|
2188
|
+
request: void;
|
|
2189
|
+
response: void;
|
|
2190
|
+
};
|
|
2191
|
+
'interop-client-get-context-groups': {
|
|
2192
|
+
request: void;
|
|
2193
|
+
response: void;
|
|
2194
|
+
};
|
|
2195
|
+
'interop-client-join-context-group': {
|
|
2196
|
+
request: void;
|
|
2197
|
+
response: void;
|
|
2198
|
+
};
|
|
2199
|
+
'interop-client-remove-from-context-group': {
|
|
2200
|
+
request: void;
|
|
2201
|
+
response: void;
|
|
2202
|
+
};
|
|
2203
|
+
'interop-client-get-all-clients-in-context-group': {
|
|
2204
|
+
request: void;
|
|
2205
|
+
response: void;
|
|
2206
|
+
};
|
|
2207
|
+
'interop-client-get-info-for-context-group': {
|
|
2208
|
+
request: void;
|
|
2209
|
+
response: void;
|
|
2210
|
+
};
|
|
2211
|
+
'interop-broker-add-client-to-context-group': {
|
|
2212
|
+
request: void;
|
|
2213
|
+
response: void;
|
|
2214
|
+
};
|
|
2215
|
+
'interop-broker-get-all-clients-in-context-group': {
|
|
2216
|
+
request: void;
|
|
2217
|
+
response: void;
|
|
2218
|
+
};
|
|
2219
|
+
'interop-broker-get-context-groups': {
|
|
2220
|
+
request: void;
|
|
2221
|
+
response: void;
|
|
2222
|
+
};
|
|
2223
|
+
'interop-broker-get-info-for-context-group': {
|
|
2224
|
+
request: void;
|
|
2225
|
+
response: void;
|
|
2226
|
+
};
|
|
2227
|
+
'interop-broker-is-action-authorized': {
|
|
2228
|
+
request: void;
|
|
2229
|
+
response: void;
|
|
2230
|
+
};
|
|
2231
|
+
'interop-broker-is-connection-authorized': {
|
|
2232
|
+
request: void;
|
|
2233
|
+
response: void;
|
|
2234
|
+
};
|
|
2235
|
+
'interop-broker-join-context-group': {
|
|
2236
|
+
request: void;
|
|
2237
|
+
response: void;
|
|
2238
|
+
};
|
|
2239
|
+
'interop-broker-remove-client-from-context-group': {
|
|
2240
|
+
request: void;
|
|
2241
|
+
response: void;
|
|
2242
|
+
};
|
|
2243
|
+
'interop-broker-remove-from-context-group': {
|
|
2244
|
+
request: void;
|
|
2245
|
+
response: void;
|
|
2246
|
+
};
|
|
2247
|
+
'interop-broker-set-context': {
|
|
2248
|
+
request: void;
|
|
2249
|
+
response: void;
|
|
2250
|
+
};
|
|
2251
|
+
'query-permission-for-current-context': {
|
|
2252
|
+
request: { apiName: string; identity: OpenFin.Identity };
|
|
2253
|
+
response: OpenFin.QueryPermissionResult;
|
|
2254
|
+
};
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
interface ProtocolMapBase {
|
|
2258
|
+
[action: string]: {
|
|
2259
|
+
request: any;
|
|
2260
|
+
response: any;
|
|
2261
|
+
specialResponse?: any; // Used for anything not on payload.data (only request-external-authorization for now)
|
|
2262
|
+
};
|
|
2263
|
+
}
|
|
2264
|
+
|
|
2265
|
+
export type MessageHandler = (data: any) => boolean;
|
|
2266
|
+
|
|
2267
|
+
export interface ViewState extends OpenFin.ViewCreationOptions {
|
|
2268
|
+
url: string;
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
export interface OsConfig {
|
|
2272
|
+
manifestLocation: string;
|
|
2273
|
+
namedPipeName: string;
|
|
2274
|
+
urlPath: string;
|
|
2275
|
+
executablePath: string;
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
export interface Wire extends EventEmitter {
|
|
2279
|
+
connect(address: string): Promise<any>;
|
|
2280
|
+
connectSync(): any;
|
|
2281
|
+
send(data: any): Promise<any>;
|
|
2282
|
+
shutdown(): Promise<void>;
|
|
2283
|
+
}
|
|
2284
|
+
export interface WireConstructor {
|
|
2285
|
+
new (onmessage: (data: any) => void): Wire;
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
export interface RuntimeConfig {
|
|
2289
|
+
version: string;
|
|
2290
|
+
fallbackVersion?: string;
|
|
2291
|
+
securityRealm?: string;
|
|
2292
|
+
verboseLogging?: boolean;
|
|
2293
|
+
arguments?: string;
|
|
2294
|
+
rvmDir?: string;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
export interface ServiceConfig {
|
|
2298
|
+
name: string;
|
|
2299
|
+
manifestUrl: string;
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
export interface BaseConfig {
|
|
2303
|
+
uuid?: string;
|
|
2304
|
+
address?: string;
|
|
2305
|
+
name?: string;
|
|
2306
|
+
nonPersistent?: boolean;
|
|
2307
|
+
runtimeClient?: boolean;
|
|
2308
|
+
licenseKey?: string;
|
|
2309
|
+
client?: any;
|
|
2310
|
+
manifestUrl?: string;
|
|
2311
|
+
startupApp?: any;
|
|
2312
|
+
lrsUrl?: string;
|
|
2313
|
+
assetsUrl?: string;
|
|
2314
|
+
devToolsPort?: number;
|
|
2315
|
+
installerUI?: boolean;
|
|
2316
|
+
runtime?: RuntimeConfig;
|
|
2317
|
+
services?: ServiceConfig[];
|
|
2318
|
+
appAssets?: [
|
|
2319
|
+
{
|
|
2320
|
+
src: string;
|
|
2321
|
+
alias: string;
|
|
2322
|
+
target: string;
|
|
2323
|
+
version: string;
|
|
2324
|
+
args: string;
|
|
2325
|
+
}
|
|
2326
|
+
];
|
|
2327
|
+
customItems?: [any];
|
|
2328
|
+
timeout?: number; // in seconds
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
export interface ConfigWithUuid extends BaseConfig {
|
|
2332
|
+
uuid: string;
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
export interface ExistingConnectConfig extends ConfigWithUuid {
|
|
2336
|
+
address: string;
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
export interface ConfigWithRuntime extends BaseConfig {
|
|
2340
|
+
runtime: RuntimeConfig;
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
export interface ExternalConfig extends BaseConfig {
|
|
2344
|
+
manifestUrl: string;
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
export type NewConnectConfig = ConfigWithUuid & ConfigWithRuntime;
|
|
2348
|
+
|
|
2349
|
+
export type PortDiscoveryConfig = (ExternalConfig & ConfigWithRuntime) | NewConnectConfig;
|
|
2350
|
+
|
|
2351
|
+
export type ConnectConfig = ExistingConnectConfig | NewConnectConfig | ExternalConfig;
|
|
2352
|
+
|
|
2353
|
+
export type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
|
|
2354
|
+
|
|
2355
|
+
export type ReadyState = // https://github.com/websockets/ws/blob/master/doc/ws.md#ready-state-constants
|
|
2356
|
+
| 'CONNECTING' // The connection is not yet open.
|
|
2357
|
+
| 'OPEN' // The connection is open and ready to communicate.
|
|
2358
|
+
| 'CLOSING' // The connection is in the process of closing.
|
|
2359
|
+
| 'CLOSED'; // The connection is closed.
|
|
2360
|
+
|
|
2361
|
+
export interface ChildContentOptions {
|
|
2362
|
+
options: any;
|
|
2363
|
+
entityType: EntityType;
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
export interface ErrorPlainObject {
|
|
2367
|
+
stack: string;
|
|
2368
|
+
message: string;
|
|
2369
|
+
toString(): string;
|
|
2370
|
+
}
|
|
1340
2371
|
}
|