import type { SpyMessage, OnInitParams, PageSpyPlugin, PluginOrder, OnMountedParams } from '@huolala-tech/page-spy-types'; import type { SocketStoreBase } from '@huolala-tech/page-spy-base'; import type { InitConfig } from '@huolala-tech/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, 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; static hasInited: boolean; static hasMounted: boolean; constructor(config?: DataHarborConfig); onInit({ socketStore, config }: OnInitParams): Promise; private initPeriodTimer; onMounted({ modal, toast, root }: OnMountedParams): void; getParams(type: 'upload', params: WholeActionParams): Promise; getParams(type: 'download'): Promise; getParams(type: 'upload-periods', params: PeriodActionParams): Promise; getParams(type: 'download-periods', params: PeriodActionParams): Promise; onOfflineLog(type: 'upload', params?: WholeActionParams): Promise; onOfflineLog(type: 'download', params?: WholeActionParams): Promise; onOfflineLog(type: 'upload-periods', params: PeriodActionParams): Promise; onOfflineLog(type: 'download-periods', params: PeriodActionParams): Promise; upload(params?: WholeActionParams): Promise; uploadPeriods(params: PeriodActionParams): Promise; download(params?: WholeActionParams): Promise; downloadPeriods(params: PeriodActionParams): Promise; onReset(): void; pause(): void; resume(): void; reharbor(): void; clearAndNotify(notify?: boolean): void; isCaredPublicData(message: SpyMessage.MessageItem): boolean; getDebugUrl(result: H.UploadResult | null): string; } export {};