import BaseModule from '../../common/Module';
import { ModuleName } from '../../protocol';
import { CmdEnum, EventMap, CmdMap } from '../../protocol/upload';
import { UploadGadgetOptions, UploadBlockOptions, Progress, GadgetPlatform, GadgetFormData, GadgetPluginFormData } from '../../types/upload';
import { AppTypeEnum } from '../../types/commonData';
export default abstract class UploadModule extends BaseModule<ModuleName.upload, EventMap> implements CmdMap {
    constructor();
    protected abstract onProgress(data: Progress): void;
    private getPCMode;
    protected emitProgress(data: Progress): void;
    protected getGadgetFormData(options: GadgetFormData): {};
    protected getGadgetPluginFormData(options: GadgetPluginFormData): {};
    protected getBlockFormData(options: {
        packagePath: string;
        description: string;
        version: string;
        blockTypeId: string;
        extensionSubType: string;
    }): {};
    protected getGadgetNavFormData(options: GadgetFormData): {};
    private getGadgetLatestVersion;
    private getGadgetPluginLatestVersion;
    private getBlockLatestVersion;
    private getInputVersion;
    private getInputDescription;
    getPlatformUrl(appId: string, appType: AppTypeEnum, blockTypeID?: string): string;
    abstract showPlatformUrl(appId: string, appType: AppTypeEnum, blockTypeID?: string): string;
    protected updateLastUploadTime(compilePath: string, version: string, appType: AppTypeEnum): void;
    [CmdEnum.gadgetLatestVersion](options: {
        compilePath: string;
    }): Promise<{
        [GadgetPlatform.Mobile]: string;
        [GadgetPlatform.PC]: string;
        ['mobile-nav']: string;
    }>;
    [CmdEnum.gadgetPluginLatestVersion](options: {
        compilePath: string;
    }): Promise<{
        latestVersion: string;
    }>;
    [CmdEnum.blockLatestVersion](options: {
        compilePath: string;
        blockTypeId: string;
    }): Promise<{
        libVersion: string;
        latestVersion: string;
    }>;
    [CmdEnum.uploadGadget](options: UploadGadgetOptions): Promise<{
        url: string;
    } | void>;
    [CmdEnum.uploadGadgetPlugin](options: UploadGadgetOptions): Promise<{
        url: string;
    } | void>;
    [CmdEnum.uploadGadgetNav](options: UploadGadgetOptions): Promise<{
        url: string;
    } | void>;
    [CmdEnum.uploadBlock](options: UploadBlockOptions): Promise<{
        url: string;
    }>;
    [CmdEnum.getH5OfflineMeta](params: {
        appId: string;
    }): Promise<{
        pkg_id: number;
        latest_version: string;
        desc: string;
    }>;
    [CmdEnum.uploadH5Offline](params: {
        appId: string;
        version: string;
        desc: string;
        projectPath: string;
        extConfig: Record<string, any>;
        traceId?: string;
    }): Promise<any>;
}
