/*! * Copyright 2017 - 2020 by ChartIQ, Inc. * All rights reserved. */ import { FSBLDependencyManagerSingleton as FSBLDependencyManager } from "../../common/dependencyManager"; import { System } from "../../common/system"; import { FinsembleWindow } from "../../common/FinsembleWindow"; import SystemManagerClient from "../../common/systemManagerClient"; import TestPoint from "../../common/testPoint"; import Logger from "../logger"; import InteropAdmin from "../../clients/Interop/InteropAdmin"; import { RouterClient } from "../../clients/routerClient"; import AuthenticationClient from "../authenticationClient"; import { WindowClient } from "../windowClient"; import DistributedStoreClient from "../distributedStoreClient"; import LauncherClient from "../launcherClient"; import DragAndDropClient from "../../deprecated/dragAndDropClient"; import LinkerClient from "../../deprecated/linkerClient"; import StorageClient from "../storageClient"; import WorkspaceClient from "../workspaceClient"; import DialogManager from "../dialogManagerClient"; import ConfigClient from "../configClient"; import HotkeyClient from "../hotkeyClient"; import SearchClient from "../searchClient"; import NotificationClient from "../notificationClient"; import { SmartDesktopClient } from "../../deprecated/SmartDesktopClient"; import { RestartParams } from "../../services/systemManager/shutDownManager"; import { createKeys } from "../../services/Interop/AuthSignVerify"; import { FinsembleDesktopAgent } from "../Interop/FinsembleDesktopAgent"; import { FEAInfo } from "../../FEA"; declare type FSBLInfo = { FSBLVersion: string; gitHash: string; } & FEAInfo; export declare class FSBLDesktop { #private; debug: boolean; FinsembleWindow: typeof FinsembleWindow; ConfigUtils: import("../../common/configUtil").ConfigUtil; createKeys: typeof createKeys; UserNotification: { toast: (topic: string, frequency: import("../../common/toast").ToastFrequency, identifier: string, message: any, params?: import("../../common/toast").ToastOptions | undefined) => void; alert: (topic: string, frequency: import("../../common/toast").ToastFrequency, identifier: string, message: any, params?: import("../../common/toast").ToastOptions | undefined) => void; }; SystemManagerClient: typeof SystemManagerClient; TestPoint: typeof TestPoint; clickedMailTo: boolean; isInitialized: boolean; displayStartupTimeoutError: boolean; dependencyManager: typeof FSBLDependencyManager; System: typeof System; remoteRedux: { remoteReduxClientEnhancer: ({ server, slice }: { server: "@@finsemble/remoteRedux/InteropStore"; slice: string; }) => import("redux").StoreEnhancer<{ dispatch: >(promise: Promise) => Promise; }, {}>; }; /** Namespace for internal APIs */ internal: { interopAdmin: InteropAdmin; }; componentType: string; /** * Apps and UI components depend on FSBL.Clients to exist during the import stage. We therefore need for these entries * to exist statically in the FSBL object that is exported. The clients are still initialized dynamically when FSBL.startApp() * is called. */ /** @namespace Clients */ Clients: { RouterClient: typeof RouterClient; AuthenticationClient: typeof AuthenticationClient; WindowClient: typeof WindowClient; DistributedStoreClient: typeof DistributedStoreClient; LauncherClient: typeof LauncherClient; DragAndDropClient: typeof DragAndDropClient; LinkerClient: typeof LinkerClient; StorageClient: typeof StorageClient; WorkspaceClient: typeof WorkspaceClient; DialogManager: typeof DialogManager; ConfigClient: typeof ConfigClient; HotkeyClient: typeof HotkeyClient; SearchClient: typeof SearchClient; NotificationClient: typeof NotificationClient; SmartDesktopClient: typeof SmartDesktopClient; Logger: typeof Logger; }; constructor({ fdc3 }: { fdc3: FinsembleDesktopAgent; }); publishReady(): void; /** * Returns an FSBLInfo object that provides the current version and git hash. * * @param {(FSBL) => void} [cb] Optional callback to receive FSBLInfo object. Use promise if possible. * @returns {FSBLInfo} Promise that resolves a FSBLInfo object */ getFSBLInfo(cb?: (fsblInfo: FSBLInfo) => void): Promise; /** * Register to receive a callback when FSBL is ready. This is part of the pattern * that is recommended to app builders using the FSBL API. * ``` * if (window.FSBL && FSBL.addEventListener) { * FSBL.addEventListener("onReady", init); * } else { * window.addEventListener("FSBLReady", init); * } * ``` */ addEventListener(listenerType: "onReady", callback: () => void): void; /** * Shutdown the SmartDesktop (Finsemble). */ shutdownApplication(): void; /** * Restart the SmartDesktop (Finsemble). * @param [params] * @param [params.forceRestart]=false Whether to give components a chance to shutdown. ForceRestart is used during the reset sequence. */ restartApplication(params?: RestartParams): void; /** * Deprecated. This is supposed to provide an optional callback during system shutdown * but it hasn't been functional in many versions. * @deprecated */ onShutdown(): void; /** * Invokes the onClose method of each API client when the window is closed. * * The three clients that currently require an onClose event are: * - hotkeyClient (to deregister global hotkeys that were added by this app) - better handled by the hotkeys service by listening for closed windows * - linkerClient (to remove distributed store listeners) - linkerClient is deprecated * - notificationClient (to remove notification subscriptions) - better handled by the notification service by listening for closed windows * * FinsembleWindow.closeAllWraps() - Removes listeners in the window service. - better handled by the window service itself. * * RouterClient.disconnectAll() - Removes all registered responders, listeners and subscribers. - This can probably be handled by the router service, e.g. by detecting transport disconnect or by handling window close events. */ windowClose(): void; /** * Depending on config, signals the window service and boot system that the component/window has been successfully * started. This is never done inside a BrowserView (because the parent BrowserWindow will have already * send these signals). * * @param {string} name - The name of this instance (windowName) * @param {string} type - The component type of this instance */ maybeSignalSuccessfulStart(name: string, type: string, waitForInitialization: boolean): void; /** * Starts the client API (running in this app). This is called automatically by the preload (FSBL.js aka finsemble-desktop-api-preload.ts) * which is injected by the launcher service. * * Any usage of client APIs prior to this function completing is indeterminant. * * Within this function we perform a number of steps including: * - Extraction of startup data (from options.customData) * - Starting of the router * - Creation of the global finsembleWindow * - initialization of the FSBL client APIs * - Registering of error handlers and other miscellany */ startApp(): Promise; /** * Stops the app. This primarily closes the router and terminates each of the FSBL clients. */ stopApp(): void; } export {}; //# sourceMappingURL=FSBLDesktop.d.ts.map