@openfin/fdc3-api 36.78.8
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/LICENSE.md +3 -0
- package/README.md +13 -0
- package/out/fdc3-api-alpha.d.ts +1241 -0
- package/out/fdc3-api-beta.d.ts +1241 -0
- package/out/fdc3-api-public.d.ts +1241 -0
- package/out/fdc3-api.d.ts +1247 -0
- package/out/fdc3-api.js +2165 -0
- package/out/fdc3-api.mjs +2163 -0
- package/package.json +43 -0
|
@@ -0,0 +1,1247 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
|
|
3
|
+
import { EventEmitter } from 'events';
|
|
4
|
+
|
|
5
|
+
declare type ApiCall<Request, Response> = {
|
|
6
|
+
request: Request;
|
|
7
|
+
response: Response;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
declare interface AuthorizationPayload {
|
|
11
|
+
token: string;
|
|
12
|
+
file: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare class Base {
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
wire: Transport;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
constructor(wire: Transport);
|
|
24
|
+
protected get fin(): OpenFin.Fin<OpenFin.EntityType>;
|
|
25
|
+
/**
|
|
26
|
+
* Provides access to the OpenFin representation of the current code context (usually a document
|
|
27
|
+
* such as a {@link OpenFin.View} or {@link OpenFin.Window}), as well as to the current `Interop` context.
|
|
28
|
+
*
|
|
29
|
+
* Useful for debugging in the devtools console, where this will intelligently type itself based
|
|
30
|
+
* on the context in which the devtools panel was opened.
|
|
31
|
+
*/
|
|
32
|
+
get me(): Identity;
|
|
33
|
+
protected isNodeEnvironment: () => boolean;
|
|
34
|
+
protected isOpenFinEnvironment: () => boolean;
|
|
35
|
+
protected isBrowserEnvironment: () => boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare type BaseConfig = {
|
|
39
|
+
uuid?: string;
|
|
40
|
+
address?: string;
|
|
41
|
+
name?: string;
|
|
42
|
+
nonPersistent?: boolean;
|
|
43
|
+
runtimeClient?: boolean;
|
|
44
|
+
licenseKey?: string;
|
|
45
|
+
client?: any;
|
|
46
|
+
manifestUrl?: string;
|
|
47
|
+
startupApp?: any;
|
|
48
|
+
lrsUrl?: string;
|
|
49
|
+
assetsUrl?: string;
|
|
50
|
+
devToolsPort?: number;
|
|
51
|
+
installerUI?: boolean;
|
|
52
|
+
runtime?: RuntimeConfig;
|
|
53
|
+
services?: ServiceConfig[];
|
|
54
|
+
appAssets?: [
|
|
55
|
+
{
|
|
56
|
+
src: string;
|
|
57
|
+
alias: string;
|
|
58
|
+
target: string;
|
|
59
|
+
version: string;
|
|
60
|
+
args: string;
|
|
61
|
+
}
|
|
62
|
+
];
|
|
63
|
+
customItems?: [any];
|
|
64
|
+
timeout?: number;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
declare interface ChildContentOptions {
|
|
68
|
+
options: any;
|
|
69
|
+
entityType: EntityType_3;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
declare type ConfigWithRuntime = BaseConfig & {
|
|
73
|
+
runtime: RuntimeConfig;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
declare type ConfigWithUuid = BaseConfig & {
|
|
77
|
+
uuid: string;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
declare type DataChannelReadyState = RTCDataChannel['readyState'];
|
|
81
|
+
|
|
82
|
+
declare type EmitterAccessor = string[];
|
|
83
|
+
|
|
84
|
+
declare class EmitterMap {
|
|
85
|
+
private storage;
|
|
86
|
+
constructor();
|
|
87
|
+
private hashKeys;
|
|
88
|
+
getOrCreate(keys: EmitterAccessor): EventEmitter;
|
|
89
|
+
has(keys: EmitterAccessor): boolean;
|
|
90
|
+
delete(keys: EmitterAccessor): boolean;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
declare type EntityType = OpenFin.EntityType;
|
|
94
|
+
|
|
95
|
+
declare type EntityType_2 = OpenFin.EntityType;
|
|
96
|
+
|
|
97
|
+
declare type EntityType_3 = OpenFin.EntityType;
|
|
98
|
+
|
|
99
|
+
declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
|
|
100
|
+
isView: true;
|
|
101
|
+
isWindow: false;
|
|
102
|
+
isExternal: false;
|
|
103
|
+
isFrame: false;
|
|
104
|
+
} : T extends 'window' ? {
|
|
105
|
+
isView: false;
|
|
106
|
+
isWindow: true;
|
|
107
|
+
isExternal: false;
|
|
108
|
+
isFrame: false;
|
|
109
|
+
} : T extends 'iframe' ? {
|
|
110
|
+
isView: false;
|
|
111
|
+
isWindow: false;
|
|
112
|
+
isExternal: false;
|
|
113
|
+
isFrame: true;
|
|
114
|
+
} : T extends 'external connection' ? {
|
|
115
|
+
isView: false;
|
|
116
|
+
isWindow: false;
|
|
117
|
+
isExternal: true;
|
|
118
|
+
isFrame: false;
|
|
119
|
+
} : T extends 'unknown' ? {
|
|
120
|
+
isView: false;
|
|
121
|
+
isWindow: false;
|
|
122
|
+
isExternal: false;
|
|
123
|
+
isFrame: false;
|
|
124
|
+
} : never;
|
|
125
|
+
|
|
126
|
+
declare interface Environment {
|
|
127
|
+
initLayoutManager(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
|
|
128
|
+
createLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, options: OpenFin.CreateLayoutOptions): Promise<void>;
|
|
129
|
+
destroyLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<void>;
|
|
130
|
+
resolveLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<any>;
|
|
131
|
+
initPlatform(fin: OpenFin.Fin<OpenFin.EntityType>, ...args: Parameters<OpenFin.Fin['Platform']['init']>): ReturnType<OpenFin.Fin['Platform']['init']>;
|
|
132
|
+
observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
|
|
133
|
+
writeToken(path: string, token: string): Promise<string>;
|
|
134
|
+
retrievePort(config: NewConnectConfig): Promise<number>;
|
|
135
|
+
getNextMessageId(): any;
|
|
136
|
+
getRandomId(): string;
|
|
137
|
+
createChildContent(options: ChildContentOptions): Promise<any>;
|
|
138
|
+
getWebWindow(identity: OpenFin.Identity): globalThis.Window;
|
|
139
|
+
getCurrentEntityIdentity(): OpenFin.EntityInfo;
|
|
140
|
+
getCurrentEntityType(): EntityType_3;
|
|
141
|
+
raiseEvent(eventName: string, eventArgs: any): void;
|
|
142
|
+
childViews: boolean;
|
|
143
|
+
getUrl(): string;
|
|
144
|
+
getDefaultChannelOptions(): {
|
|
145
|
+
create: OpenFin.ChannelCreateOptions;
|
|
146
|
+
connect: OpenFin.ChannelConnectOptions;
|
|
147
|
+
};
|
|
148
|
+
getRtcPeer(): RTCPeerConnection;
|
|
149
|
+
getWsConstructor(): typeof WebSocket;
|
|
150
|
+
whenReady(): Promise<void>;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* This function converts JS errors into plain objects
|
|
155
|
+
*/
|
|
156
|
+
declare type ErrorPlainObject = {
|
|
157
|
+
stack?: string;
|
|
158
|
+
message: string;
|
|
159
|
+
name?: string;
|
|
160
|
+
toString(): string;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
declare class EventAggregator extends EmitterMap {
|
|
164
|
+
dispatchEvent: (message: Message<any>) => boolean;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare type ExistingConnectConfig = ConfigWithUuid & {
|
|
168
|
+
address: string;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export declare function fdc3FromFin(fin: OpenFin.Fin<OpenFin.EntityType>, version?: Fdc3Version): Promise<Fdc3Module | Fdc3Module2>;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* @version 1.2
|
|
175
|
+
* The FDC3 Client Library provides a set APIs to be used for FDC3 compliance,
|
|
176
|
+
* while using our Interop API under the hood. In order to use this set of APIs
|
|
177
|
+
* you will need to set up your own {@link InteropBroker InteropBroker} or use a Platform application, which does the setup for you. Refer to our documentation on
|
|
178
|
+
* our {@link https://developers.openfin.co/of-docs/docs/enable-color-linking Interop API}.
|
|
179
|
+
*
|
|
180
|
+
* To enable the FDC3 APIs in a {@link Window Window} or {@link View View}, add the fdc3InteropApi
|
|
181
|
+
* property to its options:
|
|
182
|
+
*
|
|
183
|
+
* ```js
|
|
184
|
+
* {
|
|
185
|
+
* autoShow: false,
|
|
186
|
+
* saveWindowState: true,
|
|
187
|
+
* url: 'https://openfin.co',
|
|
188
|
+
* fdc3InteropApi: '1.2'
|
|
189
|
+
* }
|
|
190
|
+
* ```
|
|
191
|
+
*
|
|
192
|
+
* If using a {@link Platform Platform } application, you can set this property in defaultWindowOptions and defaultViewOptions.
|
|
193
|
+
*
|
|
194
|
+
* In order to ensure that the FDC3 Api is ready before use, you can use the 'fdc3Ready' event fired on the DOM Window object:
|
|
195
|
+
*
|
|
196
|
+
* ```js
|
|
197
|
+
* function fdc3Action() {
|
|
198
|
+
* // Make some fdc3 API calls here
|
|
199
|
+
* }
|
|
200
|
+
*
|
|
201
|
+
* if (window.fdc3) {
|
|
202
|
+
* fdc3Action();
|
|
203
|
+
* } else {
|
|
204
|
+
* window.addEventListener('fdc3Ready', fdc3Action);
|
|
205
|
+
* }
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
export declare class Fdc3Module extends Base implements v1.DesktopAgent {
|
|
209
|
+
/**
|
|
210
|
+
* Add a context handler for incoming context. If an entity is part of a context group, and then sets its context handler, it will receive all of its declared contexts. If you wish to listen for all incoming contexts, pass `null` for the contextType argument.
|
|
211
|
+
* @param contextType - The type of context you wish to handle.
|
|
212
|
+
* @param handler - Handler for incoming context.
|
|
213
|
+
*
|
|
214
|
+
* @tutorial fdc3.addContextListener
|
|
215
|
+
* @static
|
|
216
|
+
*/
|
|
217
|
+
addContextListener(contextType: string | null, handler: v1.ContextHandler): v1.Listener & Promise<v1.Listener>;
|
|
218
|
+
/**
|
|
219
|
+
* Broadcasts a context for the channel of the current entity.
|
|
220
|
+
* @param context - New context to set.
|
|
221
|
+
*
|
|
222
|
+
* @tutorial fdc3.broadcast
|
|
223
|
+
* @static
|
|
224
|
+
*/
|
|
225
|
+
broadcast(context: v1.Context): Promise<void>;
|
|
226
|
+
/**
|
|
227
|
+
* Returns the Interop-Broker-defined context groups available for an entity to join.
|
|
228
|
+
*
|
|
229
|
+
* @tutorial fdc3.getSystemChannels
|
|
230
|
+
* @static
|
|
231
|
+
*/
|
|
232
|
+
getSystemChannels(): Promise<v1.SystemChannel[]>;
|
|
233
|
+
/**
|
|
234
|
+
* Join all Interop Clients at the given identity to context group `contextGroupId`.
|
|
235
|
+
* If no target is specified, it adds the sender to the context group.
|
|
236
|
+
* Because multiple Channel connections/Interop Clients can potentially exist at a `uuid`/`name` combo, we currently join all Channel connections/Interop Clients at the given identity to the context group.
|
|
237
|
+
* If an `endpointId` is provided (which is unlikely, unless the call is coming from an external adapter), then we only join that single connection to the context group.
|
|
238
|
+
* For all intents and purposes, there will only be 1 connection present in Platform and Browser implementations, so this point is more-or-less moot.
|
|
239
|
+
* @param channelId - Id of the context group.
|
|
240
|
+
*
|
|
241
|
+
* @tutorial fdc3.joinChannel
|
|
242
|
+
* @static
|
|
243
|
+
*/
|
|
244
|
+
joinChannel(channelId: string): Promise<void>;
|
|
245
|
+
/**
|
|
246
|
+
* Removes the specified target from a context group.
|
|
247
|
+
* If no target is specified, it removes the sender from their context group.
|
|
248
|
+
*
|
|
249
|
+
* @tutorial fdc3.leaveCurrentChannel
|
|
250
|
+
* @static
|
|
251
|
+
*/
|
|
252
|
+
leaveCurrentChannel(): Promise<void>;
|
|
253
|
+
/**
|
|
254
|
+
* Adds a listener for incoming Intents.
|
|
255
|
+
* @param intent - Name of the Intent
|
|
256
|
+
* @param handler - Handler for incoming Intent
|
|
257
|
+
*
|
|
258
|
+
* @tutorial fdc3.addIntentListener
|
|
259
|
+
* @static
|
|
260
|
+
*/
|
|
261
|
+
addIntentListener(intent: string, handler: v1.ContextHandler): v1.Listener & Promise<v1.Listener>;
|
|
262
|
+
/**
|
|
263
|
+
* Raises a specific intent.
|
|
264
|
+
* @param intent Name of the Intent.
|
|
265
|
+
* @param context Context associated with the Intent.
|
|
266
|
+
* @param app App that will resolve the Intent. This is added as metadata to the Intent. Can be accessed by the app provider in {@link InteropBroker#handleFiredIntent InteropBroker.handleFiredIntent}.
|
|
267
|
+
*
|
|
268
|
+
* @tutorial fdc3.raiseIntent
|
|
269
|
+
* @static
|
|
270
|
+
*/
|
|
271
|
+
raiseIntent(intent: string, context: v1.Context, app?: v1.TargetApp): Promise<v1.IntentResolution>;
|
|
272
|
+
/**
|
|
273
|
+
* Returns the Channel that the entity is subscribed to. Returns null if not joined to a channel.
|
|
274
|
+
*
|
|
275
|
+
* @tutorial fdc3.getCurrentChannel
|
|
276
|
+
*/
|
|
277
|
+
getCurrentChannel(): Promise<v1.Channel | null>;
|
|
278
|
+
/**
|
|
279
|
+
* Find out more information about a particular intent by passing its name, and optionally its context.
|
|
280
|
+
* @param intent Name of the Intent
|
|
281
|
+
* @param context
|
|
282
|
+
*
|
|
283
|
+
* @tutorial fdc3.findIntent
|
|
284
|
+
*/
|
|
285
|
+
findIntent(intent: string, context?: v1.Context): Promise<v1.AppIntent>;
|
|
286
|
+
/**
|
|
287
|
+
* Find all the available intents for a particular context.
|
|
288
|
+
* @param context
|
|
289
|
+
*
|
|
290
|
+
* @tutorial fdc3.findIntentsByContext
|
|
291
|
+
*/
|
|
292
|
+
findIntentsByContext(context: v1.Context): Promise<Array<v1.AppIntent>>;
|
|
293
|
+
/**
|
|
294
|
+
* Finds and raises an intent against a target app based purely on context data.
|
|
295
|
+
* @param context
|
|
296
|
+
* @param app
|
|
297
|
+
*
|
|
298
|
+
* @tutorial fdc3.raiseIntentForContext
|
|
299
|
+
*/
|
|
300
|
+
raiseIntentForContext(context: v1.Context, app?: v1.TargetApp): Promise<v1.IntentResolution>;
|
|
301
|
+
/**
|
|
302
|
+
* Returns a Channel object for the specified channel, creating it as an App Channel if it does not exist.
|
|
303
|
+
* @param channelId
|
|
304
|
+
*
|
|
305
|
+
* @tutorial fdc3.getOrCreateChannel
|
|
306
|
+
*/
|
|
307
|
+
getOrCreateChannel(channelId: string): Promise<v1.Channel>;
|
|
308
|
+
/**
|
|
309
|
+
* Returns metadata relating to the FDC3 object and its provider, including the supported version of the FDC3 specification and the name of the provider of the implementation.
|
|
310
|
+
*
|
|
311
|
+
* @tutorial fdc3.getInfo
|
|
312
|
+
*/
|
|
313
|
+
getInfo(): v1.ImplementationMetadata;
|
|
314
|
+
/**
|
|
315
|
+
* Launches an app with target information, which can either be a string or an AppMetadata object.
|
|
316
|
+
* @param app
|
|
317
|
+
* @param context
|
|
318
|
+
*
|
|
319
|
+
* @tutorial fdc3.open
|
|
320
|
+
*/
|
|
321
|
+
open(app: v1.TargetApp, context?: v1.Context): Promise<void>;
|
|
322
|
+
private getCurrentContextGroupInfo;
|
|
323
|
+
private buildChannelObject;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* @version 2.0
|
|
328
|
+
* The FDC3 Client Library provides a set APIs to be used for FDC3 compliance,
|
|
329
|
+
* while using our Interop API under the hood. In order to use this set of APIs
|
|
330
|
+
* you will need to set up your own {@link InteropBroker InteropBroker} or use a Platform application, which does the setup for you. Refer to our documentation on
|
|
331
|
+
* our {@link https://developers.openfin.co/of-docs/docs/enable-context-sharing Interop API}.
|
|
332
|
+
*
|
|
333
|
+
* To enable the FDC3 APIs in a {@link Window Window} or {@link View View}, add the fdc3InteropApi
|
|
334
|
+
* property to its options:
|
|
335
|
+
*
|
|
336
|
+
* ```js
|
|
337
|
+
* {
|
|
338
|
+
* autoShow: false,
|
|
339
|
+
* saveWindowState: true,
|
|
340
|
+
* url: 'https://openfin.co',
|
|
341
|
+
* fdc3InteropApi: '2.0'
|
|
342
|
+
* }
|
|
343
|
+
* ```
|
|
344
|
+
*
|
|
345
|
+
* If using a {@link Platform Platform } application, you can set this property in defaultWindowOptions and defaultViewOptions.
|
|
346
|
+
*
|
|
347
|
+
* In order to ensure that the FDC3 Api is ready before use, you can use the 'fdc3Ready' event fired on the DOM Window object:
|
|
348
|
+
*
|
|
349
|
+
* ```js
|
|
350
|
+
* function fdc3Action() {
|
|
351
|
+
* // Make some fdc3 API calls here
|
|
352
|
+
* }
|
|
353
|
+
*
|
|
354
|
+
* if (window.fdc3) {
|
|
355
|
+
* fdc3Action();
|
|
356
|
+
* } else {
|
|
357
|
+
* window.addEventListener('fdc3Ready', fdc3Action);
|
|
358
|
+
* }
|
|
359
|
+
* ```
|
|
360
|
+
*/
|
|
361
|
+
export declare class Fdc3Module2 extends Base implements v2.DesktopAgent {
|
|
362
|
+
private fdc3Module;
|
|
363
|
+
constructor(wire: Transport);
|
|
364
|
+
/**
|
|
365
|
+
* Launches an app, specified via an AppIdentifier object.
|
|
366
|
+
* @param app
|
|
367
|
+
* @param context
|
|
368
|
+
*
|
|
369
|
+
* @tutorial fdc3.open
|
|
370
|
+
*/
|
|
371
|
+
open(app: v2.AppIdentifier | v1.TargetApp, context?: v2.Context): Promise<v2.AppIdentifier>;
|
|
372
|
+
/**
|
|
373
|
+
* Find all the available instances for a particular application.
|
|
374
|
+
* @param app
|
|
375
|
+
*
|
|
376
|
+
* @tutorial fdc3v2.findInstances
|
|
377
|
+
*/
|
|
378
|
+
findInstances(app: v2.AppIdentifier): Promise<Array<v2.AppIdentifier>>;
|
|
379
|
+
/**
|
|
380
|
+
* Retrieves the AppMetadata for an AppIdentifier, which provides additional metadata (such as icons, a title and description) from the App Directory record for the application, that may be used for display purposes.
|
|
381
|
+
* @param app
|
|
382
|
+
*
|
|
383
|
+
* @tutorial fdc3v2.getAppMetadata
|
|
384
|
+
*/
|
|
385
|
+
getAppMetadata(app: v2.AppIdentifier): Promise<v2.AppMetadata>;
|
|
386
|
+
/**
|
|
387
|
+
* Broadcasts a context for the channel of the current entity.
|
|
388
|
+
* @param context - New context to set.
|
|
389
|
+
*
|
|
390
|
+
* @tutorial fdc3.broadcast
|
|
391
|
+
*/
|
|
392
|
+
broadcast(context: v2.Context): Promise<void>;
|
|
393
|
+
/**
|
|
394
|
+
* Add a context handler for incoming context. If an entity is part of a context group, and then sets its context handler, it will receive all of its declared contexts. If you wish to listen for all incoming contexts, pass `null` for the contextType argument.
|
|
395
|
+
* @param contextType
|
|
396
|
+
* @param handler
|
|
397
|
+
*
|
|
398
|
+
* @tutorial fdc3.addContextListener
|
|
399
|
+
*/
|
|
400
|
+
addContextListener(contextType: string | null, handler: v2.ContextHandler): Promise<v2.Listener>;
|
|
401
|
+
/**
|
|
402
|
+
* Find out more information about a particular intent by passing its name, and optionally its context and resultType.
|
|
403
|
+
* @param intent Name of the Intent
|
|
404
|
+
* @param context Context
|
|
405
|
+
* @param resultType The type of result returned for any intent specified during resolution.
|
|
406
|
+
*
|
|
407
|
+
* @tutorial fdc3.findIntent
|
|
408
|
+
*/
|
|
409
|
+
findIntent(intent: string, context?: v2.Context, resultType?: string): Promise<v2.AppIntent>;
|
|
410
|
+
/**
|
|
411
|
+
* Find all the available intents for a particular context.
|
|
412
|
+
* @param context
|
|
413
|
+
* @param resultType The type of result returned for any intent specified during resolution.
|
|
414
|
+
*
|
|
415
|
+
* @tutorial fdc3v2.findIntentsByContext
|
|
416
|
+
*/
|
|
417
|
+
findIntentsByContext(context: v2.Context, resultType?: string): Promise<Array<v2.AppIntent>>;
|
|
418
|
+
/**
|
|
419
|
+
* Raises a specific intent for resolution against apps registered with the desktop agent.
|
|
420
|
+
* @param intent Name of the Intent
|
|
421
|
+
* @param context Context associated with the Intent
|
|
422
|
+
* @param app
|
|
423
|
+
*
|
|
424
|
+
* @tutorial fdc3v2.raiseIntent
|
|
425
|
+
*/
|
|
426
|
+
raiseIntent(intent: string, context: v2.Context, app?: v2.AppIdentifier | v1.TargetApp): Promise<v2.IntentResolution>;
|
|
427
|
+
/**
|
|
428
|
+
* Finds and raises an intent against apps registered with the desktop agent based purely on the type of the context data.
|
|
429
|
+
* @param context Context associated with the Intent
|
|
430
|
+
* @param app
|
|
431
|
+
*
|
|
432
|
+
* @tutorial fdc3v2.raiseIntentForContext
|
|
433
|
+
*/
|
|
434
|
+
raiseIntentForContext(context: v2.Context, app?: v2.AppIdentifier | v1.TargetApp): Promise<v2.IntentResolution>;
|
|
435
|
+
/**
|
|
436
|
+
* Adds a listener for incoming intents.
|
|
437
|
+
* @param intent Name of the Intent
|
|
438
|
+
* @param handler A callback that handles a context event and may return a promise of a Context or Channel object to be returned to the application that raised the intent.
|
|
439
|
+
*
|
|
440
|
+
* @tutorial fdc3.addIntentListener
|
|
441
|
+
*/
|
|
442
|
+
addIntentListener(intent: string, handler: v2.IntentHandler): Promise<v1.Listener>;
|
|
443
|
+
/**
|
|
444
|
+
* Returns a Channel object for the specified channel, creating it as an App Channel if it does not exist.
|
|
445
|
+
* @param channelId
|
|
446
|
+
*
|
|
447
|
+
* @tutorial fdc3.getOrCreateChannel
|
|
448
|
+
*/
|
|
449
|
+
getOrCreateChannel(channelId: string): Promise<v2.Channel>;
|
|
450
|
+
/**
|
|
451
|
+
* Returns a Channel with an auto-generated identity that is intended for private communication between applications. Primarily used to create channels that will be returned to other applications via an IntentResolution for a raised intent.
|
|
452
|
+
*
|
|
453
|
+
* @tutorial fdc3v2.createPrivateChannel
|
|
454
|
+
*/
|
|
455
|
+
createPrivateChannel(): Promise<v2.PrivateChannel>;
|
|
456
|
+
/**
|
|
457
|
+
* Retrieves a list of the User Channels available for the app to join.
|
|
458
|
+
*
|
|
459
|
+
* @tutorial fdc3v2.getUserChannels
|
|
460
|
+
*/
|
|
461
|
+
getUserChannels(): Promise<Array<v1.SystemChannel>>;
|
|
462
|
+
/**
|
|
463
|
+
* Retrieves a list of the User Channels available for the app to join.
|
|
464
|
+
*
|
|
465
|
+
* @deprecated Please use {@link fdc3.getUserChannels fdc3.getUserChannels} instead
|
|
466
|
+
* @tutorial fdc3.getSystemChannels
|
|
467
|
+
*/
|
|
468
|
+
getSystemChannels(): Promise<Array<v1.SystemChannel>>;
|
|
469
|
+
/**
|
|
470
|
+
* Join an app to a specified User channel.
|
|
471
|
+
* @param channelId Channel name
|
|
472
|
+
*
|
|
473
|
+
* @tutorial fdc3v2.joinUserChannel
|
|
474
|
+
*/
|
|
475
|
+
joinUserChannel(channelId: string): Promise<void>;
|
|
476
|
+
/**
|
|
477
|
+
* Join an app to a specified User channel.
|
|
478
|
+
* @param channelId Channel name
|
|
479
|
+
* @deprecated Please use {@link fdc3.joinUserChannel fdc3.joinUserChannel} instead
|
|
480
|
+
*
|
|
481
|
+
* @tutorial fdc3.joinChannel
|
|
482
|
+
*/
|
|
483
|
+
joinChannel(channelId: string): Promise<void>;
|
|
484
|
+
/**
|
|
485
|
+
* Returns the Channel object for the current User channel membership
|
|
486
|
+
*
|
|
487
|
+
* @tutorial fdc3.getCurrentChannel
|
|
488
|
+
*/
|
|
489
|
+
getCurrentChannel(): Promise<v2.Channel | null>;
|
|
490
|
+
/**
|
|
491
|
+
* Removes the app from any User channel membership.
|
|
492
|
+
*
|
|
493
|
+
* @tutorial fdc3.leaveCurrentChannel
|
|
494
|
+
*/
|
|
495
|
+
leaveCurrentChannel(): Promise<void>;
|
|
496
|
+
/**
|
|
497
|
+
* Retrieves information about the FDC3 implementation, including the supported version of the FDC3 specification, the name of the provider of the implementation, its own version number, details of whether optional API features are implemented and the metadata of the calling application according to the desktop agent.
|
|
498
|
+
* fdc3HandleGetInfo must be overridden in the InteropBroker so that the ImplementationMetadata will have the appMetadata info.
|
|
499
|
+
*
|
|
500
|
+
* @tutorial fdc3v2.getInfo
|
|
501
|
+
*/
|
|
502
|
+
getInfo(): Promise<v2.ImplementationMetadata>;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
export declare type Fdc3Version = '1.2' | '2.0';
|
|
506
|
+
|
|
507
|
+
declare type FlexReadyState = WebSocketReadyState | DataChannelReadyState;
|
|
508
|
+
|
|
509
|
+
declare type GetterCall<T> = ApiCall<void, T>;
|
|
510
|
+
|
|
511
|
+
declare type Identity = OpenFin.Identity;
|
|
512
|
+
|
|
513
|
+
declare type IdentityCall<AdditionalPayload = {}, Response = void> = ApiCall<AdditionalPayload & OpenFin.Identity, Response>;
|
|
514
|
+
|
|
515
|
+
declare type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
|
|
516
|
+
|
|
517
|
+
declare interface Message<T> {
|
|
518
|
+
action: string;
|
|
519
|
+
payload: T;
|
|
520
|
+
correlationId?: number;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
declare type MessageHandler = (data: any) => boolean;
|
|
524
|
+
|
|
525
|
+
declare interface MessageReceiver {
|
|
526
|
+
addEventListener(e: 'open', listener: (ev: Event) => void): void;
|
|
527
|
+
addEventListener(e: 'error', listener: (ev: Event) => void): void;
|
|
528
|
+
addEventListener(e: 'message', listener: (ev: MessageEvent) => void): void;
|
|
529
|
+
addEventListener(e: 'close', listener: (ev: Event) => void): void;
|
|
530
|
+
send(data: unknown): void;
|
|
531
|
+
close(): void;
|
|
532
|
+
readyState: FlexReadyState;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
|
|
536
|
+
|
|
537
|
+
declare type NewConnectConfig = ConfigWithUuid & ConfigWithRuntime;
|
|
538
|
+
|
|
539
|
+
declare namespace OpenFin {
|
|
540
|
+
{
|
|
541
|
+
FinApi,
|
|
542
|
+
Fin,
|
|
543
|
+
Application,
|
|
544
|
+
ApplicationModule,
|
|
545
|
+
ExternalApplication,
|
|
546
|
+
ExternalApplicationModule,
|
|
547
|
+
_Frame as Frame,
|
|
548
|
+
_FrameModule,
|
|
549
|
+
GlobalHotkey,
|
|
550
|
+
Channel,
|
|
551
|
+
ChannelClient,
|
|
552
|
+
ChannelProvider,
|
|
553
|
+
Platform,
|
|
554
|
+
PlatformModule,
|
|
555
|
+
Layout,
|
|
556
|
+
LayoutModule,
|
|
557
|
+
View_2 as View,
|
|
558
|
+
ViewModule,
|
|
559
|
+
ColumnOrRow,
|
|
560
|
+
TabStack,
|
|
561
|
+
_Window as Window,
|
|
562
|
+
_WindowModule,
|
|
563
|
+
InteropClient,
|
|
564
|
+
InteropBroker,
|
|
565
|
+
InteropModule,
|
|
566
|
+
SnapshotSource,
|
|
567
|
+
SnapshotSourceModule,
|
|
568
|
+
System,
|
|
569
|
+
LayoutEntityDefinition,
|
|
570
|
+
LayoutEntityTypes,
|
|
571
|
+
LayoutPosition,
|
|
572
|
+
WebContent,
|
|
573
|
+
PlatformProvider,
|
|
574
|
+
ApplicationIdentity_2 as ApplicationIdentity,
|
|
575
|
+
Identity_5 as Identity,
|
|
576
|
+
ClientIdentity,
|
|
577
|
+
ClientInfo,
|
|
578
|
+
ClientIdentityMultiRuntime,
|
|
579
|
+
ClientConnectionPayload,
|
|
580
|
+
EntityInfo_2 as EntityInfo,
|
|
581
|
+
EntityType_4 as EntityType,
|
|
582
|
+
Bounds,
|
|
583
|
+
WindowBounds,
|
|
584
|
+
Rectangle,
|
|
585
|
+
ApplicationCreationOptions,
|
|
586
|
+
ApplicationOptions,
|
|
587
|
+
CustomProtocolMissingState,
|
|
588
|
+
CustomProtocolMalformedState,
|
|
589
|
+
CustomProtocolRegisteredState,
|
|
590
|
+
CustomProtocolState,
|
|
591
|
+
CustomProtocolOptions,
|
|
592
|
+
InteropBrokerOptions,
|
|
593
|
+
ContextGroupInfo,
|
|
594
|
+
DisplayMetadata_3 as DisplayMetadata,
|
|
595
|
+
LegacyWinOptionsInAppOptions,
|
|
596
|
+
Snapshot,
|
|
597
|
+
ContextGroupStates,
|
|
598
|
+
Context_3 as Context,
|
|
599
|
+
MonitorInfo,
|
|
600
|
+
Point,
|
|
601
|
+
PointTopLeft,
|
|
602
|
+
RectangleByEdgePositions,
|
|
603
|
+
MonitorDetails,
|
|
604
|
+
DipRect,
|
|
605
|
+
DipScaleRects,
|
|
606
|
+
TaskBar,
|
|
607
|
+
WindowCreationOptions,
|
|
608
|
+
UpdatableWindowOptions,
|
|
609
|
+
WindowOptions,
|
|
610
|
+
ViewVisibilityOption,
|
|
611
|
+
ShowViewOnWindowResizeOptions,
|
|
612
|
+
ViewVisibilityOptions,
|
|
613
|
+
WindowState,
|
|
614
|
+
AutoplayPolicyOptions,
|
|
615
|
+
ConstWindowOptions,
|
|
616
|
+
MutableWindowOptions,
|
|
617
|
+
WorkspacePlatformOptions,
|
|
618
|
+
WebRequestHeader,
|
|
619
|
+
CustomRequestHeaders,
|
|
620
|
+
WindowOptionDiff,
|
|
621
|
+
ResizeRegion,
|
|
622
|
+
Accelerator,
|
|
623
|
+
Api,
|
|
624
|
+
InjectionType,
|
|
625
|
+
NavigationRules,
|
|
626
|
+
ContentNavigation,
|
|
627
|
+
ContentRedirect,
|
|
628
|
+
CornerRounding,
|
|
629
|
+
DownloadPreloadOption,
|
|
630
|
+
DownloadPreloadInfo,
|
|
631
|
+
RGB,
|
|
632
|
+
ContextMenuSettings,
|
|
633
|
+
Hotkey,
|
|
634
|
+
ShortcutOverride,
|
|
635
|
+
PreloadScript,
|
|
636
|
+
AutoResizeOptions,
|
|
637
|
+
InteropConfig,
|
|
638
|
+
ViewInfo,
|
|
639
|
+
UpdatableViewOptions,
|
|
640
|
+
ViewCreationOptions,
|
|
641
|
+
MutableViewOptions,
|
|
642
|
+
ViewOptions,
|
|
643
|
+
ConstViewOptions,
|
|
644
|
+
ViewState,
|
|
645
|
+
Certificate,
|
|
646
|
+
HostContextChangedPayload,
|
|
647
|
+
ApplySnapshotOptions,
|
|
648
|
+
ApplySnapshotPayload,
|
|
649
|
+
AddViewToStackOptions,
|
|
650
|
+
CreateViewTarget,
|
|
651
|
+
CreateViewPayload,
|
|
652
|
+
AddViewOptions,
|
|
653
|
+
ReplaceViewPayload,
|
|
654
|
+
ReplaceViewOptions,
|
|
655
|
+
CloseViewPayload,
|
|
656
|
+
CloseViewOptions,
|
|
657
|
+
FetchManifestPayload,
|
|
658
|
+
ReplaceLayoutOpts,
|
|
659
|
+
ReplaceLayoutPayload,
|
|
660
|
+
ReplaceLayoutOptions,
|
|
661
|
+
SetWindowContextPayload,
|
|
662
|
+
LaunchIntoPlatformPayload,
|
|
663
|
+
GetWindowContextPayload,
|
|
664
|
+
ApplicationPermissions,
|
|
665
|
+
LaunchExternalProcessRule,
|
|
666
|
+
SystemPermissions,
|
|
667
|
+
WebPermission,
|
|
668
|
+
VerboseWebPermission,
|
|
669
|
+
OpenExternalPermission,
|
|
670
|
+
DeviceInfo,
|
|
671
|
+
Permissions_2 as Permissions,
|
|
672
|
+
PlatformWindowCreationOptions,
|
|
673
|
+
PlatformWindowOptions,
|
|
674
|
+
PlatformViewCreationOptions,
|
|
675
|
+
ProcessAffinityStrategy,
|
|
676
|
+
PlatformOptions,
|
|
677
|
+
Manifest,
|
|
678
|
+
LayoutContent,
|
|
679
|
+
LayoutItemConfig,
|
|
680
|
+
LayoutRow,
|
|
681
|
+
LayoutColumn,
|
|
682
|
+
LayoutComponent,
|
|
683
|
+
LayoutOptions,
|
|
684
|
+
OverrideCallback,
|
|
685
|
+
ConstructorOverride,
|
|
686
|
+
Constructor,
|
|
687
|
+
HostContextChangedReasons,
|
|
688
|
+
WindowCreationReason,
|
|
689
|
+
InitPlatformOptions,
|
|
690
|
+
ProcessDetails,
|
|
691
|
+
FrameProcessDetails,
|
|
692
|
+
EntityProcessDetails,
|
|
693
|
+
AppProcessInfo,
|
|
694
|
+
NonAppProcessDetails,
|
|
695
|
+
SystemProcessInfo,
|
|
696
|
+
ClearCacheOption,
|
|
697
|
+
CookieInfo,
|
|
698
|
+
CookieOption,
|
|
699
|
+
CrashReporterOptions,
|
|
700
|
+
CrashReporterState,
|
|
701
|
+
Time,
|
|
702
|
+
CpuInfo,
|
|
703
|
+
GpuInfo,
|
|
704
|
+
HostSpecs,
|
|
705
|
+
PrinterInfo_2 as PrinterInfo,
|
|
706
|
+
Dpi,
|
|
707
|
+
Margins,
|
|
708
|
+
PrintOptions,
|
|
709
|
+
ScreenshotPrintOptions,
|
|
710
|
+
WindowViewsPrintOptions,
|
|
711
|
+
WindowPrintOptions,
|
|
712
|
+
ImageFormatOptions,
|
|
713
|
+
ClipboardSelectionType,
|
|
714
|
+
BaseClipboardRequest,
|
|
715
|
+
WriteClipboardRequest,
|
|
716
|
+
ReadImageClipboardRequest,
|
|
717
|
+
WriteImageClipboardRequest,
|
|
718
|
+
WriteAnyClipboardRequest,
|
|
719
|
+
WriteRequestType,
|
|
720
|
+
WriteAnyRequestType,
|
|
721
|
+
SubscriptionOptions,
|
|
722
|
+
SharedWorkerInfo,
|
|
723
|
+
ServiceIdentifier,
|
|
724
|
+
ServiceConfiguration,
|
|
725
|
+
RVMInfo,
|
|
726
|
+
AppVersionProgress,
|
|
727
|
+
AppVersionError,
|
|
728
|
+
AppVersionRuntimeInfo,
|
|
729
|
+
LaunchEmitter,
|
|
730
|
+
RvmLaunchOptions,
|
|
731
|
+
ShortCutConfig,
|
|
732
|
+
TerminateExternalRequestType,
|
|
733
|
+
TrayInfo,
|
|
734
|
+
Transition,
|
|
735
|
+
Size,
|
|
736
|
+
Opacity,
|
|
737
|
+
TransitionBase,
|
|
738
|
+
Position,
|
|
739
|
+
AnchorType,
|
|
740
|
+
TransitionOptions,
|
|
741
|
+
tween,
|
|
742
|
+
FindInPageOptions,
|
|
743
|
+
FindInPageResult,
|
|
744
|
+
FrameInfo,
|
|
745
|
+
ExternalApplicationInfo,
|
|
746
|
+
ExternalConnection,
|
|
747
|
+
ExternalProcessRequestType,
|
|
748
|
+
CertificationInfo,
|
|
749
|
+
ExitCode,
|
|
750
|
+
LaunchExternalProcessListener,
|
|
751
|
+
ExternalProcessInfo,
|
|
752
|
+
AppAssetInfo,
|
|
753
|
+
RuntimeDownloadOptions,
|
|
754
|
+
AppAssetRequest,
|
|
755
|
+
RuntimeDownloadProgress,
|
|
756
|
+
CertifiedAppInfo,
|
|
757
|
+
JumpListCategory,
|
|
758
|
+
JumpListItem,
|
|
759
|
+
JumpListTask,
|
|
760
|
+
JumpListSeparator,
|
|
761
|
+
ApplicationInfo,
|
|
762
|
+
ManifestInfo,
|
|
763
|
+
ClickedMenuResult,
|
|
764
|
+
ClosedMenuResult,
|
|
765
|
+
MenuResult,
|
|
766
|
+
ShowPopupMenuOptions,
|
|
767
|
+
ShowTrayIconPopupMenuOptions,
|
|
768
|
+
MenuItemTemplate,
|
|
769
|
+
NativeWindowIntegrationProviderAuthorization,
|
|
770
|
+
RuntimeInfo,
|
|
771
|
+
DefaultDomainSettings,
|
|
772
|
+
DefaultDomainSettingsRule,
|
|
773
|
+
DomainSettings,
|
|
774
|
+
ApiInjection,
|
|
775
|
+
DomainSettingsRule,
|
|
776
|
+
FileDownloadBehaviorNames,
|
|
777
|
+
FileDownloadSettings,
|
|
778
|
+
DownloadRule,
|
|
779
|
+
ContextHandler_3 as ContextHandler,
|
|
780
|
+
Intent_2 as Intent,
|
|
781
|
+
IntentMetadata_3 as IntentMetadata,
|
|
782
|
+
IntentHandler_2 as IntentHandler,
|
|
783
|
+
ContentCreationBehaviorNames,
|
|
784
|
+
MatchPattern,
|
|
785
|
+
BaseContentCreationRule,
|
|
786
|
+
WindowContentCreationRule,
|
|
787
|
+
ViewContentCreationRule,
|
|
788
|
+
BrowserContentCreationRule,
|
|
789
|
+
BlockedContentCreationRule,
|
|
790
|
+
ContentCreationRule,
|
|
791
|
+
ContentCreationOptions,
|
|
792
|
+
SnapshotProvider,
|
|
793
|
+
QueryPermissionResult,
|
|
794
|
+
SessionContextGroup,
|
|
795
|
+
MessagingProtocols,
|
|
796
|
+
ChannelCreateOptions,
|
|
797
|
+
ChannelConnectOptions,
|
|
798
|
+
ContextForIntent,
|
|
799
|
+
InfoForIntentOptions,
|
|
800
|
+
FindIntentsByContextOptions,
|
|
801
|
+
ProviderIdentity_7 as ProviderIdentity,
|
|
802
|
+
RegisterUsageData,
|
|
803
|
+
ViewsPreventingUnloadPayload,
|
|
804
|
+
BeforeUnloadUserDecision,
|
|
805
|
+
ViewStatuses,
|
|
806
|
+
CloseWindowPayload,
|
|
807
|
+
ProxyInfo_2 as ProxyInfo,
|
|
808
|
+
ProxyConfig_2 as ProxyConfig,
|
|
809
|
+
ProxySystemInfo,
|
|
810
|
+
ChannelAction_2 as ChannelAction,
|
|
811
|
+
ChannelMiddleware_2 as ChannelMiddleware,
|
|
812
|
+
ErrorMiddleware_2 as ErrorMiddleware,
|
|
813
|
+
ApplicationState_2 as ApplicationState,
|
|
814
|
+
InstalledApps_2 as InstalledApps,
|
|
815
|
+
InstallationInfo,
|
|
816
|
+
GetLogRequestType_2 as GetLogRequestType,
|
|
817
|
+
LogInfo_2 as LogInfo,
|
|
818
|
+
SendApplicationLogResponse,
|
|
819
|
+
LogLevel_2 as LogLevel,
|
|
820
|
+
PermissionState_2 as PermissionState,
|
|
821
|
+
RegistryInfo_2 as RegistryInfo,
|
|
822
|
+
ApplicationType,
|
|
823
|
+
WindowInfo,
|
|
824
|
+
ApplicationWindowInfo_2 as ApplicationWindowInfo,
|
|
825
|
+
WindowDetail,
|
|
826
|
+
LayoutPresetType,
|
|
827
|
+
LayoutIdentity,
|
|
828
|
+
LayoutSnapshot,
|
|
829
|
+
InitLayoutOptions,
|
|
830
|
+
LayoutManagerConstructor,
|
|
831
|
+
LayoutManagerOverride,
|
|
832
|
+
LayoutManager,
|
|
833
|
+
CreateLayoutOptions,
|
|
834
|
+
PresetLayoutOptions_2 as PresetLayoutOptions,
|
|
835
|
+
ResultBehavior,
|
|
836
|
+
PopupBaseBehavior,
|
|
837
|
+
PopupResultBehavior,
|
|
838
|
+
PopupBlurBehavior,
|
|
839
|
+
Optional,
|
|
840
|
+
PopupOptions,
|
|
841
|
+
PopupInteraction,
|
|
842
|
+
PopupResult,
|
|
843
|
+
SystemShutdownHandler,
|
|
844
|
+
AppVersionProgressEvent,
|
|
845
|
+
AppVersionErrorEvent,
|
|
846
|
+
AppVersionCompleteEvent,
|
|
847
|
+
AppVersionRuntimeStatusEvent,
|
|
848
|
+
Events,
|
|
849
|
+
BaseEvent_9 as BaseEvent,
|
|
850
|
+
WebContentsEvent_2 as WebContentsEvent,
|
|
851
|
+
SystemEvent_2 as SystemEvent,
|
|
852
|
+
ApplicationEvent_2 as ApplicationEvent,
|
|
853
|
+
WindowEvent_2 as WindowEvent,
|
|
854
|
+
ViewEvent_2 as ViewEvent,
|
|
855
|
+
GlobalHotkeyEvent_2 as GlobalHotkeyEvent,
|
|
856
|
+
FrameEvent_2 as FrameEvent,
|
|
857
|
+
PlatformEvent_2 as PlatformEvent,
|
|
858
|
+
ExternalApplicationEvent_2 as ExternalApplicationEvent,
|
|
859
|
+
ContextMenuOptions,
|
|
860
|
+
PrebuiltContextMenuItem,
|
|
861
|
+
InteropBrokerDisconnectionEvent,
|
|
862
|
+
InteropClientOnDisconnectionListener,
|
|
863
|
+
InteropActionLoggingOption,
|
|
864
|
+
InteropLoggingActions,
|
|
865
|
+
InteropLoggingOptions,
|
|
866
|
+
Me,
|
|
867
|
+
CapturePageOptions,
|
|
868
|
+
ProcessLoggingOptions,
|
|
869
|
+
PositioningOptions,
|
|
870
|
+
ChannelClientConnectionListener,
|
|
871
|
+
ChannelClientDisconnectionListener,
|
|
872
|
+
ChannelProviderDisconnectionListener,
|
|
873
|
+
RoutingInfo,
|
|
874
|
+
DownloadShelfOptions,
|
|
875
|
+
ApplicationEvents,
|
|
876
|
+
BaseEvents,
|
|
877
|
+
ExternalApplicationEvents,
|
|
878
|
+
FrameEvents,
|
|
879
|
+
GlobalHotkeyEvents,
|
|
880
|
+
PlatformEvents,
|
|
881
|
+
SystemEvents,
|
|
882
|
+
ViewEvents,
|
|
883
|
+
WebContentsEvents,
|
|
884
|
+
WindowEvents
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
declare type Payload<Success extends boolean = boolean, Data = any> = {
|
|
889
|
+
success: Success;
|
|
890
|
+
data: Success extends true ? Data : never;
|
|
891
|
+
reason: Success extends false ? string : never;
|
|
892
|
+
error?: Success extends false ? ErrorPlainObject | undefined : never;
|
|
893
|
+
};
|
|
894
|
+
|
|
895
|
+
declare interface ProtocolMap extends ProtocolMapBase {
|
|
896
|
+
'request-external-authorization': {
|
|
897
|
+
request: any;
|
|
898
|
+
response: void;
|
|
899
|
+
specialResponse: AuthorizationPayload;
|
|
900
|
+
};
|
|
901
|
+
'application-get-views': {
|
|
902
|
+
request: OpenFin.ApplicationIdentity;
|
|
903
|
+
response: OpenFin.Identity[];
|
|
904
|
+
};
|
|
905
|
+
'set-jump-list': {
|
|
906
|
+
request: {
|
|
907
|
+
config: OpenFin.JumpListCategory[] | null;
|
|
908
|
+
} & OpenFin.ApplicationIdentity;
|
|
909
|
+
response: void;
|
|
910
|
+
};
|
|
911
|
+
'clipboard-read-formats': {
|
|
912
|
+
request: {
|
|
913
|
+
type?: OpenFin.ClipboardSelectionType;
|
|
914
|
+
};
|
|
915
|
+
response: Array<string>;
|
|
916
|
+
};
|
|
917
|
+
'clipboard-read-image': {
|
|
918
|
+
request: OpenFin.ReadImageClipboardRequest;
|
|
919
|
+
response: string;
|
|
920
|
+
};
|
|
921
|
+
'clipboard-write-image': {
|
|
922
|
+
request: OpenFin.WriteImageClipboardRequest;
|
|
923
|
+
response: void;
|
|
924
|
+
};
|
|
925
|
+
'clipboard-write': {
|
|
926
|
+
request: OpenFin.WriteAnyRequestType;
|
|
927
|
+
response: void;
|
|
928
|
+
};
|
|
929
|
+
'get-view-window': IdentityCall<{}, OpenFin.Identity>;
|
|
930
|
+
'create-view': IdentityCall<OpenFin.ViewCreationOptions & {
|
|
931
|
+
uuid: string;
|
|
932
|
+
}>;
|
|
933
|
+
'destroy-view': IdentityCall;
|
|
934
|
+
'attach-view': IdentityCall<{
|
|
935
|
+
target: OpenFin.Identity;
|
|
936
|
+
}>;
|
|
937
|
+
'set-view-bounds': IdentityCall<{
|
|
938
|
+
bounds: OpenFin.Bounds;
|
|
939
|
+
}>;
|
|
940
|
+
'get-view-bounds': IdentityCall<{}, OpenFin.Bounds>;
|
|
941
|
+
'get-view-info': IdentityCall<{}, OpenFin.ViewInfo>;
|
|
942
|
+
'get-view-options': IdentityCall<{}, OpenFin.ViewOptions>;
|
|
943
|
+
'hide-view': IdentityCall;
|
|
944
|
+
'show-view': IdentityCall;
|
|
945
|
+
'update-view-options': IdentityCall<{
|
|
946
|
+
options: OpenFin.UpdatableViewOptions;
|
|
947
|
+
}>;
|
|
948
|
+
'trigger-before-unload': IdentityCall<{}, boolean>;
|
|
949
|
+
'window-get-views': IdentityCall<{}, OpenFin.Identity[]>;
|
|
950
|
+
'print': {
|
|
951
|
+
request: OpenFin.Identity & {
|
|
952
|
+
options: OpenFin.PrintOptions;
|
|
953
|
+
};
|
|
954
|
+
response: void;
|
|
955
|
+
};
|
|
956
|
+
'print-screenshot': {
|
|
957
|
+
request: OpenFin.Identity;
|
|
958
|
+
response: void;
|
|
959
|
+
};
|
|
960
|
+
'print-views': {
|
|
961
|
+
request: OpenFin.Identity & {
|
|
962
|
+
options: OpenFin.WindowViewsPrintOptions;
|
|
963
|
+
};
|
|
964
|
+
response: void;
|
|
965
|
+
};
|
|
966
|
+
'launch-manifest': {
|
|
967
|
+
request: {
|
|
968
|
+
manifestUrl: string;
|
|
969
|
+
opts?: Omit<OpenFin.RvmLaunchOptions, 'subscribe'> & {
|
|
970
|
+
appVersionId?: string;
|
|
971
|
+
};
|
|
972
|
+
};
|
|
973
|
+
response: {
|
|
974
|
+
manifest: OpenFin.Manifest;
|
|
975
|
+
};
|
|
976
|
+
};
|
|
977
|
+
'get-system-app-configuration': {
|
|
978
|
+
request: {
|
|
979
|
+
name: string;
|
|
980
|
+
};
|
|
981
|
+
response: any;
|
|
982
|
+
};
|
|
983
|
+
'show-popup-menu': {
|
|
984
|
+
request: OpenFin.Identity & {
|
|
985
|
+
options: OpenFin.ShowPopupMenuOptions;
|
|
986
|
+
};
|
|
987
|
+
response: OpenFin.MenuResult;
|
|
988
|
+
};
|
|
989
|
+
'enable-native-window-integration-provider': {
|
|
990
|
+
request: {
|
|
991
|
+
permissions: any;
|
|
992
|
+
};
|
|
993
|
+
response: OpenFin.NativeWindowIntegrationProviderAuthorization;
|
|
994
|
+
};
|
|
995
|
+
'get-permissions': GetterCall<any>;
|
|
996
|
+
'get-all-channels': GetterCall<OpenFin.ProviderIdentity[]>;
|
|
997
|
+
'set-file-download-location': {
|
|
998
|
+
request: OpenFin.Identity & {
|
|
999
|
+
downloadLocation: string;
|
|
1000
|
+
};
|
|
1001
|
+
response: void;
|
|
1002
|
+
};
|
|
1003
|
+
'get-file-download-location': {
|
|
1004
|
+
request: OpenFin.ApplicationIdentity;
|
|
1005
|
+
response: string;
|
|
1006
|
+
};
|
|
1007
|
+
'close-popup-menu': IdentityCall;
|
|
1008
|
+
'fdc3-add-context-listener': VoidCall;
|
|
1009
|
+
'fdc3-broadcast': VoidCall;
|
|
1010
|
+
'fdc3-get-system-channels': VoidCall;
|
|
1011
|
+
'fdc3-join-channel': VoidCall;
|
|
1012
|
+
'fdc3-leave-current-channel': VoidCall;
|
|
1013
|
+
'interop-connect-sync': VoidCall;
|
|
1014
|
+
'interop-client-set-context': VoidCall;
|
|
1015
|
+
'interop-client-add-context-handler': VoidCall;
|
|
1016
|
+
'interop-client-get-context-groups': VoidCall;
|
|
1017
|
+
'interop-client-join-context-group': VoidCall;
|
|
1018
|
+
'interop-client-remove-from-context-group': VoidCall;
|
|
1019
|
+
'interop-client-get-all-clients-in-context-group': VoidCall;
|
|
1020
|
+
'interop-client-get-info-for-context-group': VoidCall;
|
|
1021
|
+
'interop-broker-add-client-to-context-group': VoidCall;
|
|
1022
|
+
'interop-broker-get-all-clients-in-context-group': VoidCall;
|
|
1023
|
+
'interop-broker-get-context-groups': VoidCall;
|
|
1024
|
+
'interop-broker-get-info-for-context-group': VoidCall;
|
|
1025
|
+
'interop-broker-is-action-authorized': VoidCall;
|
|
1026
|
+
'interop-broker-is-connection-authorized': VoidCall;
|
|
1027
|
+
'interop-broker-join-context-group': VoidCall;
|
|
1028
|
+
'interop-broker-remove-client-from-context-group': VoidCall;
|
|
1029
|
+
'interop-broker-remove-from-context-group': VoidCall;
|
|
1030
|
+
'interop-broker-set-context': VoidCall;
|
|
1031
|
+
'query-permission-for-current-context': {
|
|
1032
|
+
request: {
|
|
1033
|
+
apiName: string;
|
|
1034
|
+
identity: OpenFin.Identity;
|
|
1035
|
+
};
|
|
1036
|
+
response: OpenFin.QueryPermissionResult;
|
|
1037
|
+
};
|
|
1038
|
+
'try-create-popup-window': {
|
|
1039
|
+
request: OpenFin.Identity & {
|
|
1040
|
+
options: OpenFin.PopupOptions;
|
|
1041
|
+
};
|
|
1042
|
+
response: {
|
|
1043
|
+
willOpen: boolean;
|
|
1044
|
+
options: OpenFin.PopupOptions;
|
|
1045
|
+
};
|
|
1046
|
+
};
|
|
1047
|
+
'show-popup-window': {
|
|
1048
|
+
request: OpenFin.Identity & {
|
|
1049
|
+
options: OpenFin.PopupOptions;
|
|
1050
|
+
};
|
|
1051
|
+
response: OpenFin.PopupResult;
|
|
1052
|
+
};
|
|
1053
|
+
'dispatch-popup-result': IdentityCall<{
|
|
1054
|
+
data: any;
|
|
1055
|
+
}>;
|
|
1056
|
+
'render-overlay': {
|
|
1057
|
+
request: {
|
|
1058
|
+
bounds: OpenFin.Bounds;
|
|
1059
|
+
};
|
|
1060
|
+
response: void;
|
|
1061
|
+
};
|
|
1062
|
+
'set-overlay-style': {
|
|
1063
|
+
request: {
|
|
1064
|
+
style: Partial<CSSStyleDeclaration>;
|
|
1065
|
+
};
|
|
1066
|
+
response: void;
|
|
1067
|
+
};
|
|
1068
|
+
'detach-overlay': VoidCall;
|
|
1069
|
+
'set-ignore-all-view-mouse-events': {
|
|
1070
|
+
request: {
|
|
1071
|
+
enabled: boolean;
|
|
1072
|
+
};
|
|
1073
|
+
response: void;
|
|
1074
|
+
};
|
|
1075
|
+
'system-get-printers': GetterCall<OpenFin.PrinterInfo[]>;
|
|
1076
|
+
'system-register-shutdown-handler': VoidCall;
|
|
1077
|
+
'get-domain-settings': ApiCall<OpenFin.ApplicationIdentity, OpenFin.DefaultDomainSettings>;
|
|
1078
|
+
'set-domain-settings': ApiCall<OpenFin.ApplicationIdentity & {
|
|
1079
|
+
domainSettings: OpenFin.DefaultDomainSettings;
|
|
1080
|
+
}, void>;
|
|
1081
|
+
'move-window-by': IdentityCall<WithPositioningOptions<{
|
|
1082
|
+
deltaLeft: number;
|
|
1083
|
+
deltaTop: number;
|
|
1084
|
+
}>>;
|
|
1085
|
+
'move-window': IdentityCall<WithPositioningOptions<{
|
|
1086
|
+
left: number;
|
|
1087
|
+
top: number;
|
|
1088
|
+
}>>;
|
|
1089
|
+
'resize-window-by': IdentityCall<WithPositioningOptions<{
|
|
1090
|
+
deltaWidth: number;
|
|
1091
|
+
deltaHeight: number;
|
|
1092
|
+
anchor: OpenFin.AnchorType;
|
|
1093
|
+
}>>;
|
|
1094
|
+
'resize-window': IdentityCall<WithPositioningOptions<{
|
|
1095
|
+
width: number;
|
|
1096
|
+
height: number;
|
|
1097
|
+
anchor: OpenFin.AnchorType;
|
|
1098
|
+
}>>;
|
|
1099
|
+
'set-window-bounds': IdentityCall<WithPositioningOptions<Partial<OpenFin.Bounds>>>;
|
|
1100
|
+
'register-custom-protocol': ApiCall<OpenFin.CustomProtocolOptions, void>;
|
|
1101
|
+
'unregister-custom-protocol': ApiCall<{
|
|
1102
|
+
protocolName: string;
|
|
1103
|
+
}, void>;
|
|
1104
|
+
'get-custom-protocol-state': ApiCall<{
|
|
1105
|
+
protocolName: string;
|
|
1106
|
+
}, OpenFin.CustomProtocolState>;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
declare interface ProtocolMapBase {
|
|
1110
|
+
[action: string]: {
|
|
1111
|
+
request: any;
|
|
1112
|
+
response: any;
|
|
1113
|
+
specialResponse?: any;
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
declare interface ReceiverConfig extends Omit<RemoteConfig, 'address'> {
|
|
1118
|
+
receiver: MessageReceiver;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
declare interface RemoteConfig extends ExistingConnectConfig {
|
|
1122
|
+
token: string;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
declare type RuntimeConfig = {
|
|
1126
|
+
version: string;
|
|
1127
|
+
fallbackVersion?: string;
|
|
1128
|
+
securityRealm?: string;
|
|
1129
|
+
verboseLogging?: boolean;
|
|
1130
|
+
arguments?: string;
|
|
1131
|
+
rvmDir?: string;
|
|
1132
|
+
};
|
|
1133
|
+
|
|
1134
|
+
declare type RuntimeErrorPayload = {
|
|
1135
|
+
reason: string;
|
|
1136
|
+
error?: ErrorPlainObject;
|
|
1137
|
+
};
|
|
1138
|
+
|
|
1139
|
+
declare type SendActionResponse<T extends keyof ProtocolMap> = Message<{
|
|
1140
|
+
data: ProtocolMap[T]['response'];
|
|
1141
|
+
} & ProtocolMap[T]['specialResponse']>;
|
|
1142
|
+
|
|
1143
|
+
declare type SentMessage<Value> = Promise<Value> & {
|
|
1144
|
+
cancel: (reason?: any) => void;
|
|
1145
|
+
messageId: ReturnType<Environment['getNextMessageId']>;
|
|
1146
|
+
};
|
|
1147
|
+
|
|
1148
|
+
declare type ServiceConfig = {
|
|
1149
|
+
name: string;
|
|
1150
|
+
manifestUrl: string;
|
|
1151
|
+
};
|
|
1152
|
+
|
|
1153
|
+
declare class Transport<MeType extends EntityType = EntityType> extends EventEmitter {
|
|
1154
|
+
#private;
|
|
1155
|
+
protected wireListeners: Map<number, {
|
|
1156
|
+
resolve: Function;
|
|
1157
|
+
handleNack: (payload: RuntimeErrorPayload) => void;
|
|
1158
|
+
}>;
|
|
1159
|
+
protected uncorrelatedListener: Function;
|
|
1160
|
+
me: OpenFin.EntityInfo & EntityTypeHelpers<MeType>;
|
|
1161
|
+
environment: Environment;
|
|
1162
|
+
topicRefMap: Map<string, number>;
|
|
1163
|
+
sendRaw: Wire['send'];
|
|
1164
|
+
eventAggregator: EventAggregator;
|
|
1165
|
+
protected messageHandlers: MessageHandler[];
|
|
1166
|
+
constructor(WireType: WireConstructor, environment: Environment, config: OpenFin.Identity);
|
|
1167
|
+
getFin(): OpenFin.Fin<MeType>;
|
|
1168
|
+
registerFin(_fin: OpenFin.Fin<MeType>): void;
|
|
1169
|
+
connectSync: () => void;
|
|
1170
|
+
getPort: () => string;
|
|
1171
|
+
shutdown(): Promise<void>;
|
|
1172
|
+
connect(config: InternalConnectConfig | RemoteConfig | ReceiverConfig): Promise<string | void>;
|
|
1173
|
+
private connectRemote;
|
|
1174
|
+
connectByPort(config: ExistingConnectConfig): Promise<void>;
|
|
1175
|
+
private authorize;
|
|
1176
|
+
sendAction<T extends keyof ProtocolMap = string>(action: T, payload?: ProtocolMap[T]['request'], uncorrelated?: boolean): SentMessage<SendActionResponse<T>>;
|
|
1177
|
+
protected nackHandler(payloadOrMessage: RuntimeErrorPayload | string, reject: Function, callSites?: NodeJS.CallSite[]): void;
|
|
1178
|
+
ferryAction(origData: any): Promise<Message<any>>;
|
|
1179
|
+
registerMessageHandler(handler: MessageHandler): void;
|
|
1180
|
+
protected addWireListener(id: number, resolve: Function, handleNack: NackHandler, uncorrelated: boolean): void;
|
|
1181
|
+
protected onmessage(data: Message<Payload>): void;
|
|
1182
|
+
protected handleMessage(data: Message<Payload>): boolean;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
declare namespace v1 {
|
|
1186
|
+
{
|
|
1187
|
+
Listener,
|
|
1188
|
+
AppMetadata,
|
|
1189
|
+
IntentMetadata,
|
|
1190
|
+
AppIntent,
|
|
1191
|
+
DisplayMetadata,
|
|
1192
|
+
ImplementationMetadata,
|
|
1193
|
+
ContextHandler,
|
|
1194
|
+
TargetApp,
|
|
1195
|
+
Context,
|
|
1196
|
+
IntentResolution,
|
|
1197
|
+
Channel_3 as Channel,
|
|
1198
|
+
SystemChannel,
|
|
1199
|
+
DesktopAgent
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
declare namespace v2 {
|
|
1204
|
+
{
|
|
1205
|
+
IntentMetadata_2 as IntentMetadata,
|
|
1206
|
+
AppIdentifier,
|
|
1207
|
+
Listener_2 as Listener,
|
|
1208
|
+
AppIntent_2 as AppIntent,
|
|
1209
|
+
ImplementationMetadata_2 as ImplementationMetadata,
|
|
1210
|
+
ContextMetadata,
|
|
1211
|
+
Icon,
|
|
1212
|
+
Image_2 as Image,
|
|
1213
|
+
AppMetadata_2 as AppMetadata,
|
|
1214
|
+
DisplayMetadata_2 as DisplayMetadata,
|
|
1215
|
+
ContextHandler_2 as ContextHandler,
|
|
1216
|
+
IntentHandler,
|
|
1217
|
+
IntentResult,
|
|
1218
|
+
Context_2 as Context,
|
|
1219
|
+
Intent,
|
|
1220
|
+
IntentResolution_2 as IntentResolution,
|
|
1221
|
+
Channel_4 as Channel,
|
|
1222
|
+
PrivateChannel,
|
|
1223
|
+
DesktopAgent_2 as DesktopAgent
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
declare type VoidCall = ApiCall<void, void>;
|
|
1228
|
+
|
|
1229
|
+
declare type WebSocketReadyState = WebSocket['readyState'];
|
|
1230
|
+
|
|
1231
|
+
declare type Wire = EventEmitter & {
|
|
1232
|
+
connect(messageReciever: MessageReceiver): Promise<any>;
|
|
1233
|
+
connectSync(): any;
|
|
1234
|
+
send(data: any): Promise<any>;
|
|
1235
|
+
shutdown(): Promise<void>;
|
|
1236
|
+
getPort(): string;
|
|
1237
|
+
};
|
|
1238
|
+
|
|
1239
|
+
declare type WireConstructor = {
|
|
1240
|
+
new (onmessage: (data: any) => void): Wire;
|
|
1241
|
+
};
|
|
1242
|
+
|
|
1243
|
+
declare type WithPositioningOptions<T extends {} = {}> = T & {
|
|
1244
|
+
positioningOptions?: OpenFin.PositioningOptions;
|
|
1245
|
+
};
|
|
1246
|
+
|
|
1247
|
+
export { }
|