import type { IPicGo, IConfig } from '../../types'; import type { IApplyResolvedOptions, IEncryptionSwitchContext, ISyncOptions, ISyncResult } from './types'; import { E2EAskPinReason } from './types'; interface IConfigSyncManagerOptions { onAskPin?: (reason: E2EAskPinReason, retryCount: number) => Promise; onAskEncryptionSwitch?: (context: IEncryptionSwitchContext) => Promise; } export declare class ConfigSyncManager { private readonly ctx; private readonly snapshotPath; private readonly configService; private readonly onAskPin?; private readonly onAskEncryptionSwitch?; private readonly e2eService; private currentRemoteVersion; private originalRemote; private remoteE2EVersion; private remoteClientKekSalt?; private remoteClientDekEncrypted?; private cachedDEK?; private cachedClientDekEncrypted?; constructor(ctx: IPicGo, options?: IConfigSyncManagerOptions); sync(options?: ISyncOptions, retryCount?: number): Promise; applyResolvedConfig(resolvedConfig: IConfig, options?: IApplyResolvedOptions): Promise; private fetchRemoteConfig; private pushRemoteConfig; private applyE2EStateAfterPush; private setRemoteE2EState; private confirmEncryptionSwitch; private buildPushPayload; private shouldUseE2E; private isEncryptionModeSwitch; private decryptRemoteConfig; private ensureDEK; private askPin; } export type { IDiffNode, IE2EPayload, IEncryptionSwitchContext, ISyncConfigResponse, ISyncOptions, IApplyResolvedOptions } from './types'; export { SyncStatus, ConflictType, E2EVersion, EncryptionMethod, E2EAskPinReason } from './types'; export { CorruptedDataError, UnsupportedVersionError, MissingHandlerError, MissingEncryptionSwitchHandlerError, InvalidPinError, MaxRetryExceededError, DecryptionFailedError } from './errors';