// Type definitions for Apache Cordova CodePush plugin. // Project: https://github.com/Microsoft/cordova-plugin-code-push // // Copyright (c) Microsoft Corporation // All rights reserved. // Licensed under the MIT license. import { InstallOptions } from "./installOptions"; import { registerPlugin } from "@capacitor/core"; 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; addListener(eventName: "codePushStatus", listenerFunc: (info: any) => void): void; } export const CodePush = /*#__PURE__*/ registerPlugin("CodePush");