import type { SpyMessage, OnInitParams, PageSpyPlugin, PluginOrder, OnMountedParams } from '@lastos/page-spy-types';
import type { SocketStoreBase } from '@lastos/page-spy-base';
import type { InitConfig } from '@lastos/page-spy-browser/dist/types/config';
import { BlobHarbor } from './harbor/blob';
import { DownloadArgs, UploadArgs } from './utils/log';
import { CacheMessageItem, DataType, PeriodActionParams, WholeActionParams } from './harbor/base';
interface DataHarborConfig {
    maximum?: number;
    caredData?: Record<Exclude<DataType, 'meta'>, boolean>;
    filename?: () => string;
    onDownload?: ((data: CacheMessageItem[]) => void) | null;
    onAfterUpload?: ((replayUrl: string, remark: string) => void) | null;
}
export default class DataHarborPlugin implements PageSpyPlugin {
    enforce: PluginOrder;
    name: string;
    harbor: BlobHarbor;
    apiBase: string;
    isPaused: boolean;
    startTimestamp: number;
    private periodTimer;
    $socketStore: SocketStoreBase | null;
    $pageSpyConfig: InitConfig | null;
    $harborConfig: Required<DataHarborConfig>;
    static hasInited: boolean;
    static hasMounted: boolean;
    constructor(config?: DataHarborConfig);
    onInit({ socketStore, config }: OnInitParams<InitConfig>): Promise<void>;
    private initPeriodTimer;
    onMounted({ modal, toast, root }: OnMountedParams<InitConfig>): void;
    getParams(type: 'upload', params: WholeActionParams): Promise<UploadArgs>;
    getParams(type: 'download'): Promise<DownloadArgs>;
    getParams(type: 'upload-periods', params: PeriodActionParams): Promise<UploadArgs>;
    getParams(type: 'download-periods', params: PeriodActionParams): Promise<DownloadArgs>;
    onOfflineLog(type: 'upload', params?: WholeActionParams): Promise<string>;
    onOfflineLog(type: 'download', params?: WholeActionParams): Promise<void>;
    onOfflineLog(type: 'upload-periods', params: PeriodActionParams): Promise<string>;
    onOfflineLog(type: 'download-periods', params: PeriodActionParams): Promise<void>;
    upload(params?: WholeActionParams): Promise<string>;
    uploadPeriods(params: PeriodActionParams): Promise<string>;
    download(params?: WholeActionParams): Promise<void>;
    downloadPeriods(params: PeriodActionParams): Promise<void>;
    onReset(): void;
    pause(): void;
    resume(): void;
    reharbor(): void;
    clearAndNotify(notify?: boolean): void;
    isCaredPublicData(message: SpyMessage.MessageItem): boolean;
    getDebugUrl(result: H.UploadResult | null): string;
}
export {};
