declare class AppPushy { constructor(); checkUpdate(params: ICheckVersionParams): CheckVersionResultPromise; getCurrentVersionInfo(): GetCurrentVersionInfoPromise; downloadPPKVersion(params: IDownloadVersionParams): DownloadVersionPromise; reloadUpdate(params: IReloadUpdateParams): ReloadUpdatePromise; checkVersionExists(params: ICheckVersionExistsParams): CheckVersionExistsPromise; } /** * 检测版本参数 */ interface ICheckVersionParams { versionCode: string; } /** * 检测版本回调 */ interface ICheckVersionResult { } /** * 当前版本信息 */ interface ICurrentVersionInfo { currentVersion: number | null; } /** * 下载版本回调 */ interface IDownloadVersionResult { } /** * 下载版本参数 */ interface IDownloadVersionParams { newVersion: string; url: string; } /** * 加载更新包 */ interface IReloadUpdateParams { newVersion: string; } /** * 检测版本参数 */ interface ICheckVersionExistsParams { newVersion: string; } /** * 更新回调参数 */ interface IUpdateResult { code: number; msg: string; } type CheckVersionResultPromise = Promise; type GetCurrentVersionInfoPromise = Promise; type DownloadVersionPromise = Promise; type ReloadUpdatePromise = Promise; type CheckVersionExistsPromise = Promise; /** * Context */ interface IAppUpdateContext { client: AppPushy; } interface IPushyModule { /** * 检测版本 * @param params */ checkUpdate: (params: ICheckVersionParams) => CheckVersionResultPromise; /** * 当前版本信息 */ getConstantsInfo: () => GetCurrentVersionInfoPromise; /** * 下载版本 * @param params */ downloadPPK: (params: IDownloadVersionParams) => DownloadVersionPromise; /** * 加载更新包 * @param params */ reloadUpdate: (params: IReloadUpdateParams) => ReloadUpdatePromise; /** * 检测版本是否存在 * @param params */ checkVersionExists: (params: ICheckVersionExistsParams) => CheckVersionExistsPromise; } export { AppPushy as A, type CheckVersionResultPromise as C, type DownloadVersionPromise as D, type GetCurrentVersionInfoPromise as G, type IAppUpdateContext as I, type ReloadUpdatePromise as R, type ICheckVersionParams as a, type ICheckVersionResult as b, type ICurrentVersionInfo as c, type IDownloadVersionResult as d, type IDownloadVersionParams as e, type IReloadUpdateParams as f, type ICheckVersionExistsParams as g, type IUpdateResult as h, type CheckVersionExistsPromise as i, type IPushyModule as j };