@openfin/cloud-interop 0.41.63 → 0.41.64
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +67 -19
- package/out/index.js +1196 -515
- package/out/override.d.ts +8 -2
- package/package.json +3 -4
- package/out/api.d.ts +0 -30
- package/out/interfaces.d.ts +0 -133
package/out/override.d.ts
CHANGED
@@ -1,5 +1,11 @@
|
|
1
|
+
import { ConnectParameters } from '@openfin/cloud-interop-core-api';
|
1
2
|
import type OpenFin from '@openfin/core';
|
2
|
-
|
3
|
-
|
3
|
+
export type CloudInteropOverrideParams = ConnectParameters & {
|
4
|
+
url: string;
|
5
|
+
};
|
4
6
|
export type CloudInteropConnectionStates = 'connected' | 'reconnecting' | 'disconnected';
|
7
|
+
/**
|
8
|
+
* Enhances InteropBroker with Cloud Interop functionality
|
9
|
+
* @param {CloudInteropOverrideParams} config Configuration to connect to the Cloud Interop service
|
10
|
+
*/
|
5
11
|
export declare function cloudInteropOverride(config: CloudInteropOverrideParams): Promise<OpenFin.ConstructorOverride<OpenFin.InteropBroker>>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@openfin/cloud-interop",
|
3
|
-
"version": "0.41.
|
3
|
+
"version": "0.41.64",
|
4
4
|
"description": "",
|
5
5
|
"private": false,
|
6
6
|
"files": [
|
@@ -19,10 +19,9 @@
|
|
19
19
|
"author": "",
|
20
20
|
"license": "SEE LICENSE IN LICENSE.md",
|
21
21
|
"peerDependencies": {
|
22
|
-
"@openfin/core": "41.100.
|
22
|
+
"@openfin/core": "41.100.60"
|
23
23
|
},
|
24
24
|
"dependencies": {
|
25
|
-
"
|
26
|
-
"mqtt": "^5.3.1"
|
25
|
+
"@openfin/cloud-interop-core-api": "^0.0.1-alpha.fba3468"
|
27
26
|
}
|
28
27
|
}
|
package/out/api.d.ts
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
import { Client, ConnectParams, Source, IntentDetail } from './interfaces';
|
3
|
-
export type { ConnectParams };
|
4
|
-
interface ConnectResponse {
|
5
|
-
sessionId: string;
|
6
|
-
sessionRootTopic: string;
|
7
|
-
mqttUrl: string;
|
8
|
-
mqttToken?: string;
|
9
|
-
}
|
10
|
-
export declare class CloudInteropAPI implements Client {
|
11
|
-
private connectParams;
|
12
|
-
private _sessionDetails?;
|
13
|
-
private _mqttClient?;
|
14
|
-
private reconnectRetryLimit;
|
15
|
-
private reconnectRetries;
|
16
|
-
private contextListener?;
|
17
|
-
constructor(connectParams: ConnectParams);
|
18
|
-
get sessionDetails(): typeof this._sessionDetails;
|
19
|
-
get mqttClient(): typeof this._mqttClient;
|
20
|
-
connect(params: ConnectParams): Promise<void>;
|
21
|
-
disconnect(): Promise<void>;
|
22
|
-
setContext(contextGroup: string, context: object): Promise<void>;
|
23
|
-
addContextListener(callback: (contextGroup: string, context: object, source: Source) => void): void;
|
24
|
-
startIntentDiscovery(intentName?: string | undefined, context?: object | undefined): Promise<string>;
|
25
|
-
endIntentDiscovery(discoveryId: string): Promise<void>;
|
26
|
-
sendIntentDetail(discoveryId: string, intentDetail: IntentDetail): Promise<void>;
|
27
|
-
raiseIntent(targetSession: string, intentInstanceId: string, context: Object): Promise<any>;
|
28
|
-
addIntentDetailListener(callback: (discoveryId: string, intentDetail: IntentDetail) => void): void;
|
29
|
-
handleCommand(topic: string, message: Buffer, sessionDetails: ConnectResponse): void;
|
30
|
-
}
|
package/out/interfaces.d.ts
DELETED
@@ -1,133 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Represents the parameters to use to connect to an interop server
|
3
|
-
*/
|
4
|
-
export interface ConnectParams {
|
5
|
-
/**
|
6
|
-
* The URL of the server to connect to.
|
7
|
-
*/
|
8
|
-
url: string;
|
9
|
-
/**
|
10
|
-
* The user to connect as. Credentials provided by OpenFin.
|
11
|
-
*/
|
12
|
-
userId: string;
|
13
|
-
/**
|
14
|
-
* Password for the user. Credentials provided by OpenFin.
|
15
|
-
*/
|
16
|
-
password: string;
|
17
|
-
/**
|
18
|
-
* ID for a group of shared applications.
|
19
|
-
*/
|
20
|
-
platformId: string;
|
21
|
-
/**
|
22
|
-
* An identifier for the source environment e.g. a hostname, a browser name etc.
|
23
|
-
*/
|
24
|
-
sourceId?: string;
|
25
|
-
/**
|
26
|
-
* A display name for the source environment e.g. Andys Mobile
|
27
|
-
*/
|
28
|
-
sourceDisplayName?: string;
|
29
|
-
/**
|
30
|
-
* Specifies an optional extra divider to use that allows separation of interop messages for the
|
31
|
-
* same user
|
32
|
-
* defaults to "default"
|
33
|
-
*/
|
34
|
-
realm?: string;
|
35
|
-
}
|
36
|
-
/**
|
37
|
-
* Represents a session
|
38
|
-
*/
|
39
|
-
export interface InteropSession {
|
40
|
-
sessionId: string;
|
41
|
-
}
|
42
|
-
/**
|
43
|
-
* Represents a source session
|
44
|
-
*/
|
45
|
-
export interface Source {
|
46
|
-
/**
|
47
|
-
* Source session id
|
48
|
-
*/
|
49
|
-
sessionId: string;
|
50
|
-
/**
|
51
|
-
* source environment id
|
52
|
-
*/
|
53
|
-
sourceId: string;
|
54
|
-
/**
|
55
|
-
* source environment display name
|
56
|
-
*/
|
57
|
-
sourceDisplayName: string;
|
58
|
-
}
|
59
|
-
/**
|
60
|
-
* Represents the details of an intent found during discovery
|
61
|
-
*/
|
62
|
-
export interface IntentDetail {
|
63
|
-
/**
|
64
|
-
* The location of the intent implementation
|
65
|
-
*/
|
66
|
-
source: Source;
|
67
|
-
/**
|
68
|
-
* The instance id of the intent
|
69
|
-
*/
|
70
|
-
intentInstanceId: string;
|
71
|
-
/**
|
72
|
-
* The name of the intent
|
73
|
-
*/
|
74
|
-
intentName: string;
|
75
|
-
}
|
76
|
-
export interface Client {
|
77
|
-
/**
|
78
|
-
* Connects to an interop server and returns a session
|
79
|
-
* @param params The parameters to use to connect
|
80
|
-
*/
|
81
|
-
connect(params: ConnectParams): Promise<void>;
|
82
|
-
/**
|
83
|
-
* Disconnects from an interop server
|
84
|
-
*/
|
85
|
-
disconnect(): Promise<void>;
|
86
|
-
/**
|
87
|
-
* Publishes a new context for the given context group to the user other connected sessions
|
88
|
-
* @param contextGroup
|
89
|
-
* @param context
|
90
|
-
*/
|
91
|
-
setContext(contextGroup: string, context: object): Promise<void>;
|
92
|
-
/**
|
93
|
-
* Adds a listener for any received context changes
|
94
|
-
* @param callback
|
95
|
-
*/
|
96
|
-
addContextListener(callback: (contextGroup: string, context: object, source: Source) => void): void;
|
97
|
-
/**
|
98
|
-
* Starts the remote intent discovery flow
|
99
|
-
*
|
100
|
-
* @param intentName The name of the intent to discover when discovering by name
|
101
|
-
* @param context The context to use when discovering by context
|
102
|
-
*
|
103
|
-
* @returns A discovery id that can be used to end the discovery flow
|
104
|
-
*/
|
105
|
-
startIntentDiscovery(intentName?: string, context?: object): Promise<string>;
|
106
|
-
/**
|
107
|
-
* Ends the remote intent discovery flow
|
108
|
-
*
|
109
|
-
* @param discoveryId The discovery id returned from startIntentDiscovery
|
110
|
-
*/
|
111
|
-
endIntentDiscovery(discoveryId: string): Promise<void>;
|
112
|
-
/**
|
113
|
-
* Any client that is responding to an intent discovery request
|
114
|
-
* should call this method to send the details of an intent to the requesting client
|
115
|
-
* As intents are registered on each client and during a previously started intent discovery flow, this method
|
116
|
-
* can be called multiple times to support live intent discovery
|
117
|
-
*/
|
118
|
-
sendIntentDetail(discoveryId: string, intentDetail: IntentDetail): Promise<void>;
|
119
|
-
/**
|
120
|
-
* Raises the given intent on the given session
|
121
|
-
*
|
122
|
-
* @param targetSession The session to raise the intent on
|
123
|
-
* @param intentInstanceId The instance id of the intent to raise
|
124
|
-
* @param context The context to use when raising the intent
|
125
|
-
*
|
126
|
-
* @returns A promise that resolves to the result of the intent invocation
|
127
|
-
*/
|
128
|
-
raiseIntent(targetSession: string, intentInstanceId: string, context: Object): Promise<any>;
|
129
|
-
/**
|
130
|
-
* Adds a listener for any received intent details in a client that has invoked startIntentDiscovery
|
131
|
-
*/
|
132
|
-
addIntentDetailListener(callback: (discoveryId: string, intentDetail: IntentDetail) => void): void;
|
133
|
-
}
|