@openfin/bloomberg
Version:
Connect apps running in OpenFin with the Bloomberg Terminal.
25 lines (24 loc) • 1.65 kB
TypeScript
import { DispatchChannelClientMessage } from '../adapter/adapter.types';
import { Subscription } from '../bloomberg/bloomberg.types';
import { UsageFeatureName } from '../utils/utils.types';
import { BloombergConnection, BloombergConnectionConfig } from './connection.types';
/**
* Establishes a connection to the Terminal.
*
* A Bloomberg Terminal Connect API key is required to establish a connection (contact your Bloomberg account manager for more information).
*
* Note: the Terminal must be running locally and logged in, otherwise an error will be thrown.
*
* @param apiKey - Bloomberg Terminal Connect API key.
* @param config - Connection configuration settings (if not provided, the default configuration is used).
*
* @throws {@link InitializationError} if an error occurs when initializing the background adapter process.
* @throws {@link TerminalConnectionError} if an error occurs when attempting to connect to the Terminal.
* @throws {@link TerminalConnectRequestError} if a Terminal Connect API request fails.
* @throws {@link InteropError} if an error occurs when initializing interop functionality.
* @throws {@link AdapterError} if an unexpected error is thrown by the background adapter process.
* @throws {@link ApiError} if an unexpected error is thrown by the API.
*/
export declare const connect: (apiKey: string, config?: BloombergConnectionConfig) => Promise<BloombergConnection>;
export declare const disconnect: (dispatchAdapterMessage: DispatchChannelClientMessage, subscriptions?: Subscription[]) => () => Promise<void>;
export declare const registerUsage: (featureName: UsageFeatureName) => Promise<void>;