import { InstallOptions } from "./installOptions"; import { SyncOptions } from "./syncOptions"; import { SuccessCallback } from "./callbackUtil"; import { DownloadProgress } from "./package"; import { SyncStatus } from "./syncStatus"; interface StatusReport { status: number; label: string; appVersion: string; deploymentKey: string; lastVersionLabelOrAppVersion: string; lastVersionDeploymentKey: string; } interface PluginCallResponse { value: T; } interface NativeDecodeSignatureOptions { publicKey: string; signature: string; } interface NativePathOptions { path: string; } interface NativeHashOptions { packageHash: string; } interface NativeInstallOptions extends InstallOptions { startLocation: string; } interface NativeUnzipOptions extends InstallOptions { zipFile: string; targetDirectory: string; } interface NativeStatusReportOptions { statusReport: StatusReport; } export interface NativeCodePushPlugin { getDeploymentKey(): Promise>; getServerURL(): Promise>; getPublicKey(): Promise>; decodeSignature(options: NativeDecodeSignatureOptions): Promise>; getBinaryHash(): Promise>; getPackageHash(options: NativePathOptions): Promise>; notifyApplicationReady(): Promise; isFirstRun(options: NativeHashOptions): Promise>; isPendingUpdate(): Promise>; isFailedUpdate(options: NativeHashOptions): Promise>; install(options: NativeInstallOptions): Promise; reportFailed(options: NativeStatusReportOptions): Promise; reportSucceeded(options: NativeStatusReportOptions): Promise; restartApplication(): Promise; preInstall(options: NativeInstallOptions): Promise; getAppVersion(): Promise>; getNativeBuildTime(): Promise>; unzip(options: NativeUnzipOptions): Promise; sync(syncOptions?: SyncOptions, downloadProgress?: SuccessCallback): Promise; addListener(eventName: "codePushStatus", listenerFunc: (info: any) => void): void; } export declare const CodePush: NativeCodePushPlugin; export {};