@openfin/cloud-interop-core-api 0.0.1-alpha.e7138f8 → 0.0.1-alpha.e725b83
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/bundle.d.ts +882 -0
- package/index.cjs +665 -0
- package/index.mjs +661 -0
- package/package.json +16 -229
- package/dist/api.d.ts +0 -76
- package/dist/errors/api.error.d.ts +0 -7
- package/dist/index.cjs +0 -487
- package/dist/index.d.ts +0 -5
- package/dist/index.mjs +0 -483
- package/dist/interfaces/connect.interface.d.ts +0 -95
- package/dist/interfaces/event.interface.d.ts +0 -15
- package/dist/interfaces/index.d.ts +0 -2
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
export type LogLevel = 'log' | 'debug' | 'info' | 'warn' | 'error';
|
|
2
|
-
/**
|
|
3
|
-
* Represents a logging function to be used by the cloud interop client
|
|
4
|
-
*/
|
|
5
|
-
export type CloudInteropLogger = (level: LogLevel, message: string) => void;
|
|
6
|
-
/**
|
|
7
|
-
* Represents the parameters to use to connect to an interop server
|
|
8
|
-
*/
|
|
9
|
-
export type ConnectParameters = {
|
|
10
|
-
/**
|
|
11
|
-
* ID for a group of shared applications.
|
|
12
|
-
* This acts as a namespace for the interop messages that allows separation of messages between different groups of applications for the same user
|
|
13
|
-
*/
|
|
14
|
-
platformId: string;
|
|
15
|
-
/**
|
|
16
|
-
* An identifier for the source environment e.g. a hostname, a browser name etc.
|
|
17
|
-
*/
|
|
18
|
-
sourceId: string;
|
|
19
|
-
/**
|
|
20
|
-
* A display name for the source environment e.g. Andys Mobile
|
|
21
|
-
*/
|
|
22
|
-
sourceDisplayName?: string;
|
|
23
|
-
/**
|
|
24
|
-
* The maximum number of times to retry connecting to the cloud interop service when the connection is dropped
|
|
25
|
-
* defaults to 30
|
|
26
|
-
*/
|
|
27
|
-
reconnectRetryLimit?: number;
|
|
28
|
-
/**
|
|
29
|
-
* Specifies how often keep alive messages should be sent to the cloud interop service in seconds
|
|
30
|
-
* defaults to 30
|
|
31
|
-
*/
|
|
32
|
-
keepAliveIntervalSeconds?: number;
|
|
33
|
-
/**
|
|
34
|
-
* Optional function to call with any logging messages to allow integration with the host application's logging
|
|
35
|
-
*
|
|
36
|
-
* defaults to console.log
|
|
37
|
-
*/
|
|
38
|
-
logger?: CloudInteropLogger;
|
|
39
|
-
/**
|
|
40
|
-
* Determines the type of authentication to use with the service gateway
|
|
41
|
-
* defaults to 'none'
|
|
42
|
-
*
|
|
43
|
-
* 'jwt' - Use JWT authentication, in this case jwtAuthenticationParameters must also be provided
|
|
44
|
-
* 'basic' - Use basic authentication, in this case basicAuthenticationParameters must also be provided
|
|
45
|
-
* 'default' - Authentication will be inherited from the current session
|
|
46
|
-
*/
|
|
47
|
-
authenticationType?: 'jwt' | 'basic' | 'default';
|
|
48
|
-
/**
|
|
49
|
-
* Optional parameters for basic authentication
|
|
50
|
-
*/
|
|
51
|
-
basicAuthenticationParameters?: {
|
|
52
|
-
/**
|
|
53
|
-
* The username to use for basic authentication
|
|
54
|
-
*/
|
|
55
|
-
username: string;
|
|
56
|
-
/**
|
|
57
|
-
* The password to use for basic authentication
|
|
58
|
-
*/
|
|
59
|
-
password: string;
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* Optional parameters for JWT authentication
|
|
63
|
-
*/
|
|
64
|
-
jwtAuthenticationParameters?: {
|
|
65
|
-
/**
|
|
66
|
-
* When JWT authentication is being used, this will be invoked just whenever a JWT token is required for a request
|
|
67
|
-
*/
|
|
68
|
-
jwtRequestCallback: () => string | object;
|
|
69
|
-
/**
|
|
70
|
-
* The id of the service gateway JWT authentication definition to use
|
|
71
|
-
*
|
|
72
|
-
* Note: Contact Here support to to get your organization's authentication id
|
|
73
|
-
*/
|
|
74
|
-
authenticationId: string;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
export type CloudInteropSettings = {
|
|
78
|
-
url: string;
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* Represents a session
|
|
82
|
-
*/
|
|
83
|
-
export type InteropSession = {
|
|
84
|
-
sessionId: string;
|
|
85
|
-
};
|
|
86
|
-
export type CreateSessionResponse = {
|
|
87
|
-
sessionId: string;
|
|
88
|
-
sessionRootTopic: string;
|
|
89
|
-
url: string;
|
|
90
|
-
token: string;
|
|
91
|
-
orgId: string;
|
|
92
|
-
sub: string;
|
|
93
|
-
platformId: string;
|
|
94
|
-
sourceId: string;
|
|
95
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ContextEvent, EndReportIntentsEvent, IntentDetailsEvent, IntentResultEvent, InvokeIntentEvent, ReportIntentsEvent } from '@openfin/shared-utils';
|
|
2
|
-
export type EventMap = {
|
|
3
|
-
reconnected: () => void;
|
|
4
|
-
disconnected: () => void;
|
|
5
|
-
context: (event: ContextEvent) => void;
|
|
6
|
-
reconnecting: (attemptNo: number) => void;
|
|
7
|
-
error: (error: Error) => void;
|
|
8
|
-
'session-expired': () => void;
|
|
9
|
-
'report-intents': (event: ReportIntentsEvent) => void;
|
|
10
|
-
'end-report-intents': (event: EndReportIntentsEvent) => void;
|
|
11
|
-
'intent-details': (event: IntentDetailsEvent) => void;
|
|
12
|
-
'invoke-intent': (event: InvokeIntentEvent) => void;
|
|
13
|
-
'intent-result': (event: IntentResultEvent) => void;
|
|
14
|
-
};
|
|
15
|
-
export type EventListenersMap = Map<keyof EventMap, Array<(...args: Parameters<EventMap[keyof EventMap]>) => void>>;
|