import { Config } from "../config"; import { ModuleConfigs as IModuleConfigs, EcoFlowEditor as IEcoFlowEditor, EcoModule as IEcoModule, Service as IService, Database as IDatabase, Logger as ILogger, EcoOptions } from "@ecoflow/types"; import _ from "lodash"; import EcoContainer from "./EcoContainer"; import { EcoFlow as IEcoFlow } from "@ecoflow/types"; import { EcoServer } from "../service/EcoServer"; import { EcoRouter } from "../service/EcoRouter"; import { Server as SocketServer } from "socket.io"; /** * Defines an interface for process commands with two properties: STOP and RESTART. */ interface ProcessCommands { /** * Represents the "STOP" string constant. */ STOP: string; /** * Constant variable representing the "RESTART" string. */ RESTART: string; } /** * Represents an EcoFlow class that implements the EcoFlow interface. * @class */ declare class EcoFlow implements IEcoFlow { private helper; /** * A boolean flag indicating whether the user is authenticated or not. */ isAuth: boolean; /** * Assigns the underscore (_) to a variable of the same name. * @param {typeof _} _ - The underscore (_) object. * @returns The assigned underscore (_) object. */ _: typeof _; /** * Represents an instance of an EcoServer. * @type {EcoServer} server - The EcoServer instance. */ server: EcoServer; /** * Represents a socket server instance. * @type {SocketServer} */ socket: SocketServer; /** * Represents an instance of an EcoRouter. */ router: EcoRouter; /** * Represents a container for Eco objects. * @type {EcoContainer} */ container: EcoContainer; /** * Constructor for the EcoOptions class. * @param {EcoOptions} [args={}] - An object containing optional arguments. * @returns None */ constructor(args?: EcoOptions); private installBaseModulesNoAuth; /** * Asynchronously starts the application by initializing various components and services. * Logs the start of the application and checks if an app needs to be created. * Initializes database connection, router, modules, flow editor, editor, system routes, * passport authentication, and starts the server. * @returns {Promise} - A promise that resolves to the EcoFlow instance. */ start(): Promise; /** * Getter method to retrieve the module configurations from the container. * @returns {IModuleConfigs} The module configurations obtained from the container. */ get moduleConfigs(): IModuleConfigs; /** * Getter method to retrieve the configuration object from the container. * @returns {Config} The configuration object. */ get config(): Config; /** * Getter method to retrieve the database instance from the container. * @returns {IDatabase} The database instance. */ get database(): IDatabase; /** * Get the ecoModule from the container. * @returns {IEcoModule} The ecoModule object obtained from the container. */ get ecoModule(): IEcoModule; /** * Getter method to retrieve the EcoFlowEditor instance from the container. * @returns {IEcoFlowEditor} The EcoFlowEditor instance. */ get flowEditor(): IEcoFlowEditor; /** * Getter method to retrieve the service instance from the container. * @returns {IService} The service instance obtained from the container. */ get service(): IService; /** * Getter method to retrieve the logger instance from the container. * @returns {ILogger} The logger instance. */ get log(): ILogger; /** * Retrieves the version number from the package.json file. * @returns The version number as a string. */ get Version(): string; /** * Get the version of the package from the package.json file. * @returns The version of the package as a string. */ static get Version(): string; /** * Returns an object containing process commands. * @returns {ProcessCommands} An object with process commands and their corresponding values. */ static get processCommands(): ProcessCommands; } export default EcoFlow; //# sourceMappingURL=EcoFlow.d.ts.map