import { ModuleDesc, ModuleName, ModuleEventMap, ModuleCmdMap, CmdFun } from '../types/protocol';
import { ProxyConfig } from '../types/service';
import { APIItem } from '../config/api';
export declare enum EventEnum {
    Updated = "Account.Updated"
}
export interface EventMap extends ModuleEventMap<EventEnum> {
    [EventEnum.Updated]: {
        type: '';
        params: {};
    };
}
export declare enum CmdEnum {
    Init = "Service.init",
    Update = "Service.update",
    GetEnvironment = "Service.GetEnvironment",
    Request = "Service.request",
    SetProxy = "Service.SetProxy",
    SetCustomHeaders = "Service.setCustomHeaders"
}
export type CmdInit = (m: ModuleName.service, cmd: CmdEnum.Init) => void;
export type CmdUpdate = (m: ModuleName.service, cmd: CmdEnum.Update, config: {
    environment?: string;
    larkSession?: string;
    larkSessionList?: string[];
    type?: 'ide' | 'debug';
}) => void;
export type CmdGetEnvironment = (m: ModuleName.service, cmd: CmdEnum.GetEnvironment) => {
    environment: string;
};
export type CmdRequest = (m: ModuleName.service, cmd: CmdEnum.Request, api: APIItem, params?: any, options?: {
    responseHeader?: boolean;
    responseCode?: boolean;
    headers?: {};
    traceId?: string;
    logId?: boolean;
    timeout?: number;
}) => Promise<any>;
export type CmdSetProxy = (m: ModuleName.service, cmd: CmdEnum.SetProxy, proxyConfig: ProxyConfig) => void;
export type CmdSetCustomHeaders = (m: ModuleName.service, cmd: CmdEnum.SetCustomHeaders, customHeaders: Record<string, string>) => void;
export type Command = CmdInit & CmdUpdate & CmdGetEnvironment & CmdRequest & CmdSetProxy & CmdSetCustomHeaders;
export interface CmdMap extends ModuleCmdMap<CmdEnum> {
    [CmdEnum.Init]: CmdFun<CmdInit>;
    [CmdEnum.Update]: CmdFun<CmdUpdate>;
    [CmdEnum.GetEnvironment]: CmdFun<CmdGetEnvironment>;
    [CmdEnum.Request]: CmdFun<CmdRequest>;
    [CmdEnum.SetProxy]: CmdFun<CmdSetProxy>;
    [CmdEnum.SetCustomHeaders]: CmdFun<CmdSetCustomHeaders>;
}
export declare const ServiceDesc: ModuleDesc<EventMap, CmdMap, ModuleName>;
