/// <reference types="node" />
import { Ports } from '../serialports';
export declare type PluginFactory = (serverApi: ServerAPI) => Plugin;
export interface Plugin {
    start: (config: object, restart: (newConfiguration: object) => void) => any;
    stop: () => any;
}
export interface ServerAPI {
    getSelfPath: (path: string) => void;
    getPath: (path: string) => void;
    getMetadata: (path: string) => void;
    putSelfPath: (aPath: string, value: any, updateCb: () => void) => Promise<any>;
    putPath: (aPath: string, value: number | string | object | boolean, updateCb: (err?: Error) => void, source: string) => Promise<any>;
    queryRequest: (requestId: string) => Promise<any>;
    error: (msg: string) => void;
    debug: (msg: string) => void;
    registerDeltaInputHandler: (handler: (delta: object, next: (delta: object) => void) => void) => void;
    setProviderStatus: (msg: string) => void;
    handleMessage: (id: string, msg: any) => void;
    setProviderError: (msg: string) => void;
    savePluginOptions: (configuration: object, cb: (err: NodeJS.ErrnoException | null) => void) => void;
    readPluginOptions: () => object;
    getDataDirPath: () => string;
    registerPutHandler: (context: string, path: string, callback: () => void, source: string) => void;
    registerActionHandler: (context: string, path: string, callback: () => void, source: string) => void;
    registerHistoryProvider: (provider: {
        hasAnydata: (options: object, cb: (hasResults: boolean) => void) => void;
        getHistory: (date: Date, path: string, cb: (deltas: object[]) => void) => void;
        streamHistory: (spark: any, options: object, onDelta: (delta: object) => void) => void;
    }) => void;
    getSerialPorts: () => Promise<Ports>;
}
