
import { EventEmitter } from 'events';
import { Server } from 'http'

export declare class ACInspect {
    open(): Promise<void>;
    launch(): Promise<string>;
    dealmsg(token:string, message:string): Promise<void>;
    inspectHTML(root?: string): string;
}
export declare class ACProject {
    create(option: IFalconOption | IApplicationOption): Promise<void>;
    createTemplateFiles(option: ITemplateOption): Promise<void>;
    projects(): Array<ACMode>;
    project(id:string): ACMode;
    templates(): Array<ACMode>;
    template(id:string): ACMode;
    sdks(): ACSdk[];
}
export declare class ACSocket extends EventEmitter {
    run(): Promise<void>;
    close(): Promise<void>;
    closeClient(token: string): Promise<void>;
    broadcase(message: ACSocketMessage): void;
    send(message: ACSocketMessage): void;
    request(req: SocketCenter.Request, callback?: (params:any)=>void): void;
    clients(): Array<ACSocketSession>;
    wsclients(): Array<any>;
    qrvalue(): string;
    connectInfo(): ACSocketConnectInfo;
}
export declare class ACServer extends EventEmitter {
    server: Server;
    run(): Promise<void>;
    connectInfo(): any;
}
export declare class ACPack {
    buildProject(path: string, output: string): Promise<ACPackResult>;
}
export declare class ACLint {
    lintProject(path: string): Promise<ACLintReport>;
}
export declare class ACMode {
    id: string;
    info: any;
}
export interface IApplicationOption {
    id: string;
    name: string;
    type: string;
    path: string;
    desc?: string;
}
export interface IFalconOption extends IApplicationOption {
    templates?: Array<ITemplateOption>;
}
export interface ITemplateOption {
    id: string;
    version: string;
    name: string;
    sdk_version: string;
    path: string;
    desc?: string;
    extend?: string;
}
export interface ACSocketMessage {
    token: string;
    data: any;
}
export interface ACSocketSession {
    token: string;
    name: string;
    os: string;
    platform: string;
}
export interface ACSocketConnectInfo {
    port: number;
    ip: string;
}
declare namespace ACUtils {
    function mkdirs(path: string): boolean;
    function rmdirs(path: string): void;
    function dash2hump(text: string): string;
}
declare namespace AntCube {
    const project: ACProject;
    const socket: ACSocket;
    const pack: ACPack;
    const inspect: ACInspect;
    const server: ACServer;
    const lint: ACLint;
}
export interface ACPackResult {
    success: boolean;
    message?: string;
}
export interface ACSdk {
    version:string;
}
export interface ACLintReport {
    errorCount: number;
    warningCount: number;
    message: string;
}

declare namespace SocketCenter {
    interface Request {
        token: string;
        data: any;
        id?: string;
    }
}