@openfin/cloud-interop-core-api 0.0.1-alpha.9be9ebc → 0.0.1-alpha.9c2e07e
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/README.md +2 -2
- package/bundle.d.ts +883 -0
- package/index.cjs +758 -0
- package/{dist/index.cjs → index.mjs} +177 -59
- package/package.json +16 -229
- package/dist/api.d.ts +0 -59
- package/dist/controllers/event.controller.d.ts +0 -8
- package/dist/controllers/index.d.ts +0 -2
- package/dist/controllers/intent.controller.d.ts +0 -13
- package/dist/errors/api.error.d.ts +0 -7
- package/dist/index.d.ts +0 -6
- package/dist/index.mjs +0 -638
- package/dist/interfaces/connect.interface.d.ts +0 -85
- package/dist/interfaces/event.interface.d.ts +0 -15
- package/dist/interfaces/index.d.ts +0 -3
- package/dist/interfaces/intents.interface.d.ts +0 -22
- package/dist/utils.d.ts +0 -25
package/dist/api.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { AppIdentifier, AppIntent, IntentResult } from '@openfin/shared-utils';
|
|
2
|
-
import mqtt from 'mqtt';
|
|
3
|
-
import { CloudInteropSettings, ConnectParameters, CreateSessionResponse } from './interfaces/connect.interface';
|
|
4
|
-
import { EventMap, RaiseIntentAPIOptions, StartIntentDiscoveryOptions } from './interfaces';
|
|
5
|
-
/**
|
|
6
|
-
* Represents a single connection to a Cloud Interop service
|
|
7
|
-
*
|
|
8
|
-
* @export
|
|
9
|
-
* @class CloudInteropAPI
|
|
10
|
-
* @implements {Client}
|
|
11
|
-
*/
|
|
12
|
-
export declare class CloudInteropAPI {
|
|
13
|
-
#private;
|
|
14
|
-
constructor(cloudInteropSettings: CloudInteropSettings);
|
|
15
|
-
get sessionDetails(): CreateSessionResponse | undefined;
|
|
16
|
-
get mqttClient(): mqtt.MqttClient | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Connects and creates a session on the Cloud Interop service
|
|
19
|
-
*
|
|
20
|
-
* @param {ConnectParameters} parameters - The parameters to use to connect
|
|
21
|
-
* @return {*} {Promise<void>}
|
|
22
|
-
* @memberof CloudInteropAPI
|
|
23
|
-
* @throws {CloudInteropAPIError} - If an error occurs during connection
|
|
24
|
-
* @throws {AuthorizationError} - If the connection is unauthorized
|
|
25
|
-
*/
|
|
26
|
-
connect(parameters: ConnectParameters): Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Disconnects from the Cloud Interop service
|
|
29
|
-
*
|
|
30
|
-
* @return {*} {Promise<void>}
|
|
31
|
-
* @memberof CloudInteropAPI
|
|
32
|
-
* @throws {CloudInteropAPIError} - If an error occurs during disconnection
|
|
33
|
-
*/
|
|
34
|
-
disconnect(): Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Publishes a new context for the given context group to the other connected sessions
|
|
37
|
-
*
|
|
38
|
-
* @param {string} contextGroup - The context group to publish to
|
|
39
|
-
* @param {object} context - The context to publish
|
|
40
|
-
* @return {*} {Promise<void>}
|
|
41
|
-
* @memberof CloudInteropAPI
|
|
42
|
-
*/
|
|
43
|
-
setContext(contextGroup: string, context: object): Promise<void>;
|
|
44
|
-
/**
|
|
45
|
-
* Starts an intent discovery operation
|
|
46
|
-
*
|
|
47
|
-
* @return {*} {Promise<void>}
|
|
48
|
-
* @memberof CloudInteropAPI
|
|
49
|
-
* @throws {CloudInteropAPIError} - If an error occurs during intent discovery
|
|
50
|
-
*/
|
|
51
|
-
startIntentDiscovery(options: StartIntentDiscoveryOptions): Promise<void>;
|
|
52
|
-
raiseIntent(options: RaiseIntentAPIOptions): Promise<void>;
|
|
53
|
-
reportAppIntents(discoveryId: string, intents: AppIntent[]): Promise<boolean>;
|
|
54
|
-
sendIntentResult(initiatingSessionId: string, result: IntentResult): Promise<void>;
|
|
55
|
-
parseSessionId(appId: AppIdentifier | string): string;
|
|
56
|
-
addEventListener<K extends keyof EventMap>(type: K, callback: EventMap[K]): void;
|
|
57
|
-
removeEventListener<K extends keyof EventMap>(type: K, callback: EventMap[K]): void;
|
|
58
|
-
once<K extends keyof EventMap>(type: K, callback: EventMap[K]): void;
|
|
59
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { EventMap } from '../interfaces';
|
|
2
|
-
export declare class EventController {
|
|
3
|
-
#private;
|
|
4
|
-
addEventListener<K extends keyof EventMap>(type: K, callback: EventMap[K]): void;
|
|
5
|
-
removeEventListener<K extends keyof EventMap>(type: K, callback: EventMap[K]): void;
|
|
6
|
-
once<K extends keyof EventMap>(type: K, callback: EventMap[K]): void;
|
|
7
|
-
emitEvent<K extends keyof EventMap>(type: K, ...args: Parameters<EventMap[K]>): void;
|
|
8
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AppIntent, CommandMessage, IntentResult } from '@openfin/shared-utils';
|
|
2
|
-
import mqtt from 'mqtt';
|
|
3
|
-
import { CloudInteropLogger, ConnectParameters, CreateSessionResponse, RaiseIntentAPIOptions, StartIntentDiscoveryOptions } from '../interfaces';
|
|
4
|
-
import { EventController } from './event.controller';
|
|
5
|
-
export declare class IntentController {
|
|
6
|
-
#private;
|
|
7
|
-
constructor(url: string, mqttClient: mqtt.MqttClient, sessionDetails: CreateSessionResponse, connectionParameters: ConnectParameters, events: EventController, logger: CloudInteropLogger);
|
|
8
|
-
startIntentDiscovery(options: StartIntentDiscoveryOptions): Promise<void>;
|
|
9
|
-
raiseIntent({ raiseOptions, appId }: RaiseIntentAPIOptions): Promise<void>;
|
|
10
|
-
reportAppIntents(discoveryId: string, intents: AppIntent[]): Promise<boolean>;
|
|
11
|
-
sendIntentResult(initiatingSessionId: string, result: IntentResult): Promise<void>;
|
|
12
|
-
handleCommandMessage(message: CommandMessage): void;
|
|
13
|
-
}
|
package/dist/index.d.ts
DELETED