import { ApiItem } from '../bridge/types';
import { BaseAccountInfo, AppInfoList, DocUrl, AppType, AccountInfo, SimulatorConfig as ProjectConfig, ApplicationType, DebugTenant, DebugAccountInfo } from '../../types/commonData';
import { StorageStruct } from '../../types/storage';
import { GadgetPlatform } from '../../types/upload';
import { SimulatorConfig } from '../../modules/simulator/types/ui';
import { StaticStorageItem } from '../../modules/static/index';
import { TemplateItem } from '../../modules/static/item/template';
import { Env } from '../../types/account';
export declare enum TransferApi {
    getDebugAccount = "getDebugAccount",
    chooseFolder = "chooseFolder",
    openProject = "openProject",
    checkProject = "checkProject",
    getSystemPathInfo = "getSystemPathInfo",
    openFile = "openFile",
    accountInfo = "accountInfo",
    accountLogin = "accountLogin",
    accountLogout = "accountLogout",
    accountTenant = "accountTenant",
    accountTenantSwitch = "accountTenantSwitch",
    fullAccountInfo = "fullAccountInfo",
    openPage = "openPage",
    recentProject = "recentProject",
    deleteProjects = "deleteProjects",
    templateList = "templateList",
    createProject = "createProject",
    feedback = "feedback",
    helpDocUrl = "helpDocUrl",
    getUUID = "getUUID",
    eventTracker = "eventTracker",
    getSettings = "getSettings",
    setSettings = "setSettings",
    featureGating = "featureGating",
    getClipboardData = "getClipboardData",
    getRoutePath = "getRoutePath",
    getIDEStorage = "getIDEStorage",
    setStorage = "setStorage",
    previewH5App = "previewH5App",
    getSimulatorConfig = "getSimulatorConfig",
    setBrowserOptions = "setBrowserOptions",
    openIn = "openIn",
    startDevtools = "startDevtools",
    getPagePath = "getPagePath",
    updateSimulatorConfig = "updateSimulatorConfig",
    eventTack = "eventTrack",
    reportIssue = "reportIssue",
    enableBlock = "enableBlock",
    uploadH5Offline = "uploadH5Offline",
    getH5OfflineMeta = "getH5OfflineMeta",
    enableH5Block = "enableH5Block",
    getDebugTenantList = "getDebugTenantList",
    switchDebugTenant = "switchDebugTenant",
    eventTrackV2 = "eventTrackV2",
    reportResult = "reportResult"
}
export type ParamType<F extends keyof BaseNodeApiMap> = BaseNodeApiMap[F]['param'];
export type Back<F extends keyof BaseNodeApiMap> = Promise<BaseNodeApiMap[F]['suc']>;
export type Key = keyof BaseNodeApiMap;
interface BaseNodeApiMap {
    [TransferApi.openProject]: ApiItem<{
        compilePath: string;
        appType?: AppType;
        auto?: boolean;
    }, void, {}>;
    [TransferApi.chooseFolder]: ApiItem<{}, string, void>;
    [TransferApi.checkProject]: ApiItem<{
        compilePath: string;
        appType?: AppType;
    }, void, {}>;
    [TransferApi.getSystemPathInfo]: ApiItem<{
        path?: string;
    }, {
        exist: boolean;
        currentPath: string;
        isDirectory?: boolean;
        children?: {
            name: string;
            path: string;
            isDirectory: boolean;
        }[];
    }, {}>;
    [TransferApi.openFile]: ApiItem<{
        dir: string;
    }, {}, {}>;
    [TransferApi.accountInfo]: ApiItem<{}, undefined | {
        userName: string;
        displayName?: string;
        userAvatar?: string;
        tenantName: string;
        tenantAvatar: string;
    }, {}>;
    [TransferApi.fullAccountInfo]: ApiItem<{}, undefined | AccountInfo, {}>;
    [TransferApi.accountLogin]: ApiItem<{
        environment: Env;
    }, {}, {}>;
    [TransferApi.accountLogout]: ApiItem<{}, {}, {}>;
    [TransferApi.accountTenant]: ApiItem<{}, undefined | {
        tenantList: BaseAccountInfo[];
    }, {}>;
    [TransferApi.accountTenantSwitch]: ApiItem<{
        account: BaseAccountInfo;
    }, {
        success: boolean;
        msg?: string;
    }, {}>;
    [TransferApi.openPage]: ApiItem<{
        url: string;
    }, {}, {}>;
    [TransferApi.recentProject]: ApiItem<{}, AppInfoList, {}>;
    [TransferApi.deleteProjects]: ApiItem<{
        compilePaths: string[];
        appType: AppType;
    }, string[], {}>;
    [TransferApi.templateList]: ApiItem<{
        appType: AppType;
    }, StaticStorageItem<TemplateItem>[], {}>;
    [TransferApi.createProject]: ApiItem<{
        templateName: string;
        targetPath: string;
        projectName: string;
        appID: string;
        blockTypeId?: string;
    }, string, {}>;
    [TransferApi.feedback]: ApiItem<{}, string, void>;
    [TransferApi.helpDocUrl]: ApiItem<{}, DocUrl[], void>;
    [TransferApi.getUUID]: ApiItem<{}, {
        uuid: string;
    }, void>;
    [TransferApi.eventTracker]: ApiItem<{
        name: string;
        tags?: {};
        type?: 'counter' | 'timer' | 'log';
    }, void, void>;
    [TransferApi.getSettings]: ApiItem<{}, {
        settings: StorageStruct['settings'];
    }, void>;
    [TransferApi.setSettings]: ApiItem<{
        settings: Partial<StorageStruct['settings']>;
    }, void, void>;
    [TransferApi.featureGating]: ApiItem<{
        keys: string[];
    }, {
        [k: string]: boolean;
    }, void>;
    [TransferApi.getClipboardData]: ApiItem<{}, {
        data: string;
    }, string>;
    [TransferApi.getRoutePath]: ApiItem<{}, string, {}>;
    [TransferApi.getIDEStorage]: ApiItem<{
        key: string;
        compilePath?: string;
    }, unknown, {}>;
    [TransferApi.setStorage]: ApiItem<{
        key: string;
        value: unknown;
        compilePath?: string;
    }, unknown, {}>;
    [TransferApi.previewH5App]: ApiItem<{
        platform: GadgetPlatform;
        h5Url: string;
    }, {
        url?: string;
    } | void, {}>;
    [TransferApi.getSimulatorConfig]: ApiItem<{}, SimulatorConfig, {}>;
    [TransferApi.setBrowserOptions]: ApiItem<{
        options: unknown;
    }, {}, {}>;
    [TransferApi.openIn]: ApiItem<{
        container: 'terminal' | 'finder';
        filePath: string;
    }, {}, {}>;
    [TransferApi.startDevtools]: ApiItem<{}, {}, {}>;
    [TransferApi.getPagePath]: ApiItem<{}, {
        pagePath: string;
    }, {}>;
    [TransferApi.updateSimulatorConfig]: ApiItem<{
        compilePath: string;
        config: Partial<ProjectConfig>;
    }, {}, {}>;
    [TransferApi.eventTack]: ApiItem<{}, {}, {}>;
    [TransferApi.eventTrackV2]: ApiItem<{
        name: string;
        tags?: Record<string, string | number>;
        traceId?: string;
        timingName?: string;
    }, {}, {}>;
    [TransferApi.reportResult]: ApiItem<{
        name: string;
        result: 'success' | 'fail';
        tags?: Record<string, string | number>;
        traceId?: string;
    }, {}, {}>;
    [TransferApi.reportIssue]: ApiItem<{
        types: string[];
        time: string;
        desc: string;
        pics?: string[];
        contact: string;
        useLog: boolean;
    }, {
        flag: boolean;
        message?: string;
    }, string>;
    [TransferApi.enableBlock]: ApiItem<{}, boolean, {}>;
    [TransferApi.uploadH5Offline]: ApiItem<{
        appId: string;
        desc: string;
        version: string;
        projectPath: string;
    }, void, {}>;
    [TransferApi.getH5OfflineMeta]: ApiItem<{
        appId: string;
    }, {
        latest_version: string;
        desc: string;
    }, void>;
    [TransferApi.enableH5Block]: ApiItem<{}, boolean, {}>;
    [TransferApi.getDebugTenantList]: ApiItem<{
        appType: AppType;
    }, {
        applicationType: ApplicationType;
        debugTenantList: DebugTenant[];
    }, {}>;
    [TransferApi.getDebugAccount]: ApiItem<{
        appType: AppType;
    }, {
        debugAccount?: DebugAccountInfo;
    }, {}>;
    [TransferApi.switchDebugTenant]: ApiItem<{
        appType: AppType;
        account: DebugTenant;
    }, {
        result: 'success' | 'fail' | 'noneed';
        msg?: string;
    }, {}>;
}
export type ServerApiMap = BaseNodeApiMap;
export {};
