@openfin/core 33.76.36 → 33.77.1
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 +1 -1
- package/README.md +29 -4
- package/fin.d.ts +2 -2
- package/{src → out}/GlobalOpenFin.d.ts +1 -1
- package/out/mock-alpha.d.ts +16112 -0
- package/out/mock-beta.d.ts +16112 -0
- package/out/mock-public.d.ts +16112 -0
- package/out/mock.d.ts +16797 -0
- package/out/mock.js +17111 -0
- package/package.json +30 -23
- package/LICENSE +0 -13
- package/NOTICE +0 -16
- package/openfin-core-33.76.36.tgz +0 -0
- package/src/OpenFin.d.ts +0 -3091
- package/src/OpenFin.js +0 -2
- package/src/api/api-exposer/api-consumer.d.ts +0 -28
- package/src/api/api-exposer/api-consumer.js +0 -28
- package/src/api/api-exposer/api-exposer.d.ts +0 -35
- package/src/api/api-exposer/api-exposer.js +0 -38
- package/src/api/api-exposer/decorators.d.ts +0 -10
- package/src/api/api-exposer/decorators.js +0 -18
- package/src/api/api-exposer/index.d.ts +0 -4
- package/src/api/api-exposer/index.js +0 -20
- package/src/api/api-exposer/strategies/index.d.ts +0 -1
- package/src/api/api-exposer/strategies/index.js +0 -17
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.d.ts +0 -14
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.js +0 -20
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.d.ts +0 -20
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.js +0 -23
- package/src/api/api-exposer/strategies/openfin-channels/index.d.ts +0 -2
- package/src/api/api-exposer/strategies/openfin-channels/index.js +0 -18
- package/src/api/application/Factory.d.ts +0 -196
- package/src/api/application/Factory.js +0 -278
- package/src/api/application/Instance.d.ts +0 -692
- package/src/api/application/Instance.js +0 -821
- package/src/api/application/index.d.ts +0 -12
- package/src/api/application/index.js +0 -28
- package/src/api/base.d.ts +0 -117
- package/src/api/base.js +0 -246
- package/src/api/clipboard/index.d.ts +0 -172
- package/src/api/clipboard/index.js +0 -200
- package/src/api/events/application.d.ts +0 -158
- package/src/api/events/application.js +0 -14
- package/src/api/events/base.d.ts +0 -42
- package/src/api/events/base.js +0 -2
- package/src/api/events/channel.d.ts +0 -35
- package/src/api/events/channel.js +0 -7
- package/src/api/events/emitterMap.d.ts +0 -11
- package/src/api/events/emitterMap.js +0 -35
- package/src/api/events/eventAggregator.d.ts +0 -5
- package/src/api/events/eventAggregator.js +0 -35
- package/src/api/events/externalApplication.d.ts +0 -24
- package/src/api/events/externalApplication.js +0 -7
- package/src/api/events/frame.d.ts +0 -35
- package/src/api/events/frame.js +0 -2
- package/src/api/events/globalHotkey.d.ts +0 -25
- package/src/api/events/globalHotkey.js +0 -2
- package/src/api/events/platform.d.ts +0 -34
- package/src/api/events/platform.js +0 -10
- package/src/api/events/system.d.ts +0 -126
- package/src/api/events/system.js +0 -15
- package/src/api/events/typedEventEmitter.d.ts +0 -20
- package/src/api/events/typedEventEmitter.js +0 -2
- package/src/api/events/view.d.ts +0 -92
- package/src/api/events/view.js +0 -12
- package/src/api/events/webcontents.d.ts +0 -277
- package/src/api/events/webcontents.js +0 -13
- package/src/api/events/window.d.ts +0 -421
- package/src/api/events/window.js +0 -12
- package/src/api/external-application/Factory.d.ts +0 -34
- package/src/api/external-application/Factory.js +0 -47
- package/src/api/external-application/Instance.d.ts +0 -110
- package/src/api/external-application/Instance.js +0 -117
- package/src/api/external-application/index.d.ts +0 -12
- package/src/api/external-application/index.js +0 -28
- package/src/api/fin.d.ts +0 -54
- package/src/api/fin.js +0 -45
- package/src/api/frame/Factory.d.ts +0 -54
- package/src/api/frame/Factory.js +0 -86
- package/src/api/frame/Instance.d.ts +0 -136
- package/src/api/frame/Instance.js +0 -143
- package/src/api/frame/index.d.ts +0 -14
- package/src/api/frame/index.js +0 -30
- package/src/api/global-hotkey/index.d.ts +0 -106
- package/src/api/global-hotkey/index.js +0 -132
- package/src/api/interappbus/channel/channel.d.ts +0 -285
- package/src/api/interappbus/channel/channel.js +0 -334
- package/src/api/interappbus/channel/channels-docs.d.ts +0 -342
- package/src/api/interappbus/channel/channels-docs.js +0 -401
- package/src/api/interappbus/channel/client.d.ts +0 -117
- package/src/api/interappbus/channel/client.js +0 -181
- package/src/api/interappbus/channel/connection-manager.d.ts +0 -29
- package/src/api/interappbus/channel/connection-manager.js +0 -246
- package/src/api/interappbus/channel/index.d.ts +0 -189
- package/src/api/interappbus/channel/index.js +0 -333
- package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +0 -13
- package/src/api/interappbus/channel/protocols/classic/message-receiver.js +0 -73
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +0 -24
- package/src/api/interappbus/channel/protocols/classic/strategy.js +0 -101
- package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +0 -20
- package/src/api/interappbus/channel/protocols/combined/strategy.js +0 -58
- package/src/api/interappbus/channel/protocols/index.d.ts +0 -47
- package/src/api/interappbus/channel/protocols/index.js +0 -2
- package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +0 -10
- package/src/api/interappbus/channel/protocols/protocol-manager.js +0 -43
- package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +0 -25
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +0 -141
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +0 -30
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +0 -130
- package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +0 -24
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +0 -85
- package/src/api/interappbus/channel/protocols/strategy-types.d.ts +0 -13
- package/src/api/interappbus/channel/protocols/strategy-types.js +0 -2
- package/src/api/interappbus/channel/protocols/strategy.d.ts +0 -17
- package/src/api/interappbus/channel/protocols/strategy.js +0 -2
- package/src/api/interappbus/channel/provider.d.ts +0 -206
- package/src/api/interappbus/channel/provider.js +0 -338
- package/src/api/interappbus/index.d.ts +0 -120
- package/src/api/interappbus/index.js +0 -210
- package/src/api/interop/Factory.d.ts +0 -57
- package/src/api/interop/Factory.js +0 -96
- package/src/api/interop/InteropBroker.d.ts +0 -665
- package/src/api/interop/InteropBroker.js +0 -1313
- package/src/api/interop/InteropClient.d.ts +0 -502
- package/src/api/interop/InteropClient.js +0 -683
- package/src/api/interop/SessionContextGroupBroker.d.ts +0 -27
- package/src/api/interop/SessionContextGroupBroker.js +0 -108
- package/src/api/interop/SessionContextGroupClient.d.ts +0 -21
- package/src/api/interop/SessionContextGroupClient.js +0 -86
- package/src/api/interop/fdc3/PrivateChannelClient.d.ts +0 -20
- package/src/api/interop/fdc3/PrivateChannelClient.js +0 -90
- package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +0 -55
- package/src/api/interop/fdc3/PrivateChannelProvider.js +0 -276
- package/src/api/interop/fdc3/documentationStub.d.ts +0 -14
- package/src/api/interop/fdc3/documentationStub.js +0 -17
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +0 -205
- package/src/api/interop/fdc3/fdc3-1.2.js +0 -435
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +0 -298
- package/src/api/interop/fdc3/fdc3-2.0.js +0 -479
- package/src/api/interop/fdc3/fdc3.d.ts +0 -12
- package/src/api/interop/fdc3/fdc3.js +0 -35
- package/src/api/interop/fdc3/overrideCheck.d.ts +0 -4
- package/src/api/interop/fdc3/overrideCheck.js +0 -32
- package/src/api/interop/fdc3/shapes/fdc3v1.d.ts +0 -53
- package/src/api/interop/fdc3/shapes/fdc3v1.js +0 -4
- package/src/api/interop/fdc3/shapes/fdc3v2.d.ts +0 -75
- package/src/api/interop/fdc3/shapes/fdc3v2.js +0 -2
- package/src/api/interop/fdc3/utils.d.ts +0 -45
- package/src/api/interop/fdc3/utils.js +0 -239
- package/src/api/interop/fdc3/versions.d.ts +0 -1
- package/src/api/interop/fdc3/versions.js +0 -2
- package/src/api/interop/index.d.ts +0 -12
- package/src/api/interop/index.js +0 -28
- package/src/api/interop/utils.d.ts +0 -18
- package/src/api/interop/utils.js +0 -61
- package/src/api/me.d.ts +0 -40
- package/src/api/me.js +0 -134
- package/src/api/platform/Factory.d.ts +0 -171
- package/src/api/platform/Factory.js +0 -240
- package/src/api/platform/Instance.d.ts +0 -653
- package/src/api/platform/Instance.js +0 -834
- package/src/api/platform/common-utils.d.ts +0 -7
- package/src/api/platform/common-utils.js +0 -16
- package/src/api/platform/index.d.ts +0 -12
- package/src/api/platform/index.js +0 -28
- package/src/api/platform/layout/Factory.d.ts +0 -91
- package/src/api/platform/layout/Factory.js +0 -151
- package/src/api/platform/layout/Instance.d.ts +0 -192
- package/src/api/platform/layout/Instance.js +0 -224
- package/src/api/platform/layout/controllers/layout-content-cache.d.ts +0 -9
- package/src/api/platform/layout/controllers/layout-content-cache.js +0 -54
- package/src/api/platform/layout/controllers/layout-entities-controller.d.ts +0 -119
- package/src/api/platform/layout/controllers/layout-entities-controller.js +0 -287
- package/src/api/platform/layout/entities/layout-entities.d.ts +0 -427
- package/src/api/platform/layout/entities/layout-entities.js +0 -504
- package/src/api/platform/layout/entities/shapes.d.ts +0 -6
- package/src/api/platform/layout/entities/shapes.js +0 -2
- package/src/api/platform/layout/index.d.ts +0 -11
- package/src/api/platform/layout/index.js +0 -27
- package/src/api/platform/layout/layout.constants.d.ts +0 -1
- package/src/api/platform/layout/layout.constants.js +0 -4
- package/src/api/platform/layout/shapes.d.ts +0 -16
- package/src/api/platform/layout/shapes.js +0 -2
- package/src/api/platform/layout/utils/layout-traversal.d.ts +0 -4
- package/src/api/platform/layout/utils/layout-traversal.js +0 -65
- package/src/api/platform/provider.d.ts +0 -510
- package/src/api/platform/provider.js +0 -2
- package/src/api/snapshot-source/Factory.d.ts +0 -53
- package/src/api/snapshot-source/Factory.js +0 -81
- package/src/api/snapshot-source/Instance.d.ts +0 -53
- package/src/api/snapshot-source/Instance.js +0 -154
- package/src/api/snapshot-source/index.d.ts +0 -12
- package/src/api/snapshot-source/index.js +0 -28
- package/src/api/snapshot-source/utils.d.ts +0 -2
- package/src/api/snapshot-source/utils.js +0 -6
- package/src/api/system/index.d.ts +0 -1468
- package/src/api/system/index.js +0 -1851
- package/src/api/view/Factory.d.ts +0 -88
- package/src/api/view/Factory.js +0 -141
- package/src/api/view/Instance.d.ts +0 -601
- package/src/api/view/Instance.js +0 -671
- package/src/api/view/index.d.ts +0 -12
- package/src/api/view/index.js +0 -28
- package/src/api/webcontents/main.d.ts +0 -922
- package/src/api/webcontents/main.js +0 -1046
- package/src/api/window/Factory.d.ts +0 -96
- package/src/api/window/Factory.js +0 -142
- package/src/api/window/Instance.d.ts +0 -1598
- package/src/api/window/Instance.js +0 -1851
- package/src/api/window/index.d.ts +0 -14
- package/src/api/window/index.js +0 -30
- package/src/browser.d.ts +0 -10
- package/src/browser.js +0 -36
- package/src/environment/browser.d.ts +0 -29
- package/src/environment/browser.js +0 -60
- package/src/environment/environment.d.ts +0 -33
- package/src/environment/environment.js +0 -4
- package/src/environment/mockEnvironment.d.ts +0 -27
- package/src/environment/mockEnvironment.js +0 -61
- package/src/environment/node-env.d.ts +0 -29
- package/src/environment/node-env.js +0 -72
- package/src/fdc3.d.ts +0 -3
- package/src/fdc3.js +0 -9
- package/src/mock.d.ts +0 -3
- package/src/mock.js +0 -18
- package/src/namespaces.d.ts +0 -22
- package/src/namespaces.js +0 -26
- package/src/shapes/ERROR_BOX_TYPES.d.ts +0 -1
- package/src/shapes/ERROR_BOX_TYPES.js +0 -2
- package/src/shapes/WebOptions.d.ts +0 -13
- package/src/shapes/WebOptions.js +0 -2
- package/src/shapes/WindowOptions.d.ts +0 -43
- package/src/shapes/WindowOptions.js +0 -2
- package/src/shapes/protocol.d.ts +0 -204
- package/src/shapes/protocol.js +0 -2
- package/src/transport/mockWire.d.ts +0 -11
- package/src/transport/mockWire.js +0 -26
- package/src/transport/transport-errors.d.ts +0 -31
- package/src/transport/transport-errors.js +0 -79
- package/src/transport/transport.d.ts +0 -73
- package/src/transport/transport.js +0 -219
- package/src/transport/wire.d.ts +0 -77
- package/src/transport/wire.js +0 -36
- package/src/util/asyncFilter.d.ts +0 -1
- package/src/util/asyncFilter.js +0 -7
- package/src/util/channel-api-relay.d.ts +0 -13
- package/src/util/channel-api-relay.js +0 -47
- package/src/util/errors.d.ts +0 -10
- package/src/util/errors.js +0 -12
- package/src/util/exhaustive.d.ts +0 -1
- package/src/util/exhaustive.js +0 -7
- package/src/util/http.d.ts +0 -11
- package/src/util/http.js +0 -90
- package/src/util/inaccessibleObject.d.ts +0 -2
- package/src/util/inaccessibleObject.js +0 -49
- package/src/util/lazy.d.ts +0 -34
- package/src/util/lazy.js +0 -54
- package/src/util/normalize-config.d.ts +0 -3
- package/src/util/normalize-config.js +0 -52
- package/src/util/promises.d.ts +0 -5
- package/src/util/promises.js +0 -27
- package/src/util/ref-counter.d.ts +0 -7
- package/src/util/ref-counter.js +0 -52
- package/src/util/reversible-map.d.ts +0 -11
- package/src/util/reversible-map.js +0 -49
- package/src/util/runtimeVersioning.d.ts +0 -3
- package/src/util/runtimeVersioning.js +0 -25
- package/src/util/utilTypes.d.ts +0 -8
- package/src/util/utilTypes.js +0 -2
- package/src/util/validate.d.ts +0 -3
- package/src/util/validate.js +0 -11
|
@@ -1,665 +0,0 @@
|
|
|
1
|
-
import { TargetApp } from './fdc3/shapes/fdc3v1';
|
|
2
|
-
import { AppIdentifier } from './fdc3/shapes/fdc3v2';
|
|
3
|
-
import type * as OpenFin from '../../OpenFin';
|
|
4
|
-
import { Base } from '../base';
|
|
5
|
-
import type { Transport } from '../../transport/transport';
|
|
6
|
-
type Identity = OpenFin.Identity;
|
|
7
|
-
/**
|
|
8
|
-
* {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
|
|
9
|
-
*
|
|
10
|
-
* The Interop Broker is responsible for keeping track of the Interop state of the Platform, and for directing messages to the proper locations.
|
|
11
|
-
*
|
|
12
|
-
* @remarks This class contains some types related to FDC3 that are specific to OpenFin. {@link https://developers.openfin.co/of-docs/docs/fdc3-support-in-openfin OpenFin's FDC3 support} is forward- and backward-compatible.
|
|
13
|
-
* Standard types for {@link https://fdc3.finos.org/ FDC3} do not appear in OpenFin’s API documentation, to avoid duplication.
|
|
14
|
-
*
|
|
15
|
-
* ---
|
|
16
|
-
*
|
|
17
|
-
* There are 2 ways to inject custom functionality into the Interop Broker:
|
|
18
|
-
*
|
|
19
|
-
* **1. Configuration**
|
|
20
|
-
*
|
|
21
|
-
* At the moment, you can configure the default context groups for the Interop Broker without having to override it. To do so, include the `interopBrokerConfiguration` `contextGroups` option in your `platform` options in your manifest. This is the preferred method.
|
|
22
|
-
* ```js
|
|
23
|
-
* {
|
|
24
|
-
* "runtime": {
|
|
25
|
-
* "arguments": "--v=1 --inspect",
|
|
26
|
-
* "version": "alpha-v19"
|
|
27
|
-
* },
|
|
28
|
-
* "platform": {
|
|
29
|
-
* "uuid": "platform_customization_local",
|
|
30
|
-
* "applicationIcon": "https://openfin.github.io/golden-prototype/favicon.ico",
|
|
31
|
-
* "autoShow": false,
|
|
32
|
-
* "providerUrl": "http://localhost:5555/provider.html",
|
|
33
|
-
* "interopBrokerConfiguration": {
|
|
34
|
-
* "contextGroups": [
|
|
35
|
-
* {
|
|
36
|
-
* "id": "green",
|
|
37
|
-
* "displayMetadata": {
|
|
38
|
-
* "color": "#00CC88",
|
|
39
|
-
* "name": "green"
|
|
40
|
-
* }
|
|
41
|
-
* },
|
|
42
|
-
* {
|
|
43
|
-
* "id": "purple",
|
|
44
|
-
* "displayMetadata": {
|
|
45
|
-
* "color": "#8C61FF",
|
|
46
|
-
* "name": "purple"
|
|
47
|
-
* }
|
|
48
|
-
* },
|
|
49
|
-
* ]
|
|
50
|
-
* }
|
|
51
|
-
* }
|
|
52
|
-
* }
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
* By default the Interop Broker logs all actions to the console. You can disable this by using the logging option in `interopBrokerConfiguration`:
|
|
56
|
-
* ```js
|
|
57
|
-
* {
|
|
58
|
-
* "runtime": {
|
|
59
|
-
* "arguments": "--v=1 --inspect",
|
|
60
|
-
* "version": "alpha-v19"
|
|
61
|
-
* },
|
|
62
|
-
* "platform": {
|
|
63
|
-
* "uuid": "platform_customization_local",
|
|
64
|
-
* "applicationIcon": "https://openfin.github.io/golden-prototype/favicon.ico",
|
|
65
|
-
* "autoShow": false,
|
|
66
|
-
* "providerUrl": "http://localhost:5555/provider.html",
|
|
67
|
-
* "interopBrokerConfiguration": {
|
|
68
|
-
* "logging": {
|
|
69
|
-
* "beforeAction": {
|
|
70
|
-
* "enabled": false
|
|
71
|
-
* },
|
|
72
|
-
* "afterAction": {
|
|
73
|
-
* "enabled": false
|
|
74
|
-
* }
|
|
75
|
-
* }
|
|
76
|
-
* }
|
|
77
|
-
* }
|
|
78
|
-
* }
|
|
79
|
-
* ```
|
|
80
|
-
*
|
|
81
|
-
* ---
|
|
82
|
-
* **2. Overriding**
|
|
83
|
-
*
|
|
84
|
-
* Similarly to how {@link https://developers.openfin.co/docs/platform-customization#section-customizing-platform-behavior Platform Overriding} works, you can override functions in the Interop Broker in `fin.Platform.init`. An example of that is shown below. Overriding `isConnectionAuthorized` and `isActionAuthorized` will allow you to control allowed connections and allowed actions.
|
|
85
|
-
*
|
|
86
|
-
* However, if there is custom functionality you wish to include in the Interop Broker, please let us know. We would like to provide better configuration options so that you don't have to continually maintain your own override code.
|
|
87
|
-
*
|
|
88
|
-
* ```js
|
|
89
|
-
* fin.Platform.init({
|
|
90
|
-
* overrideCallback: async (Provider) => {
|
|
91
|
-
* class Override extends Provider {
|
|
92
|
-
* async getSnapshot() {
|
|
93
|
-
* console.log('before getSnapshot')
|
|
94
|
-
* const snapshot = await super.getSnapshot();
|
|
95
|
-
* console.log('after getSnapshot')
|
|
96
|
-
* return snapshot;
|
|
97
|
-
* }
|
|
98
|
-
*
|
|
99
|
-
* async applySnapshot({ snapshot, options }) {
|
|
100
|
-
* console.log('before applySnapshot')
|
|
101
|
-
* const originalPromise = super.applySnapshot({ snapshot, options });
|
|
102
|
-
* console.log('after applySnapshot')
|
|
103
|
-
*
|
|
104
|
-
* return originalPromise;
|
|
105
|
-
* }
|
|
106
|
-
* };
|
|
107
|
-
* return new Override();
|
|
108
|
-
* },
|
|
109
|
-
* interopOverride: async (InteropBroker) => {
|
|
110
|
-
* class Override extends InteropBroker {
|
|
111
|
-
* async joinContextGroup(channelName = 'default', target) {
|
|
112
|
-
* console.log('before super joinContextGroup')
|
|
113
|
-
* super.joinContextGroup(channelName, target);
|
|
114
|
-
* console.log('after super joinContextGroup')
|
|
115
|
-
* }
|
|
116
|
-
* }
|
|
117
|
-
*
|
|
118
|
-
* return new Override();
|
|
119
|
-
* }
|
|
120
|
-
* });
|
|
121
|
-
* ```
|
|
122
|
-
*
|
|
123
|
-
* ---
|
|
124
|
-
*
|
|
125
|
-
*/
|
|
126
|
-
export declare class InteropBroker extends Base {
|
|
127
|
-
private getProvider;
|
|
128
|
-
private interopClients;
|
|
129
|
-
private contextGroupsById;
|
|
130
|
-
private intentClientMap;
|
|
131
|
-
private lastContextMap;
|
|
132
|
-
private sessionContextGroupMap;
|
|
133
|
-
private channel;
|
|
134
|
-
private logging;
|
|
135
|
-
/**
|
|
136
|
-
* @internal
|
|
137
|
-
*/
|
|
138
|
-
constructor(wire: Transport, getProvider: () => Promise<OpenFin.ChannelProvider>, options?: any);
|
|
139
|
-
static createClosedConstructor(...args: ConstructorParameters<typeof InteropBroker>): {
|
|
140
|
-
new (): InteropBroker;
|
|
141
|
-
};
|
|
142
|
-
/**
|
|
143
|
-
* @REMOVED
|
|
144
|
-
* SetContextOptions interface
|
|
145
|
-
* @typedef { object } SetContextOptions
|
|
146
|
-
* @property { Context } {context} - New context to set.
|
|
147
|
-
*/
|
|
148
|
-
/**
|
|
149
|
-
* @REMOVED
|
|
150
|
-
* GetContextOptions interface
|
|
151
|
-
* @typedef { object } GetContextOptions
|
|
152
|
-
* @property { string } [contextType] - Context Type
|
|
153
|
-
*/
|
|
154
|
-
/**
|
|
155
|
-
* @REMOVED
|
|
156
|
-
* JoinContextGroupOptions interface
|
|
157
|
-
* @typedef { object } JoinContextGroupOptions
|
|
158
|
-
* @property { string } contextGroupId - Id of the context group.
|
|
159
|
-
* @property { Identity | ClientIdentity } [target] - Identity of the entity you wish to join to a context group.
|
|
160
|
-
*/
|
|
161
|
-
/**
|
|
162
|
-
* @REMOVED
|
|
163
|
-
* AddClientToContextGroupOptions interface
|
|
164
|
-
* @typedef { object } AddClientToContextGroupOptions
|
|
165
|
-
* @property { string } contextGroupId - Name of the context group.
|
|
166
|
-
*/
|
|
167
|
-
/**
|
|
168
|
-
* @REMOVED
|
|
169
|
-
* RemoveFromContextGroupOptions interface
|
|
170
|
-
* @typedef { object } RemoveFromContextGroupOptions
|
|
171
|
-
* @property { Identity | ClientIdentity } target - Identity of the entity you wish to join to a context group.
|
|
172
|
-
*/
|
|
173
|
-
/**
|
|
174
|
-
* @REMOVED
|
|
175
|
-
* GetInfoForContextGroupOptions interface
|
|
176
|
-
* @typedef { object } GetInfoForContextGroupOptions
|
|
177
|
-
* @property { string } contextGroupId - Name of the context group to get info for.
|
|
178
|
-
*/
|
|
179
|
-
/**
|
|
180
|
-
* @REMOVED
|
|
181
|
-
* GetAllClientsInContextGroupOptions interface
|
|
182
|
-
* @typedef { object } GetAllClientsInContextGroupOptions
|
|
183
|
-
* @property { string } contextGroupId - Name of the context group to get info for.
|
|
184
|
-
*/
|
|
185
|
-
/**
|
|
186
|
-
* @PORTED
|
|
187
|
-
* InfoForIntentOptions interface
|
|
188
|
-
* @typedef { object } InfoForIntentOptions
|
|
189
|
-
* @property { string } name Name of the intent to get info for.
|
|
190
|
-
* @property { Context } [context] Optional context.
|
|
191
|
-
*/
|
|
192
|
-
/**
|
|
193
|
-
* Sets a context for the context group of the incoming current entity.
|
|
194
|
-
* @param setContextOptions - New context to set.
|
|
195
|
-
* @param clientIdentity - Identity of the client sender.
|
|
196
|
-
*
|
|
197
|
-
*/
|
|
198
|
-
setContext({ context }: {
|
|
199
|
-
context: OpenFin.Context;
|
|
200
|
-
}, clientIdentity: OpenFin.ClientIdentity): void;
|
|
201
|
-
/**
|
|
202
|
-
* Get current context for a client subscribed to a Context Group.
|
|
203
|
-
*
|
|
204
|
-
* @remarks It takes an optional Context Type argument and returns the last context of that type.
|
|
205
|
-
*
|
|
206
|
-
* @param getContextOptions - Options for getting context
|
|
207
|
-
* @param clientIdentity - Identity of the client sender.
|
|
208
|
-
*
|
|
209
|
-
*/
|
|
210
|
-
getCurrentContext(getCurrentContextOptions: {
|
|
211
|
-
contextType: string;
|
|
212
|
-
}, clientIdentity: OpenFin.ClientIdentity): OpenFin.Context | undefined;
|
|
213
|
-
/**
|
|
214
|
-
* Join all connections at the given identity (or just one if endpointId provided) to context group `contextGroupId`.
|
|
215
|
-
* If no target is specified, it adds the sender to the context group.
|
|
216
|
-
* joinContextGroup is responsible for checking connections at the incoming identity. It calls {@link InteropBroker#addClientToContextGroup InteropBroker.addClientToContextGroup} to actually group the client.
|
|
217
|
-
* Used by Platform Windows.
|
|
218
|
-
*
|
|
219
|
-
* @param joinContextGroupOptions - Id of the Context Group and identity of the entity to join to the group.
|
|
220
|
-
* @param senderIdentity - Identity of the client sender.
|
|
221
|
-
*/
|
|
222
|
-
joinContextGroup({ contextGroupId, target }: {
|
|
223
|
-
contextGroupId: string;
|
|
224
|
-
target?: OpenFin.ClientIdentity | OpenFin.Identity;
|
|
225
|
-
}, senderIdentity: OpenFin.ClientIdentity): Promise<void>;
|
|
226
|
-
/**
|
|
227
|
-
* Helper function for {@link InteropBroker#joinContextGroup InteropBroker.joinContextGroup}. Does the work of actually adding the client to the Context Group.
|
|
228
|
-
* Used by Platform Windows.
|
|
229
|
-
*
|
|
230
|
-
* @param addClientToContextGroupOptions - Contains the contextGroupId
|
|
231
|
-
* @param clientIdentity - Identity of the client sender.
|
|
232
|
-
*/
|
|
233
|
-
addClientToContextGroup({ contextGroupId }: {
|
|
234
|
-
contextGroupId: string;
|
|
235
|
-
}, clientIdentity: OpenFin.ClientIdentity): Promise<void>;
|
|
236
|
-
/**
|
|
237
|
-
* Removes the specified target from a context group.
|
|
238
|
-
* If no target is specified, it removes the sender from their context group.
|
|
239
|
-
* removeFromContextGroup is responsible for checking connections at the incoming identity.
|
|
240
|
-
*
|
|
241
|
-
* @remarks It calls {@link InteropBroker#removeClientFromContextGroup InteropBroker.removeClientFromContextGroup} to actually ungroup
|
|
242
|
-
* the client. Used by Platform Windows.
|
|
243
|
-
*
|
|
244
|
-
* @param removeFromContextGroupOptions - Contains the target identity to remove.
|
|
245
|
-
* @param senderIdentity - Identity of the client sender.
|
|
246
|
-
*/
|
|
247
|
-
removeFromContextGroup({ target }: {
|
|
248
|
-
target: OpenFin.Identity;
|
|
249
|
-
}, senderIdentity: OpenFin.ClientIdentity): Promise<void>;
|
|
250
|
-
/**
|
|
251
|
-
* Helper function for {@link InteropBroker#removeFromContextGroup InteropBroker.removeFromContextGroup}. Does the work of actually removing the client from the Context Group.
|
|
252
|
-
* Used by Platform Windows.
|
|
253
|
-
*
|
|
254
|
-
* @property { ClientIdentity } clientIdentity - Identity of the client sender.
|
|
255
|
-
*/
|
|
256
|
-
removeClientFromContextGroup(clientIdentity: OpenFin.ClientIdentity): Promise<void>;
|
|
257
|
-
/**
|
|
258
|
-
* Returns the Interop-Broker-defined context groups available for an entity to join. Because this function is used in the rest of the Interop Broker to fetch the Context Groups, overriding this allows you to customize the Context Groups for the Interop Broker. However, we recommend customizing the context groups through configuration instead.
|
|
259
|
-
* Used by Platform Windows.
|
|
260
|
-
*
|
|
261
|
-
*/
|
|
262
|
-
getContextGroups(): Readonly<OpenFin.ContextGroupInfo[]>;
|
|
263
|
-
/**
|
|
264
|
-
* Gets display info for a context group
|
|
265
|
-
*
|
|
266
|
-
* @remarks Used by Platform Windows.
|
|
267
|
-
*
|
|
268
|
-
* @param getInfoForContextGroupOptions - Contains contextGroupId, the context group you wish to get display info for.
|
|
269
|
-
*
|
|
270
|
-
*/
|
|
271
|
-
getInfoForContextGroup({ contextGroupId }: {
|
|
272
|
-
contextGroupId: string;
|
|
273
|
-
}): OpenFin.ContextGroupInfo | undefined;
|
|
274
|
-
/**
|
|
275
|
-
* Gets all clients for a context group.
|
|
276
|
-
*
|
|
277
|
-
* @remarks **This is primarily used for platform windows. Views within a platform should not have to use this API.**
|
|
278
|
-
* Returns the Interop-Broker-defined context groups available for an entity to join.
|
|
279
|
-
*
|
|
280
|
-
* @param getAllClientsInContextGroupOptions - Contains contextGroupId, the context group you wish to get clients for.
|
|
281
|
-
*
|
|
282
|
-
*/
|
|
283
|
-
getAllClientsInContextGroup({ contextGroupId }: {
|
|
284
|
-
contextGroupId: string;
|
|
285
|
-
}): OpenFin.ClientIdentity[];
|
|
286
|
-
/**
|
|
287
|
-
* Responsible for launching of applications that can handle a given intent, and delegation of intents to those applications.
|
|
288
|
-
* Must be overridden.
|
|
289
|
-
*
|
|
290
|
-
* @remarks To make this call FDC3-Compliant it would need to return an IntentResolution.
|
|
291
|
-
*
|
|
292
|
-
* ```js
|
|
293
|
-
* interface IntentResolution {
|
|
294
|
-
* source: TargetApp;
|
|
295
|
-
* // deprecated, not assignable from intent listeners
|
|
296
|
-
* data?: object;
|
|
297
|
-
* version: string;
|
|
298
|
-
* }
|
|
299
|
-
* ```
|
|
300
|
-
*
|
|
301
|
-
* More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
|
|
302
|
-
*
|
|
303
|
-
* @param intent The combination of an action and a context that is passed to an application for resolution.
|
|
304
|
-
* @param clientIdentity Identity of the Client making the request.
|
|
305
|
-
*
|
|
306
|
-
* @example
|
|
307
|
-
* ```js
|
|
308
|
-
* // override call so we set intent target and create view that will handle it
|
|
309
|
-
* fin.Platform.init({
|
|
310
|
-
* interopOverride: async (InteropBroker) => {
|
|
311
|
-
* class Override extends InteropBroker {
|
|
312
|
-
* async handleFiredIntent(intent) {
|
|
313
|
-
* super.setIntentTarget(intent, { uuid: 'platform-uuid', name: 'intent-view' });
|
|
314
|
-
* const platform = fin.Platform.getCurrentSync();
|
|
315
|
-
* const win = fin.Window.wrapSync({ name: 'foo', uuid: 'platform-uuid' });
|
|
316
|
-
* const createdView = await platform.createView({ url: 'http://openfin.co', name: 'intent-view' }, win.identity);
|
|
317
|
-
* }
|
|
318
|
-
* }
|
|
319
|
-
* return new Override();
|
|
320
|
-
* }
|
|
321
|
-
* });
|
|
322
|
-
* ```
|
|
323
|
-
*/
|
|
324
|
-
handleFiredIntent(intent: OpenFin.Intent, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
|
|
325
|
-
/**
|
|
326
|
-
* Should be called in {@link InteropBroker#handleFiredIntent InteropBroker.handleFiredIntent}.
|
|
327
|
-
* While handleFiredIntent is responsible for launching applications, setIntentTarget is used to tell the InteropBroker which application should receive the intent when it is ready.
|
|
328
|
-
* @param intent The combination of an action and a context that is passed to an application for resolution.
|
|
329
|
-
* @param target - Identity of the target that will handle the intent.
|
|
330
|
-
*
|
|
331
|
-
*/
|
|
332
|
-
setIntentTarget(intent: OpenFin.Intent, target: OpenFin.Identity): Promise<void>;
|
|
333
|
-
/**
|
|
334
|
-
* Responsible for returning information on a particular Intent.
|
|
335
|
-
*
|
|
336
|
-
* @remarks Whenever InteropClient.getInfoForIntent is called this function will fire. The options argument gives you
|
|
337
|
-
* access to the intent name and any optional context that was passed and clientIdentity is the identity of the client
|
|
338
|
-
* that made the call. Ideally here you would fetch the info for the intent and return it with the shape that the
|
|
339
|
-
* InteropClient.getInfoForIntent call is expecting.
|
|
340
|
-
*
|
|
341
|
-
* To make this call FDC3-Compliant it would need to return an App Intent:
|
|
342
|
-
*
|
|
343
|
-
* ```js
|
|
344
|
-
* // {
|
|
345
|
-
* // intent: { name: "StartChat", displayName: "Chat" },
|
|
346
|
-
* // apps: [{ name: "Skype" }, { name: "Symphony" }, { name: "Slack" }]
|
|
347
|
-
* // }
|
|
348
|
-
* ```
|
|
349
|
-
*
|
|
350
|
-
* More information on the AppIntent type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/AppIntent).
|
|
351
|
-
*
|
|
352
|
-
* @param options
|
|
353
|
-
* @param clientIdentity Identity of the Client making the request.
|
|
354
|
-
*
|
|
355
|
-
* @example
|
|
356
|
-
* ```js
|
|
357
|
-
* fin.Platform.init({
|
|
358
|
-
* interopOverride: async (InteropBroker) => {
|
|
359
|
-
* class Override extends InteropBroker {
|
|
360
|
-
* async handleInfoForIntent(options, clientIdentity) {
|
|
361
|
-
* // Your code goes here.
|
|
362
|
-
* }
|
|
363
|
-
* }
|
|
364
|
-
* return new Override();
|
|
365
|
-
* }
|
|
366
|
-
* });
|
|
367
|
-
* ```
|
|
368
|
-
*/
|
|
369
|
-
handleInfoForIntent(options: OpenFin.InfoForIntentOptions, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
|
|
370
|
-
/**
|
|
371
|
-
* Responsible for returning information on which Intents are meant to handle a specific Context.
|
|
372
|
-
* Must be overridden.
|
|
373
|
-
*
|
|
374
|
-
* @remarks Responsible for returning information on which Intents are meant to handle a specific Context. Must be overridden.
|
|
375
|
-
*
|
|
376
|
-
* Whenever InteropClient.getInfoForIntentsByContext is called this function will fire. The context argument gives you access to the context that the client wants information on and clientIdentity is the identity of the client that made the call. Ideally here you would fetch the info for any intent that can handle and return it with the shape that the InteropClient.getInfoForIntentsByContext call is expecting.
|
|
377
|
-
*
|
|
378
|
-
* To make this call FDC3-Compliant it would need to return an array of AppIntents:
|
|
379
|
-
*
|
|
380
|
-
* ```js
|
|
381
|
-
* // [{
|
|
382
|
-
* // intent: { name: "StartCall", displayName: "Call" },
|
|
383
|
-
* // apps: [{ name: "Skype" }]
|
|
384
|
-
* // },
|
|
385
|
-
* // {
|
|
386
|
-
* // intent: { name: "StartChat", displayName: "Chat" },
|
|
387
|
-
* // apps: [{ name: "Skype" }, { name: "Symphony" }, { name: "Slack" }]
|
|
388
|
-
* // }];
|
|
389
|
-
* ```
|
|
390
|
-
*
|
|
391
|
-
* More information on the AppIntent type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/AppIntent).
|
|
392
|
-
*
|
|
393
|
-
* @param context Data passed between entities and applications.
|
|
394
|
-
* @param clientIdentity Identity of the Client making the request.
|
|
395
|
-
*
|
|
396
|
-
* @example
|
|
397
|
-
* ```js
|
|
398
|
-
* fin.Platform.init({
|
|
399
|
-
* interopOverride: async (InteropBroker) => {
|
|
400
|
-
* class Override extends InteropBroker {
|
|
401
|
-
* async handleInfoForIntentsByContext(context, clientIdentity) {
|
|
402
|
-
* // Your code goes here.
|
|
403
|
-
* }
|
|
404
|
-
* }
|
|
405
|
-
* return new Override();
|
|
406
|
-
* }
|
|
407
|
-
* });
|
|
408
|
-
* ```
|
|
409
|
-
*/
|
|
410
|
-
handleInfoForIntentsByContext(context: OpenFin.Context | OpenFin.FindIntentsByContextOptions, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
|
|
411
|
-
/**
|
|
412
|
-
* Responsible for resolving an Intent based on a specific Context.
|
|
413
|
-
* Must be overridden.
|
|
414
|
-
*
|
|
415
|
-
* @remarks Whenever InteropClient.fireIntentForContext is called this function will fire. The contextForIntent argument
|
|
416
|
-
* gives you access to the context that will be resolved to an intent. It also can optionally contain any metadata relevant
|
|
417
|
-
* to resolving it, like a specific app the client wants the context to be handled by. The clientIdentity is the identity
|
|
418
|
-
* of the client that made the call.
|
|
419
|
-
*
|
|
420
|
-
* To make this call FDC3-Compliant it would need to return an IntentResolution:
|
|
421
|
-
*
|
|
422
|
-
* ```js
|
|
423
|
-
* // {
|
|
424
|
-
* // intent: { name: "StartChat", displayName: "Chat" },
|
|
425
|
-
* // apps: [{ name: "Skype" }, { name: "Symphony" }, { name: "Slack" }]
|
|
426
|
-
* // }
|
|
427
|
-
* ```
|
|
428
|
-
*
|
|
429
|
-
* More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
|
|
430
|
-
*
|
|
431
|
-
* @param contextForIntent Data passed between entities and applications.
|
|
432
|
-
* @param clientIdentity Identity of the Client making the request.
|
|
433
|
-
*
|
|
434
|
-
* @example
|
|
435
|
-
* ```js
|
|
436
|
-
* fin.Platform.init({
|
|
437
|
-
* interopOverride: async (InteropBroker) => {
|
|
438
|
-
* class Override extends InteropBroker {
|
|
439
|
-
* async handleFiredIntentForContext(contextForIntent, clientIdentity) {
|
|
440
|
-
* // Your code goes here.
|
|
441
|
-
* }
|
|
442
|
-
* }
|
|
443
|
-
* return new Override();
|
|
444
|
-
* }
|
|
445
|
-
* });
|
|
446
|
-
* ```
|
|
447
|
-
*/
|
|
448
|
-
handleFiredIntentForContext(contextForIntent: OpenFin.ContextForIntent, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
|
|
449
|
-
/**
|
|
450
|
-
* Provides the identity of any Interop Client that disconnects from the Interop Broker. It is meant to be overriden.
|
|
451
|
-
* @param clientIdentity
|
|
452
|
-
*
|
|
453
|
-
* @example
|
|
454
|
-
* ```js
|
|
455
|
-
* fin.Platform.init({
|
|
456
|
-
* interopOverride: async (InteropBroker) => {
|
|
457
|
-
* class Override extends InteropBroker {
|
|
458
|
-
* async clientDisconnected(clientIdentity) {
|
|
459
|
-
* const { uuid, name } = clientIdentity;
|
|
460
|
-
* console.log(`Client with identity ${uuid}/${name} has been disconnected`);
|
|
461
|
-
* }
|
|
462
|
-
* }
|
|
463
|
-
* return new Override();
|
|
464
|
-
* }
|
|
465
|
-
* });
|
|
466
|
-
* ```
|
|
467
|
-
*/
|
|
468
|
-
clientDisconnected(clientIdentity: OpenFin.ClientIdentity): Promise<void>;
|
|
469
|
-
/**
|
|
470
|
-
* Responsible for resolving an fdc3.open call.
|
|
471
|
-
* Must be overridden.
|
|
472
|
-
* @param fdc3OpenOptions fdc3.open options
|
|
473
|
-
* @param clientIdentity Identity of the Client making the request.
|
|
474
|
-
*/
|
|
475
|
-
fdc3HandleOpen({ app, context }: {
|
|
476
|
-
app: TargetApp | AppIdentifier;
|
|
477
|
-
context: OpenFin.Context;
|
|
478
|
-
}, clientIdentity: OpenFin.ClientIdentity): Promise<void | AppIdentifier>;
|
|
479
|
-
/**
|
|
480
|
-
* Responsible for resolving the fdc3.findInstances call.
|
|
481
|
-
* Must be overridden
|
|
482
|
-
* @param app AppIdentifier that was passed to fdc3.findInstances
|
|
483
|
-
* @param clientIdentity Identity of the Client making the request.
|
|
484
|
-
*/
|
|
485
|
-
fdc3HandleFindInstances(app: AppIdentifier, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
|
|
486
|
-
/**
|
|
487
|
-
* Responsible for resolving the fdc3.getAppMetadata call.
|
|
488
|
-
* Must be overridden
|
|
489
|
-
* @param app AppIdentifier that was passed to fdc3.getAppMetadata
|
|
490
|
-
* @param clientIdentity Identity of the Client making the request.
|
|
491
|
-
*/
|
|
492
|
-
fdc3HandleGetAppMetadata(app: AppIdentifier, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
|
|
493
|
-
/**
|
|
494
|
-
* This function is called by the Interop Broker whenever a Context handler would fire.
|
|
495
|
-
* For FDC3 2.0 you would need to override this function and add the contextMetadata as
|
|
496
|
-
* part of the Context object. Then would you need to call
|
|
497
|
-
* super.invokeContextHandler passing it this new Context object along with the clientIdentity and handlerId
|
|
498
|
-
* @param clientIdentity
|
|
499
|
-
* @param handlerId
|
|
500
|
-
* @param context
|
|
501
|
-
*
|
|
502
|
-
* @example
|
|
503
|
-
* ```js
|
|
504
|
-
* fin.Platform.init({
|
|
505
|
-
* interopOverride: async (InteropBroker) => {
|
|
506
|
-
* class Override extends InteropBroker {
|
|
507
|
-
* async invokeContextHandler(options, clientIdentity) {
|
|
508
|
-
* return super.invokeContextHandler(clientIdentity, handlerId, {
|
|
509
|
-
* ...context,
|
|
510
|
-
* contextMetadata: {
|
|
511
|
-
* source: {
|
|
512
|
-
* appId: 'openfin-app',
|
|
513
|
-
* instanceId: '3D54D456D9HT0'
|
|
514
|
-
* }
|
|
515
|
-
* }
|
|
516
|
-
* });
|
|
517
|
-
* }
|
|
518
|
-
* }
|
|
519
|
-
* return new Override();
|
|
520
|
-
* }
|
|
521
|
-
* });
|
|
522
|
-
* ```
|
|
523
|
-
*/
|
|
524
|
-
invokeContextHandler(clientIdentity: OpenFin.ClientIdentity, handlerId: string, context: OpenFin.Context): Promise<void>;
|
|
525
|
-
/**
|
|
526
|
-
* This function is called by the Interop Broker whenever an Intent handler would fire.
|
|
527
|
-
* For FDC3 2.0 you would need to override this function and add the contextMetadata as
|
|
528
|
-
* part of the Context object inside the Intent object. Then would you need to call
|
|
529
|
-
* super.invokeIntentHandler passing it this new Intent object along with the clientIdentity and handlerId
|
|
530
|
-
* @param ClientIdentity
|
|
531
|
-
* @param handlerId
|
|
532
|
-
* @param context
|
|
533
|
-
*
|
|
534
|
-
* @example
|
|
535
|
-
* ```js
|
|
536
|
-
* fin.Platform.init({
|
|
537
|
-
* interopOverride: async (InteropBroker) => {
|
|
538
|
-
* class Override extends InteropBroker {
|
|
539
|
-
* async invokeIntentHandler(options, clientIdentity) {
|
|
540
|
-
* const { context } = intent;
|
|
541
|
-
* return super.invokeIntentHandler(clientIdentity, handlerId, {
|
|
542
|
-
* ...intent,
|
|
543
|
-
* context: {
|
|
544
|
-
* ...context,
|
|
545
|
-
* contextMetadata: {
|
|
546
|
-
* source: {
|
|
547
|
-
* appId: 'openfin-app',
|
|
548
|
-
* instanceId: '3D54D456D9HT0'
|
|
549
|
-
* }
|
|
550
|
-
* }
|
|
551
|
-
* }
|
|
552
|
-
* });
|
|
553
|
-
* }
|
|
554
|
-
* }
|
|
555
|
-
* return new Override();
|
|
556
|
-
* }
|
|
557
|
-
* });
|
|
558
|
-
* ```
|
|
559
|
-
*/
|
|
560
|
-
invokeIntentHandler(clientIdentity: OpenFin.ClientIdentity, handlerId: string, intent: OpenFin.Intent): Promise<void>;
|
|
561
|
-
/**
|
|
562
|
-
* Responsible for resolving fdc3.getInfo for FDC3 2.0
|
|
563
|
-
* Would need to return the optionalFeatures and appMetadata for the {@link https://fdc3.finos.org/docs/api/ref/Metadata#implementationmetadata ImplementationMetadata}.
|
|
564
|
-
* Must be overridden.
|
|
565
|
-
* @param clientIdentity
|
|
566
|
-
*
|
|
567
|
-
*/
|
|
568
|
-
fdc3HandleGetInfo(payload: {
|
|
569
|
-
fdc3Version: string;
|
|
570
|
-
}, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
|
|
571
|
-
/**
|
|
572
|
-
* Returns an array of info for each Interop Client connected to the Interop Broker.
|
|
573
|
-
*
|
|
574
|
-
* FDC3 2.0: Use the endpointId in the ClientInfo as the instanceId when generating
|
|
575
|
-
* an AppIdentifier.
|
|
576
|
-
*
|
|
577
|
-
* @remarks FDC3 2.0 Note: When needing an instanceId to generate an AppIdentifier use this call to
|
|
578
|
-
* get the endpointId and use it as the instanceId. In the Example below we override handleFiredIntent
|
|
579
|
-
* and then call super.getAllClientInfo to generate the AppIdentifier for the IntentResolution.
|
|
580
|
-
*
|
|
581
|
-
*
|
|
582
|
-
* @example
|
|
583
|
-
* ```js
|
|
584
|
-
* // FDC3 2.0 Example:
|
|
585
|
-
* fin.Platform.init({
|
|
586
|
-
* interopOverride: async (InteropBroker, ...args) => {
|
|
587
|
-
* class Override extends InteropBroker {
|
|
588
|
-
* async handleFiredIntent(intent) {
|
|
589
|
-
* super.setIntentTarget(intent, { uuid: 'platform-uuid', name: 'intent-view' });
|
|
590
|
-
* const platform = fin.Platform.getCurrentSync();
|
|
591
|
-
* const win = fin.Window.wrapSync({ name: 'foo', uuid: 'platform-uuid' });
|
|
592
|
-
* const createdView = await platform.createView({ url: 'http://openfin.co', name: 'intent-view' }, win.identity);
|
|
593
|
-
*
|
|
594
|
-
* const allClientInfo = await super.getAllClientInfo();
|
|
595
|
-
*
|
|
596
|
-
* const infoForTarget = allClientInfo.find((clientInfo) => {
|
|
597
|
-
* return clientInfo.uuid === 'platform-uuid' && clientInfo.name === 'intent-view';
|
|
598
|
-
* });
|
|
599
|
-
*
|
|
600
|
-
* const source = {
|
|
601
|
-
* appId: 'intent-view',
|
|
602
|
-
* instanceId: infoForTarget.endpointId
|
|
603
|
-
* }
|
|
604
|
-
*
|
|
605
|
-
* return {
|
|
606
|
-
* source,
|
|
607
|
-
* intent: intent.name
|
|
608
|
-
* }
|
|
609
|
-
*
|
|
610
|
-
* }
|
|
611
|
-
* }
|
|
612
|
-
* return new Override(...args);
|
|
613
|
-
* }
|
|
614
|
-
* });
|
|
615
|
-
* ```
|
|
616
|
-
*/
|
|
617
|
-
getAllClientInfo(): Promise<Array<OpenFin.ClientInfo>>;
|
|
618
|
-
decorateSnapshot(snapshot: OpenFin.Snapshot): OpenFin.Snapshot;
|
|
619
|
-
applySnapshot(snapshot: OpenFin.Snapshot, options: OpenFin.ApplySnapshotOptions): void;
|
|
620
|
-
updateExistingClients(contextGroupStates: OpenFin.ContextGroupStates): void;
|
|
621
|
-
getContextGroupStates(): OpenFin.ContextGroupStates;
|
|
622
|
-
rehydrateContextGroupStates(incomingContextGroupStates: OpenFin.ContextGroupStates): void;
|
|
623
|
-
contextHandlerRegistered({ contextType, handlerId }: {
|
|
624
|
-
contextType: string | undefined;
|
|
625
|
-
handlerId: string;
|
|
626
|
-
}, clientIdentity: OpenFin.ClientIdentity): void;
|
|
627
|
-
intentHandlerRegistered(payload: any, clientIdentity: OpenFin.ClientIdentity): Promise<void>;
|
|
628
|
-
removeContextHandler({ handlerId }: {
|
|
629
|
-
handlerId: string;
|
|
630
|
-
}, clientIdentity: OpenFin.ClientIdentity): void;
|
|
631
|
-
handleJoinSessionContextGroup({ sessionContextGroupId }: {
|
|
632
|
-
sessionContextGroupId: string;
|
|
633
|
-
}, clientIdentity: OpenFin.ClientIdentity): {
|
|
634
|
-
hasConflict: boolean;
|
|
635
|
-
};
|
|
636
|
-
private getClientState;
|
|
637
|
-
private static toObject;
|
|
638
|
-
static checkContextIntegrity(context: OpenFin.Context): {
|
|
639
|
-
isValid: true;
|
|
640
|
-
} | {
|
|
641
|
-
isValid: false;
|
|
642
|
-
reason: string;
|
|
643
|
-
};
|
|
644
|
-
private static hasEndpointId;
|
|
645
|
-
static isContextTypeCompatible(contextType: string, registeredContextType: string | undefined): boolean;
|
|
646
|
-
private setContextGroupMap;
|
|
647
|
-
private setCurrentContextGroupInClientOptions;
|
|
648
|
-
private setupChannelProvider;
|
|
649
|
-
private wireChannel;
|
|
650
|
-
/**
|
|
651
|
-
* Can be used to completely prevent a connection. Return false to prevent connections. Allows all connections by default.
|
|
652
|
-
* @param _id the identity tryinc to connect
|
|
653
|
-
* @param _connectionPayload optional payload to use in custom implementations, will be undefined by default
|
|
654
|
-
*/
|
|
655
|
-
isConnectionAuthorized(_id: Identity, _connectionPayload?: any): Promise<boolean> | boolean;
|
|
656
|
-
/**
|
|
657
|
-
* Called before every action to check if this entity should be allowed to take the action.
|
|
658
|
-
* Return false to prevent the action
|
|
659
|
-
* @param _action the string action to authorize in camel case
|
|
660
|
-
* @param _payload the data being sent for this action
|
|
661
|
-
* @param _identity the connection attempting to dispatch this action
|
|
662
|
-
*/
|
|
663
|
-
isActionAuthorized(_action: string, _payload: any, _identity: OpenFin.ClientIdentity): Promise<boolean> | boolean;
|
|
664
|
-
}
|
|
665
|
-
export {};
|