@openfin/cloud-interop 0.4.0 → 0.38.39

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 CHANGED
@@ -1,4 +1,4 @@
1
- Learn more about OpenFin licensing at the links listed below or email us at support@openfin.co with questions.
2
-
3
- - [Developer agreement](https://openfin.co/developer-agreement)
4
-
1
+ Learn more about OpenFin licensing at the links listed below or email us at support@openfin.co with questions.
2
+
3
+ - [Developer agreement](https://openfin.co/developer-agreement)
4
+
package/README.md CHANGED
@@ -1,55 +1,55 @@
1
- # @openfin/cloud-interop
2
-
3
- This package contains an override that enables Cloud Interop for OpenFin `InteropBroker`'s unlocking Interop across applications and devices.
4
-
5
- Overrides are passed to `fin.Platform.init` when initializing a platform or to `fin.Interop.init` when creating an `InteropBroker` directly.
6
-
7
- Once overriden the `InteropBroker` will connect to Cloud Interop. `Context` will be sent to the Cloud Interop server and the broker will receive `Context` updates from other any other connected brokers in the shared session.
8
-
9
- ## Auth
10
-
11
- Using the service currently requires user credentials provided by OpenFin, please contact support@openfin.co.
12
-
13
- ## Usage
14
-
15
- In a Platform:
16
-
17
- ```typescript
18
- import { cloudInteropOverride } from "@openfin/cloud-interop";
19
- import { ExampleOverride } from "./example";
20
-
21
- const cloudConfig = {
22
- userId: "andy", // Credentials provided by OpenFin
23
- password: "asdf1234", // Credentials provided by OpenFin
24
- platformId: "8cef8205-d5a8-41c4-b368-47475b32c019", // Shared identifier for apps that should communicate
25
- url: "<CLOUD_INTEROP_SERVER_URL>",
26
- sourceId: fin.me.identity.uuid,
27
- source: "Desktop",
28
- };
29
-
30
- const InitializedCloudInteropOverride = await cloudInteropOverride(cloudConfig);
31
-
32
- // Ordering is important, ensure Cloud Interop Override is at the end of the list to send overriden Context to the cloud
33
- await fin.Platform.init({
34
- interopOverride: [ExampleOverride, InitializedCloudInteropOverride],
35
- });
36
- ```
37
-
38
- When creating an `InteropBroker` directly:
39
-
40
- ```typescript
41
- import { cloudInteropOverride } from "@openfin/cloud-interop";
42
-
43
- const cloudConfig = {
44
- userId: "andy", // Credentials provided by OpenFin
45
- password: "asdf1234", // Credentials provided by OpenFin
46
- platformId: "8cef8205-d5a8-41c4-b368-47475b32c019", // Shared identifier for apps that should communicate
47
- url: "<CLOUD_INTEROP_SERVER_URL>",
48
- sourceId: fin.me.identity.uuid,
49
- source: "Desktop",
50
- };
51
-
52
- const InitializedCloudInteropOverride = await cloudInteropOverride(cloudConfig);
53
-
54
- await fin.Interop.init(fin.me.uuid, InitializedCloudInteropOverride);
55
- ```
1
+ # @openfin/cloud-interop
2
+
3
+ This package contains an override that enables Cloud Interop for OpenFin `InteropBroker`'s unlocking Interop across applications and devices.
4
+
5
+ Overrides are passed to `fin.Platform.init` when initializing a platform or to `fin.Interop.init` when creating an `InteropBroker` directly.
6
+
7
+ Once overriden the `InteropBroker` will connect to Cloud Interop. `Context` will be sent to the Cloud Interop server and the broker will receive `Context` updates from other any other connected brokers in the shared session.
8
+
9
+ ## Auth
10
+
11
+ Using the service currently requires user credentials provided by OpenFin, please contact support@openfin.co.
12
+
13
+ ## Usage
14
+
15
+ In a Platform:
16
+
17
+ ```typescript
18
+ import { cloudInteropOverride } from "@openfin/cloud-interop";
19
+ import { ExampleOverride } from "./example";
20
+
21
+ const cloudConfig = {
22
+ userId: "andy", // Credentials provided by OpenFin
23
+ password: "asdf1234", // Credentials provided by OpenFin
24
+ platformId: "8cef8205-d5a8-41c4-b368-47475b32c019", // Shared identifier for apps that should communicate
25
+ url: "<CLOUD_INTEROP_SERVER_URL>",
26
+ sourceId: fin.me.identity.uuid,
27
+ source: "Desktop",
28
+ };
29
+
30
+ const InitializedCloudInteropOverride = await cloudInteropOverride(cloudConfig);
31
+
32
+ // Ordering is important, ensure Cloud Interop Override is at the end of the list to send overriden Context to the cloud
33
+ await fin.Platform.init({
34
+ interopOverride: [ExampleOverride, InitializedCloudInteropOverride],
35
+ });
36
+ ```
37
+
38
+ When creating an `InteropBroker` directly:
39
+
40
+ ```typescript
41
+ import { cloudInteropOverride } from "@openfin/cloud-interop";
42
+
43
+ const cloudConfig = {
44
+ userId: "andy", // Credentials provided by OpenFin
45
+ password: "asdf1234", // Credentials provided by OpenFin
46
+ platformId: "8cef8205-d5a8-41c4-b368-47475b32c019", // Shared identifier for apps that should communicate
47
+ url: "<CLOUD_INTEROP_SERVER_URL>",
48
+ sourceId: fin.me.identity.uuid,
49
+ source: "Desktop",
50
+ };
51
+
52
+ const InitializedCloudInteropOverride = await cloudInteropOverride(cloudConfig);
53
+
54
+ await fin.Interop.init(fin.me.uuid, InitializedCloudInteropOverride);
55
+ ```
@@ -1,5 +1,4 @@
1
1
  /// <reference types="node" />
2
- import mqtt from 'mqtt';
3
2
  import { Client, ConnectParams, Source, IntentDetail } from './interfaces';
4
3
  export type { ConnectParams };
5
4
  interface ConnectResponse {
@@ -16,8 +15,8 @@ export declare class CloudInteropAPI implements Client {
16
15
  private reconnectRetries;
17
16
  private contextListener?;
18
17
  constructor(connectParams: ConnectParams);
19
- get sessionDetails(): ConnectResponse | undefined;
20
- get mqttClient(): mqtt.MqttClient | undefined;
18
+ get sessionDetails(): typeof this._sessionDetails;
19
+ get mqttClient(): typeof this._mqttClient;
21
20
  connect(params: ConnectParams): Promise<void>;
22
21
  disconnect(): Promise<void>;
23
22
  setContext(contextGroup: string, context: object): Promise<void>;
@@ -1,2 +1,2 @@
1
- import { cloudInteropOverride, type CloudInteropOverrideParams, type CloudInteropConnectionStates } from "./override";
1
+ import { cloudInteropOverride, type CloudInteropOverrideParams, type CloudInteropConnectionStates } from './override';
2
2
  export { cloudInteropOverride, type CloudInteropOverrideParams, type CloudInteropConnectionStates };