@finsemble/finsemble-ui 8.5.0 → 8.6.0-beta.2
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/FEA.d.ts +9 -9
- package/FEA.d.ts.map +1 -1
- package/FEA.js.map +1 -1
- package/clients/Interop/FinsembleDesktopAgent.d.ts +5 -0
- package/clients/Interop/FinsembleDesktopAgent.d.ts.map +1 -1
- package/clients/Interop/FinsembleDesktopAgent.js +37 -6
- package/clients/Interop/FinsembleDesktopAgent.js.map +1 -1
- package/clients/Interop/types.d.ts +7 -1
- package/clients/Interop/types.d.ts.map +1 -1
- package/clients/Interop/types.js.map +1 -1
- package/clients/windowClient.d.ts +19 -11
- package/clients/windowClient.d.ts.map +1 -1
- package/clients/windowClient.js +26 -13
- package/clients/windowClient.js.map +1 -1
- package/main.d.ts +1 -1
- package/package.json +45 -46
- package/platform/services/Interop/types.d.ts +4 -2
- package/platform/services/Interop/types.d.ts.map +1 -1
- package/platform/services/Interop/types.js.map +1 -1
- package/platform/services/bloombergBridge/lib/types.d.ts +102 -0
- package/platform/services/bloombergBridge/lib/types.d.ts.map +1 -0
- package/platform/services/bloombergBridge/lib/types.js +33 -0
- package/platform/services/bloombergBridge/lib/types.js.map +1 -0
- package/platform/services/window/modules/actions.d.ts +2 -1
- package/platform/services/window/modules/actions.d.ts.map +1 -1
- package/platform/services/window/modules/actions.js +1 -0
- package/platform/services/window/modules/actions.js.map +1 -1
- package/platform/services/window/types.d.ts +4 -8
- package/platform/services/window/types.d.ts.map +1 -1
- package/react/components/bloomberg/BloombergFDC3.d.ts +8 -0
- package/react/components/bloomberg/BloombergFDC3.d.ts.map +1 -0
- package/react/components/bloomberg/BloombergFDC3.js +48 -0
- package/react/components/bloomberg/BloombergFDC3.js.map +1 -0
- package/react/components/bloomberg/BloombergLink.d.ts +9 -0
- package/react/components/bloomberg/BloombergLink.d.ts.map +1 -0
- package/react/components/bloomberg/BloombergLink.js +49 -0
- package/react/components/bloomberg/BloombergLink.js.map +1 -0
- package/react/components/bloomberg/BloombergRelay.d.ts +7 -0
- package/react/components/bloomberg/BloombergRelay.d.ts.map +1 -0
- package/react/components/bloomberg/BloombergRelay.js +70 -0
- package/react/components/bloomberg/BloombergRelay.js.map +1 -0
- package/react/components/bloomberg/bloombergFDC3.css +43 -0
- package/react/components/common/Tab.d.ts +12 -0
- package/react/components/common/Tab.d.ts.map +1 -0
- package/react/components/common/Tab.js +58 -0
- package/react/components/common/Tab.js.map +1 -0
- package/react/components/sdd/Partner.d.ts +10 -0
- package/react/components/sdd/Partner.d.ts.map +1 -0
- package/react/components/sdd/Partner.js +98 -0
- package/react/components/sdd/Partner.js.map +1 -0
- package/react/components/sdd/css/currentApp.css +148 -0
- package/react/components/sdd/fixtures/bloombergBridgeServiceAppD.d.ts +4 -0
- package/react/components/sdd/fixtures/bloombergBridgeServiceAppD.d.ts.map +1 -0
- package/react/components/sdd/fixtures/bloombergBridgeServiceAppD.js +46 -0
- package/react/components/sdd/fixtures/bloombergBridgeServiceAppD.js.map +1 -0
- package/react/components/shared/openQuitConfirmationDialog.d.ts.map +1 -1
- package/react/components/shared/openQuitConfirmationDialog.js +34 -6
- package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
- package/react/components/toolbar/bloomberg/bloomberg.css +19 -0
- package/react/components/userPreferences/components/content/BloombergPreferences.d.ts +0 -1
- package/react/components/userPreferences/components/content/BloombergPreferences.d.ts.map +1 -1
- package/react/components/userPreferences/components/content/BloombergPreferences.js +39 -5
- package/react/components/userPreferences/components/content/BloombergPreferences.js.map +1 -1
- package/react/hooks/useDashbar.d.ts.map +1 -1
- package/react/hooks/useDashbar.js +12 -9
- package/react/hooks/useDashbar.js.map +1 -1
- package/typedefs/FDC3/api/AppIdentifier.d.ts.map +1 -1
- package/typedefs/FDC3/api/AppIntent.d.ts +2 -2
- package/typedefs/FDC3/api/AppIntent.d.ts.map +1 -1
- package/typedefs/FDC3/api/AppMetadata.d.ts +9 -10
- package/typedefs/FDC3/api/AppMetadata.d.ts.map +1 -1
- package/typedefs/FDC3/api/Channel.d.ts +21 -27
- package/typedefs/FDC3/api/Channel.d.ts.map +1 -1
- package/typedefs/FDC3/api/ContextMetadata.d.ts +3 -3
- package/typedefs/FDC3/api/ContextMetadata.d.ts.map +1 -1
- package/typedefs/FDC3/api/DesktopAgent.d.ts +163 -104
- package/typedefs/FDC3/api/DesktopAgent.d.ts.map +1 -1
- package/typedefs/FDC3/api/DisplayMetadata.d.ts.map +1 -1
- package/typedefs/FDC3/api/Errors.d.ts.map +1 -1
- package/typedefs/FDC3/api/Errors.js.map +1 -1
- package/typedefs/FDC3/api/Icon.d.ts.map +1 -1
- package/typedefs/FDC3/api/Image.d.ts.map +1 -1
- package/typedefs/FDC3/api/ImplementationMetadata.d.ts +15 -3
- package/typedefs/FDC3/api/ImplementationMetadata.d.ts.map +1 -1
- package/typedefs/FDC3/api/IntentMetadata.d.ts.map +1 -1
- package/typedefs/FDC3/api/IntentResolution.d.ts +6 -4
- package/typedefs/FDC3/api/IntentResolution.d.ts.map +1 -1
- package/typedefs/FDC3/api/Listener.d.ts.map +1 -1
- package/typedefs/FDC3/api/Methods.d.ts +58 -0
- package/typedefs/FDC3/api/Methods.d.ts.map +1 -0
- package/typedefs/FDC3/api/Methods.js +183 -0
- package/typedefs/FDC3/api/Methods.js.map +1 -0
- package/typedefs/FDC3/api/PrivateChannel.d.ts +2 -2
- package/typedefs/FDC3/api/PrivateChannel.d.ts.map +1 -1
- package/typedefs/FDC3/api/RecommendedChannels.d.ts +14 -0
- package/typedefs/FDC3/api/RecommendedChannels.d.ts.map +1 -0
- package/typedefs/FDC3/api/RecommendedChannels.js +80 -0
- package/typedefs/FDC3/api/RecommendedChannels.js.map +1 -0
- package/typedefs/FDC3/api/Types.d.ts +2 -2
- package/typedefs/FDC3/context/ContextType.d.ts +9 -1
- package/typedefs/FDC3/context/ContextType.d.ts.map +1 -1
- package/typedefs/FDC3/context/ContextType.js +8 -0
- package/typedefs/FDC3/context/ContextType.js.map +1 -1
- package/typedefs/FDC3/context/ContextTypes.d.ts +124 -20
- package/typedefs/FDC3/context/ContextTypes.d.ts.map +1 -1
- package/typedefs/FDC3/context/ContextTypes.js +229 -102
- package/typedefs/FDC3/context/ContextTypes.js.map +1 -1
- package/typedefs/FDC3/index.d.ts +21 -14
- package/typedefs/FDC3/index.d.ts.map +1 -1
- package/typedefs/FDC3/index.js +21 -14
- package/typedefs/FDC3/index.js.map +1 -1
- package/typedefs/FDC3/intents/Intents.d.ts +9 -3
- package/typedefs/FDC3/intents/Intents.d.ts.map +1 -1
- package/typedefs/FDC3/intents/Intents.js +9 -3
- package/typedefs/FDC3/intents/Intents.js.map +1 -1
- package/react/components/userPreferences/components/content/bloomberg.css +0 -44
- package/typedefs/FDC3/api/index.d.ts +0 -13
- package/typedefs/FDC3/api/index.d.ts.map +0 -1
- package/typedefs/FDC3/api/index.js +0 -13
- package/typedefs/FDC3/api/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Listener.d.ts","sourceRoot":"","sources":["../../../../../src/typedefs/FDC3/api/Listener.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,QAAQ;
|
|
1
|
+
{"version":3,"file":"Listener.d.ts","sourceRoot":"","sources":["../../../../../src/typedefs/FDC3/api/Listener.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,WAAW,IAAI,IAAI,CAAC;CACrB"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { AppIdentifier, AppIntent, Channel, Context, ContextHandler, IntentHandler, IntentResolution, Listener, ImplementationMetadata, AppMetadata, PrivateChannel } from '..';
|
|
2
|
+
/**
|
|
3
|
+
* Utility function that returns a promise that will resolve immeadiately
|
|
4
|
+
* if the desktop agent API is found at `window.fdc3`. If the API is found,
|
|
5
|
+
* the promise will resolve when the `fdc3Ready` event is received or if it
|
|
6
|
+
* is found at the end of the specified timeout. If the API is not found, it
|
|
7
|
+
* will reject with an error.
|
|
8
|
+
*
|
|
9
|
+
* ```javascript
|
|
10
|
+
* await fdc3Ready();
|
|
11
|
+
* const intentListener = await addIntentListener("ViewChart", intentHandlerFn);
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @param waitForMs The number of milliseconds to wait for the FDC3 API to be
|
|
15
|
+
* ready. Defaults to 5 seconds.
|
|
16
|
+
*/
|
|
17
|
+
export declare const fdc3Ready: (waitForMs?: number) => Promise<void>;
|
|
18
|
+
export declare function open(app: AppIdentifier | String, context?: Context): Promise<AppIdentifier>;
|
|
19
|
+
export declare function findIntent(intent: string, context?: Context, resultType?: string): Promise<AppIntent>;
|
|
20
|
+
export declare function findIntentsByContext(context: Context, resultType?: string): Promise<AppIntent[]>;
|
|
21
|
+
export declare function broadcast(context: Context): Promise<void>;
|
|
22
|
+
export declare function raiseIntent(intent: string, context: Context, app?: AppIdentifier | String): Promise<IntentResolution>;
|
|
23
|
+
export declare function raiseIntentForContext(context: Context, app?: AppIdentifier | String): Promise<IntentResolution>;
|
|
24
|
+
export declare function addIntentListener(intent: string, handler: IntentHandler): Promise<Listener>;
|
|
25
|
+
export declare function addContextListener(contextTypeOrHandler: string | null | ContextHandler, handler?: ContextHandler): Promise<Listener>;
|
|
26
|
+
export declare function getUserChannels(): Promise<Channel[]>;
|
|
27
|
+
export declare function getSystemChannels(): Promise<Channel[]>;
|
|
28
|
+
export declare function joinUserChannel(channelId: string): Promise<void>;
|
|
29
|
+
export declare function joinChannel(channelId: string): Promise<void>;
|
|
30
|
+
export declare function getOrCreateChannel(channelId: string): Promise<Channel>;
|
|
31
|
+
export declare function getCurrentChannel(): Promise<Channel | null>;
|
|
32
|
+
export declare function leaveCurrentChannel(): Promise<void>;
|
|
33
|
+
export declare function createPrivateChannel(): Promise<PrivateChannel>;
|
|
34
|
+
export declare function getInfo(): Promise<ImplementationMetadata>;
|
|
35
|
+
export declare function getAppMetadata(app: AppIdentifier): Promise<AppMetadata>;
|
|
36
|
+
export declare function findInstances(app: AppIdentifier): Promise<AppIdentifier[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Compare numeric semver version number strings (in the form `1.2.3`).
|
|
39
|
+
*
|
|
40
|
+
* Returns `-1` if the first argument is a lower version number than the second,
|
|
41
|
+
* `1` if the first argument is greater than the second, 0 if the arguments are
|
|
42
|
+
* equal and `null` if an error occurred during the comparison.
|
|
43
|
+
*
|
|
44
|
+
* @param a
|
|
45
|
+
* @param b
|
|
46
|
+
*/
|
|
47
|
+
export declare const compareVersionNumbers: (a: string, b: string) => number | null;
|
|
48
|
+
/**
|
|
49
|
+
* Check if the FDC3 version in an ImplementationMetadata object is greater than
|
|
50
|
+
* or equal to the supplied numeric semver version number string (in the form `1.2.3`).
|
|
51
|
+
*
|
|
52
|
+
* Returns a boolean or null if an error occurred while comparing the version numbers.
|
|
53
|
+
*
|
|
54
|
+
* @param metadata
|
|
55
|
+
* @param version
|
|
56
|
+
*/
|
|
57
|
+
export declare const versionIsAtLeast: (metadata: ImplementationMetadata, version: string) => boolean | null;
|
|
58
|
+
//# sourceMappingURL=Methods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Methods.d.ts","sourceRoot":"","sources":["../../../../../src/typedefs/FDC3/api/Methods.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,SAAS,EACT,OAAO,EACP,OAAO,EACP,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,sBAAsB,EACtB,WAAW,EACX,cAAc,EACf,MAAM,IAAI,CAAC;AAYZ;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,SAAS,0BAAwC,QAAQ,IAAI,CAmBzE,CAAC;AAMF,wBAAgB,IAAI,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CAM3F;AAED,w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,wBAAgB,iBAAiB,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAE3D;AAED,wBAAgB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAEnD;AAED,wBAAgB,oBAAoB,IAAI,OAAO,CAAC,cAAc,CAAC,CAE9D;AAED,wBAAgB,OAAO,IAAI,OAAO,CAAC,sBAAsB,CAAC,CAEzD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,WAAW,CAAC,CAEvE;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAE1E;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,IAkBtE,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,EAAE,CAAC,QAAQ,EAAE,sBAAsB,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,GAAG,IAM/F,CAAC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
const DEFAULT_TIMEOUT = 5000;
|
|
2
|
+
const UnavailableError = new Error('FDC3 DesktopAgent not available at `window.fdc3`.');
|
|
3
|
+
const TimeoutError = new Error('Timed out waiting for `fdc3Ready` event.');
|
|
4
|
+
const UnexpectedError = new Error('`fdc3Ready` event fired, but `window.fdc3` not set to DesktopAgent.');
|
|
5
|
+
function rejectIfNoGlobal(f) {
|
|
6
|
+
return window.fdc3 ? f() : Promise.reject(UnavailableError);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Utility function that returns a promise that will resolve immeadiately
|
|
10
|
+
* if the desktop agent API is found at `window.fdc3`. If the API is found,
|
|
11
|
+
* the promise will resolve when the `fdc3Ready` event is received or if it
|
|
12
|
+
* is found at the end of the specified timeout. If the API is not found, it
|
|
13
|
+
* will reject with an error.
|
|
14
|
+
*
|
|
15
|
+
* ```javascript
|
|
16
|
+
* await fdc3Ready();
|
|
17
|
+
* const intentListener = await addIntentListener("ViewChart", intentHandlerFn);
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @param waitForMs The number of milliseconds to wait for the FDC3 API to be
|
|
21
|
+
* ready. Defaults to 5 seconds.
|
|
22
|
+
*/
|
|
23
|
+
export const fdc3Ready = async (waitForMs = DEFAULT_TIMEOUT) => {
|
|
24
|
+
return new Promise((resolve, reject) => {
|
|
25
|
+
// if the global is already available resolve immediately
|
|
26
|
+
if (window.fdc3) {
|
|
27
|
+
resolve();
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
// if its not available setup a timeout to return a rejected promise
|
|
31
|
+
const timeout = setTimeout(() => (window.fdc3 ? resolve() : reject(TimeoutError)), waitForMs);
|
|
32
|
+
// listen for the fdc3Ready event
|
|
33
|
+
window.addEventListener('fdc3Ready', () => {
|
|
34
|
+
clearTimeout(timeout);
|
|
35
|
+
window.fdc3 ? resolve() : reject(UnexpectedError);
|
|
36
|
+
}, { once: true });
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
function isString(app) {
|
|
41
|
+
return typeof app === 'string';
|
|
42
|
+
}
|
|
43
|
+
export function open(app, context) {
|
|
44
|
+
if (isString(app)) {
|
|
45
|
+
return rejectIfNoGlobal(() => window.fdc3.open(app, context));
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
return rejectIfNoGlobal(() => window.fdc3.open(app, context));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export function findIntent(intent, context, resultType) {
|
|
52
|
+
return rejectIfNoGlobal(() => window.fdc3.findIntent(intent, context, resultType));
|
|
53
|
+
}
|
|
54
|
+
export function findIntentsByContext(context, resultType) {
|
|
55
|
+
return rejectIfNoGlobal(() => window.fdc3.findIntentsByContext(context, resultType));
|
|
56
|
+
}
|
|
57
|
+
export function broadcast(context) {
|
|
58
|
+
return rejectIfNoGlobal(() => window.fdc3.broadcast(context));
|
|
59
|
+
}
|
|
60
|
+
export function raiseIntent(intent, context, app) {
|
|
61
|
+
if (app && isString(app)) {
|
|
62
|
+
return rejectIfNoGlobal(() => window.fdc3.raiseIntent(intent, context, app));
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
return rejectIfNoGlobal(() => window.fdc3.raiseIntent(intent, context, app));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export function raiseIntentForContext(context, app) {
|
|
69
|
+
if (app && isString(app)) {
|
|
70
|
+
return rejectIfNoGlobal(() => window.fdc3.raiseIntentForContext(context, app));
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
return rejectIfNoGlobal(() => window.fdc3.raiseIntentForContext(context, app));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export function addIntentListener(intent, handler) {
|
|
77
|
+
return rejectIfNoGlobal(() => window.fdc3.addIntentListener(intent, handler));
|
|
78
|
+
}
|
|
79
|
+
export function addContextListener(contextTypeOrHandler, handler) {
|
|
80
|
+
//Handle (deprecated) function signature that allowed contextType argument to be omitted
|
|
81
|
+
if (typeof contextTypeOrHandler !== 'function') {
|
|
82
|
+
return rejectIfNoGlobal(() => window.fdc3.addContextListener(contextTypeOrHandler, handler));
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
return rejectIfNoGlobal(() => window.fdc3.addContextListener(null, contextTypeOrHandler));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
export function getUserChannels() {
|
|
89
|
+
return rejectIfNoGlobal(() => {
|
|
90
|
+
//fallback to getSystemChannels for FDC3 <2.0 implementations
|
|
91
|
+
if (window.fdc3.getUserChannels) {
|
|
92
|
+
return window.fdc3.getUserChannels();
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
return window.fdc3.getSystemChannels();
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
export function getSystemChannels() {
|
|
100
|
+
//fallforward to getUserChannels for FDC3 2.0+ implementations
|
|
101
|
+
return getUserChannels();
|
|
102
|
+
}
|
|
103
|
+
export function joinUserChannel(channelId) {
|
|
104
|
+
return rejectIfNoGlobal(() => {
|
|
105
|
+
//fallback to joinChannel for FDC3 <2.0 implementations
|
|
106
|
+
if (window.fdc3.joinUserChannel) {
|
|
107
|
+
return window.fdc3.joinUserChannel(channelId);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
return window.fdc3.joinChannel(channelId);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
export function joinChannel(channelId) {
|
|
115
|
+
//fallforward to joinUserChannel for FDC3 2.0+ implementations
|
|
116
|
+
return joinUserChannel(channelId);
|
|
117
|
+
}
|
|
118
|
+
export function getOrCreateChannel(channelId) {
|
|
119
|
+
return rejectIfNoGlobal(() => window.fdc3.getOrCreateChannel(channelId));
|
|
120
|
+
}
|
|
121
|
+
export function getCurrentChannel() {
|
|
122
|
+
return rejectIfNoGlobal(() => window.fdc3.getCurrentChannel());
|
|
123
|
+
}
|
|
124
|
+
export function leaveCurrentChannel() {
|
|
125
|
+
return rejectIfNoGlobal(() => window.fdc3.leaveCurrentChannel());
|
|
126
|
+
}
|
|
127
|
+
export function createPrivateChannel() {
|
|
128
|
+
return rejectIfNoGlobal(() => window.fdc3.createPrivateChannel());
|
|
129
|
+
}
|
|
130
|
+
export function getInfo() {
|
|
131
|
+
return rejectIfNoGlobal(() => window.fdc3.getInfo());
|
|
132
|
+
}
|
|
133
|
+
export function getAppMetadata(app) {
|
|
134
|
+
return rejectIfNoGlobal(() => window.fdc3.getAppMetadata(app));
|
|
135
|
+
}
|
|
136
|
+
export function findInstances(app) {
|
|
137
|
+
return rejectIfNoGlobal(() => window.fdc3.findInstances(app));
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Compare numeric semver version number strings (in the form `1.2.3`).
|
|
141
|
+
*
|
|
142
|
+
* Returns `-1` if the first argument is a lower version number than the second,
|
|
143
|
+
* `1` if the first argument is greater than the second, 0 if the arguments are
|
|
144
|
+
* equal and `null` if an error occurred during the comparison.
|
|
145
|
+
*
|
|
146
|
+
* @param a
|
|
147
|
+
* @param b
|
|
148
|
+
*/
|
|
149
|
+
export const compareVersionNumbers = (a, b) => {
|
|
150
|
+
try {
|
|
151
|
+
let aVerArr = a.split('.').map(Number);
|
|
152
|
+
let bVerArr = b.split('.').map(Number);
|
|
153
|
+
for (let index = 0; index < Math.max(aVerArr.length, bVerArr.length); index++) {
|
|
154
|
+
/* If one version number has more digits and the other does not, and they are otherwise equal,
|
|
155
|
+
assume the longer is greater. E.g. 1.1.1 > 1.1 */
|
|
156
|
+
if (index === aVerArr.length || aVerArr[index] < bVerArr[index]) {
|
|
157
|
+
return -1;
|
|
158
|
+
}
|
|
159
|
+
else if (index === bVerArr.length || aVerArr[index] > bVerArr[index]) {
|
|
160
|
+
return 1;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return 0;
|
|
164
|
+
}
|
|
165
|
+
catch (e) {
|
|
166
|
+
console.error('Failed to compare version strings', e);
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* Check if the FDC3 version in an ImplementationMetadata object is greater than
|
|
172
|
+
* or equal to the supplied numeric semver version number string (in the form `1.2.3`).
|
|
173
|
+
*
|
|
174
|
+
* Returns a boolean or null if an error occurred while comparing the version numbers.
|
|
175
|
+
*
|
|
176
|
+
* @param metadata
|
|
177
|
+
* @param version
|
|
178
|
+
*/
|
|
179
|
+
export const versionIsAtLeast = (metadata, version) => {
|
|
180
|
+
let comparison = compareVersionNumbers(metadata.fdc3Version, version);
|
|
181
|
+
return comparison === null ? null : comparison >= 0 ? true : false;
|
|
182
|
+
};
|
|
183
|
+
//# sourceMappingURL=Methods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Methods.js","sourceRoot":"","sources":["../../../../../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CAAC,mCAAmC,EAAE,CAAC,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC;KACb;AACH,CAAC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA0E,CACrG,QAAQ,EACR,OAAO,EACP,EAAE;IACF,IAAI,UAAU,GAAG,qBAAqB,CAAC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IACtE,OAAO,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AACrE,CAAC,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
* Copyright 2021 FINOS FDC3 contributors - see NOTICE file
|
|
4
4
|
*/
|
|
5
|
-
import { Listener } from
|
|
6
|
-
import { Channel } from
|
|
5
|
+
import { Listener } from './Listener';
|
|
6
|
+
import { Channel } from './Channel';
|
|
7
7
|
/**
|
|
8
8
|
* Object representing a private context channel, which is intended to support
|
|
9
9
|
* secure communication between applications, and extends the Channel interface
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateChannel.d.ts","sourceRoot":"","sources":["../../../../../src/typedefs/FDC3/api/PrivateChannel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,cAAe,SAAQ,OAAO;
|
|
1
|
+
{"version":3,"file":"PrivateChannel.d.ts","sourceRoot":"","sources":["../../../../../src/typedefs/FDC3/api/PrivateChannel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,cAAe,SAAQ,OAAO;IAC7C;;;;;;;OAOG;IACH,oBAAoB,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,QAAQ,CAAC;IAExE;;;;;;OAMG;IACH,aAAa,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,QAAQ,CAAC;IAEjE;;;;OAIG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,QAAQ,CAAC;IAE5C;;;;;;;OAOG;IACH,UAAU,IAAI,IAAI,CAAC;CACpB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
* Copyright FINOS FDC3 contributors - see NOTICE file
|
|
4
|
+
*/
|
|
5
|
+
import { DisplayMetadata } from './DisplayMetadata';
|
|
6
|
+
/** Interface representing the data fields of a user channel, without the functions. */
|
|
7
|
+
interface UserChannelTemplate {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly type: 'user';
|
|
10
|
+
readonly displayMetadata?: DisplayMetadata;
|
|
11
|
+
}
|
|
12
|
+
declare const recommendedChannels: Array<UserChannelTemplate>;
|
|
13
|
+
export default recommendedChannels;
|
|
14
|
+
//# sourceMappingURL=RecommendedChannels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecommendedChannels.d.ts","sourceRoot":"","sources":["../../../../../src/typedefs/FDC3/api/RecommendedChannels.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,uFAAuF;AACvF,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC;CAC5C;AAED,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,CAyEnD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
* Copyright FINOS FDC3 contributors - see NOTICE file
|
|
4
|
+
*/
|
|
5
|
+
const recommendedChannels = [
|
|
6
|
+
{
|
|
7
|
+
id: 'fdc3.channel.1',
|
|
8
|
+
type: 'user',
|
|
9
|
+
displayMetadata: {
|
|
10
|
+
name: 'Channel 1',
|
|
11
|
+
color: 'red',
|
|
12
|
+
glyph: '1',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: 'fdc3.channel.2',
|
|
17
|
+
type: 'user',
|
|
18
|
+
displayMetadata: {
|
|
19
|
+
name: 'Channel 2',
|
|
20
|
+
color: 'orange',
|
|
21
|
+
glyph: '2',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 'fdc3.channel.3',
|
|
26
|
+
type: 'user',
|
|
27
|
+
displayMetadata: {
|
|
28
|
+
name: 'Channel 3',
|
|
29
|
+
color: 'yellow',
|
|
30
|
+
glyph: '3',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: 'fdc3.channel.4',
|
|
35
|
+
type: 'user',
|
|
36
|
+
displayMetadata: {
|
|
37
|
+
name: 'Channel 4',
|
|
38
|
+
color: 'green',
|
|
39
|
+
glyph: '4',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'fdc3.channel.5',
|
|
44
|
+
type: 'user',
|
|
45
|
+
displayMetadata: {
|
|
46
|
+
name: 'Channel 5',
|
|
47
|
+
color: 'cyan',
|
|
48
|
+
glyph: '5',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'fdc3.channel.6',
|
|
53
|
+
type: 'user',
|
|
54
|
+
displayMetadata: {
|
|
55
|
+
name: 'Channel 6',
|
|
56
|
+
color: 'blue',
|
|
57
|
+
glyph: '6',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: 'fdc3.channel.7',
|
|
62
|
+
type: 'user',
|
|
63
|
+
displayMetadata: {
|
|
64
|
+
name: 'Channel 7',
|
|
65
|
+
color: 'magenta',
|
|
66
|
+
glyph: '7',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: 'fdc3.channel.8',
|
|
71
|
+
type: 'user',
|
|
72
|
+
displayMetadata: {
|
|
73
|
+
name: 'Channel 8',
|
|
74
|
+
color: 'purple',
|
|
75
|
+
glyph: '8',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
];
|
|
79
|
+
export default recommendedChannels;
|
|
80
|
+
//# sourceMappingURL=RecommendedChannels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecommendedChannels.js","sourceRoot":"","sources":["../../../../../src/typedefs/FDC3/api/RecommendedChannels.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,MAAM,mBAAmB,GAA+B;IACtD;QACE,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,MAAM;QACZ,eAAe,EAAE;YACf,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,GAAG;SACX;KACF;IACD;QACE,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,MAAM;QACZ,eAAe,EAAE;YACf,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,QAAQ;YACf,KAAK,EAAE,GAAG;SACX;KACF;IACD;QACE,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,MAAM;QACZ,eAAe,EAAE;YACf,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,QAAQ;YACf,KAAK,EAAE,GAAG;SACX;KACF;IACD;QACE,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,MAAM;QACZ,eAAe,EAAE;YACf,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,OAAO;YACd,KAAK,EAAE,GAAG;SACX;KACF;IACD;QACE,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,MAAM;QACZ,eAAe,EAAE;YACf,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,MAAM;YACb,KAAK,EAAE,GAAG;SACX;KACF;IACD;QACE,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,MAAM;QACZ,eAAe,EAAE;YACf,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,MAAM;YACb,KAAK,EAAE,GAAG;SACX;KACF;IACD;QACE,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,MAAM;QACZ,eAAe,EAAE;YACf,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,SAAS;YAChB,KAAK,EAAE,GAAG;SACX;KACF;IACD;QACE,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,MAAM;QACZ,eAAe,EAAE;YACf,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,QAAQ;YACf,KAAK,EAAE,GAAG;SACX;KACF;CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
* Copyright FINOS FDC3 contributors - see NOTICE file
|
|
4
4
|
*/
|
|
5
|
-
import { Channel, ContextMetadata } from
|
|
6
|
-
import { Context } from
|
|
5
|
+
import { Channel, ContextMetadata } from '..';
|
|
6
|
+
import { Context } from '../context/ContextTypes';
|
|
7
7
|
/**
|
|
8
8
|
* Describes a callback that handles a context event.
|
|
9
9
|
* Used when attaching listeners for context broadcasts.
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
export declare enum ContextTypes {
|
|
2
|
+
Chart = "fdc3.chart",
|
|
3
|
+
ChatInitSettings = "fdc3.chat.initSettings",
|
|
2
4
|
Contact = "fdc3.contact",
|
|
3
5
|
ContactList = "fdc3.contactList",
|
|
4
6
|
Country = "fdc3.country",
|
|
7
|
+
Currency = "fdc3.currency",
|
|
8
|
+
Email = "fdc3.email",
|
|
5
9
|
Instrument = "fdc3.instrument",
|
|
10
|
+
InstrumentList = "fdc3.instrumentList",
|
|
6
11
|
Organization = "fdc3.organization",
|
|
7
12
|
Portfolio = "fdc3.portfolio",
|
|
8
|
-
Position = "fdc3.position"
|
|
13
|
+
Position = "fdc3.position",
|
|
14
|
+
Nothing = "fdc3.nothing",
|
|
15
|
+
TimeRange = "fdc3.timerange",
|
|
16
|
+
Valuation = "fdc3.valuation"
|
|
9
17
|
}
|
|
10
18
|
export declare type ContextType = ContextTypes | string;
|
|
11
19
|
//# sourceMappingURL=ContextType.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextType.d.ts","sourceRoot":"","sources":["../../../../../src/typedefs/FDC3/context/ContextType.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;
|
|
1
|
+
{"version":3,"file":"ContextType.d.ts","sourceRoot":"","sources":["../../../../../src/typedefs/FDC3/context/ContextType.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,KAAK,eAAe;IACpB,gBAAgB,2BAA2B;IAC3C,OAAO,iBAAiB;IACxB,WAAW,qBAAqB;IAChC,OAAO,iBAAiB;IACxB,QAAQ,kBAAkB;IAC1B,KAAK,eAAe;IACpB,UAAU,oBAAoB;IAC9B,cAAc,wBAAwB;IACtC,YAAY,sBAAsB;IAClC,SAAS,mBAAmB;IAC5B,QAAQ,kBAAkB;IAC1B,OAAO,iBAAiB;IACxB,SAAS,mBAAmB;IAC5B,SAAS,mBAAmB;CAC7B;AAED,oBAAY,WAAW,GAAG,YAAY,GAAG,MAAM,CAAC"}
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
export var ContextTypes;
|
|
2
2
|
(function (ContextTypes) {
|
|
3
|
+
ContextTypes["Chart"] = "fdc3.chart";
|
|
4
|
+
ContextTypes["ChatInitSettings"] = "fdc3.chat.initSettings";
|
|
3
5
|
ContextTypes["Contact"] = "fdc3.contact";
|
|
4
6
|
ContextTypes["ContactList"] = "fdc3.contactList";
|
|
5
7
|
ContextTypes["Country"] = "fdc3.country";
|
|
8
|
+
ContextTypes["Currency"] = "fdc3.currency";
|
|
9
|
+
ContextTypes["Email"] = "fdc3.email";
|
|
6
10
|
ContextTypes["Instrument"] = "fdc3.instrument";
|
|
11
|
+
ContextTypes["InstrumentList"] = "fdc3.instrumentList";
|
|
7
12
|
ContextTypes["Organization"] = "fdc3.organization";
|
|
8
13
|
ContextTypes["Portfolio"] = "fdc3.portfolio";
|
|
9
14
|
ContextTypes["Position"] = "fdc3.position";
|
|
15
|
+
ContextTypes["Nothing"] = "fdc3.nothing";
|
|
16
|
+
ContextTypes["TimeRange"] = "fdc3.timerange";
|
|
17
|
+
ContextTypes["Valuation"] = "fdc3.valuation";
|
|
10
18
|
})(ContextTypes || (ContextTypes = {}));
|
|
11
19
|
//# sourceMappingURL=ContextType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextType.js","sourceRoot":"","sources":["../../../../../src/typedefs/FDC3/context/ContextType.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"ContextType.js","sourceRoot":"","sources":["../../../../../src/typedefs/FDC3/context/ContextType.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,YAgBX;AAhBD,WAAY,YAAY;IACtB,oCAAoB,CAAA;IACpB,2DAA2C,CAAA;IAC3C,wCAAwB,CAAA;IACxB,gDAAgC,CAAA;IAChC,wCAAwB,CAAA;IACxB,0CAA0B,CAAA;IAC1B,oCAAoB,CAAA;IACpB,8CAA8B,CAAA;IAC9B,sDAAsC,CAAA;IACtC,kDAAkC,CAAA;IAClC,4CAA4B,CAAA;IAC5B,0CAA0B,CAAA;IAC1B,wCAAwB,CAAA;IACxB,4CAA4B,CAAA;IAC5B,4CAA4B,CAAA;AAC9B,CAAC,EAhBW,YAAY,KAAZ,YAAY,QAgBvB"}
|
|
@@ -5,25 +5,13 @@ export interface Context {
|
|
|
5
5
|
name?: string;
|
|
6
6
|
type: string;
|
|
7
7
|
}
|
|
8
|
-
export interface
|
|
9
|
-
contacts: Contact[];
|
|
10
|
-
type: string;
|
|
11
|
-
id?: {
|
|
12
|
-
[key: string]: string;
|
|
13
|
-
};
|
|
14
|
-
name?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface Contact {
|
|
17
|
-
id: ContactID;
|
|
18
|
-
type: string;
|
|
19
|
-
name?: string;
|
|
20
|
-
}
|
|
21
|
-
export interface ContactID {
|
|
22
|
-
email?: string;
|
|
23
|
-
FDS_ID?: string;
|
|
24
|
-
}
|
|
25
|
-
export interface InstrumentList {
|
|
8
|
+
export interface Chart {
|
|
26
9
|
instruments: Instrument[];
|
|
10
|
+
otherConfig?: {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
};
|
|
13
|
+
range?: TimeRange;
|
|
14
|
+
style?: Style;
|
|
27
15
|
type: string;
|
|
28
16
|
id?: {
|
|
29
17
|
[key: string]: string;
|
|
@@ -46,15 +34,105 @@ export interface InstrumentID {
|
|
|
46
34
|
SEDOL?: string;
|
|
47
35
|
ticker?: string;
|
|
48
36
|
}
|
|
37
|
+
export interface TimeRange {
|
|
38
|
+
endTime?: Date;
|
|
39
|
+
startTime?: Date;
|
|
40
|
+
type: string;
|
|
41
|
+
id?: {
|
|
42
|
+
[key: string]: string;
|
|
43
|
+
};
|
|
44
|
+
name?: string;
|
|
45
|
+
}
|
|
46
|
+
export declare enum Style {
|
|
47
|
+
Bar = "bar",
|
|
48
|
+
Candle = "candle",
|
|
49
|
+
Custom = "custom",
|
|
50
|
+
Heatmap = "heatmap",
|
|
51
|
+
Histogram = "histogram",
|
|
52
|
+
Line = "line",
|
|
53
|
+
Mountain = "mountain",
|
|
54
|
+
Pie = "pie",
|
|
55
|
+
Scatter = "scatter",
|
|
56
|
+
StackedBar = "stacked-bar"
|
|
57
|
+
}
|
|
58
|
+
export interface ChatInitSettings {
|
|
59
|
+
chatName?: string;
|
|
60
|
+
initMessage?: string;
|
|
61
|
+
members?: ContactList;
|
|
62
|
+
options?: any;
|
|
63
|
+
type: any;
|
|
64
|
+
}
|
|
65
|
+
export interface ContactList {
|
|
66
|
+
contacts: Contact[];
|
|
67
|
+
type: string;
|
|
68
|
+
id?: {
|
|
69
|
+
[key: string]: string;
|
|
70
|
+
};
|
|
71
|
+
name?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface Contact {
|
|
74
|
+
id: ContactID;
|
|
75
|
+
type: string;
|
|
76
|
+
name?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface ContactID {
|
|
79
|
+
email?: string;
|
|
80
|
+
FDS_ID?: string;
|
|
81
|
+
}
|
|
49
82
|
export interface Country {
|
|
50
83
|
id: CountryID;
|
|
51
84
|
type: string;
|
|
52
85
|
name?: string;
|
|
53
86
|
}
|
|
54
87
|
export interface CountryID {
|
|
88
|
+
COUNTRY_ISOALPHA2?: string;
|
|
89
|
+
COUNTRY_ISOALPHA3?: string;
|
|
55
90
|
ISOALPHA2?: string;
|
|
56
91
|
ISOALPHA3?: string;
|
|
57
92
|
}
|
|
93
|
+
export interface Currency {
|
|
94
|
+
id: CurrencyID;
|
|
95
|
+
name?: string;
|
|
96
|
+
type: string;
|
|
97
|
+
}
|
|
98
|
+
export interface CurrencyID {
|
|
99
|
+
CURRENCY_ISOCODE?: string;
|
|
100
|
+
}
|
|
101
|
+
export interface Email {
|
|
102
|
+
recipients: RecipientsObject;
|
|
103
|
+
subject?: string;
|
|
104
|
+
textBody?: string;
|
|
105
|
+
type: string;
|
|
106
|
+
id?: {
|
|
107
|
+
[key: string]: string;
|
|
108
|
+
};
|
|
109
|
+
name?: string;
|
|
110
|
+
}
|
|
111
|
+
export interface RecipientsObject {
|
|
112
|
+
id?: RecipientsID;
|
|
113
|
+
type: string;
|
|
114
|
+
name?: string;
|
|
115
|
+
contacts?: Contact[];
|
|
116
|
+
}
|
|
117
|
+
export interface RecipientsID {
|
|
118
|
+
email?: string;
|
|
119
|
+
FDS_ID?: string;
|
|
120
|
+
}
|
|
121
|
+
export interface InstrumentList {
|
|
122
|
+
instruments: Instrument[];
|
|
123
|
+
type: string;
|
|
124
|
+
id?: {
|
|
125
|
+
[key: string]: string;
|
|
126
|
+
};
|
|
127
|
+
name?: string;
|
|
128
|
+
}
|
|
129
|
+
export interface Nothing {
|
|
130
|
+
type: string;
|
|
131
|
+
id?: {
|
|
132
|
+
[key: string]: string;
|
|
133
|
+
};
|
|
134
|
+
name?: string;
|
|
135
|
+
}
|
|
58
136
|
export interface Organization {
|
|
59
137
|
id: OrganizationID;
|
|
60
138
|
type: string;
|
|
@@ -82,24 +160,50 @@ export interface Position {
|
|
|
82
160
|
};
|
|
83
161
|
name?: string;
|
|
84
162
|
}
|
|
163
|
+
export interface Valuation {
|
|
164
|
+
CURRENCY_ISOCODE: string;
|
|
165
|
+
expiryTime?: Date;
|
|
166
|
+
price?: number;
|
|
167
|
+
type: string;
|
|
168
|
+
valuationTime?: Date;
|
|
169
|
+
value: number;
|
|
170
|
+
id?: {
|
|
171
|
+
[key: string]: string;
|
|
172
|
+
};
|
|
173
|
+
name?: string;
|
|
174
|
+
}
|
|
85
175
|
export declare class Convert {
|
|
86
176
|
static toContext(json: string): Context;
|
|
87
177
|
static contextToJson(value: Context): string;
|
|
178
|
+
static toChart(json: string): Chart;
|
|
179
|
+
static chartToJson(value: Chart): string;
|
|
180
|
+
static toChatInitSettings(json: string): ChatInitSettings;
|
|
181
|
+
static chatInitSettingsToJson(value: ChatInitSettings): string;
|
|
88
182
|
static toContact(json: string): Contact;
|
|
89
183
|
static contactToJson(value: Contact): string;
|
|
90
184
|
static toContactList(json: string): ContactList;
|
|
91
185
|
static contactListToJson(value: ContactList): string;
|
|
186
|
+
static toCountry(json: string): Country;
|
|
187
|
+
static countryToJson(value: Country): string;
|
|
188
|
+
static toCurrency(json: string): Currency;
|
|
189
|
+
static currencyToJson(value: Currency): string;
|
|
190
|
+
static toEmail(json: string): Email;
|
|
191
|
+
static emailToJson(value: Email): string;
|
|
92
192
|
static toInstrument(json: string): Instrument;
|
|
93
193
|
static instrumentToJson(value: Instrument): string;
|
|
94
194
|
static toInstrumentList(json: string): InstrumentList;
|
|
95
195
|
static instrumentListToJson(value: InstrumentList): string;
|
|
96
|
-
static
|
|
97
|
-
static
|
|
196
|
+
static toNothing(json: string): Nothing;
|
|
197
|
+
static nothingToJson(value: Nothing): string;
|
|
98
198
|
static toOrganization(json: string): Organization;
|
|
99
199
|
static organizationToJson(value: Organization): string;
|
|
100
200
|
static toPortfolio(json: string): Portfolio;
|
|
101
201
|
static portfolioToJson(value: Portfolio): string;
|
|
102
202
|
static toPosition(json: string): Position;
|
|
103
203
|
static positionToJson(value: Position): string;
|
|
204
|
+
static toTimeRange(json: string): TimeRange;
|
|
205
|
+
static timeRangeToJson(value: TimeRange): string;
|
|
206
|
+
static toValuation(json: string): Valuation;
|
|
207
|
+
static valuationToJson(value: Valuation): string;
|
|
104
208
|
}
|
|
105
209
|
//# sourceMappingURL=ContextTypes.d.ts.map
|