@types/react-native-easy-upgrade
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

Installation

npm install --save @types/react-native-easy-upgrade

Summary

This package contains type definitions for react-native-easy-upgrade (https://github.com/react-native-org/react-native-easy-upgrade#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-easy-upgrade.

index.d.ts

interface Options {
    iOSAppId: string;
    iOSAppLookupUrl: string;
    downloadTitle: string;
    downloadDescription: string;
    downloadDestDirectory: string;
    downloadApkName: string;
    downloadApkEnd(path: string): any;
    shouldCheckApkHasDownloaded: boolean;
    onError(err: Error): any;
}

declare class AppUpgrade {
    constructor(options: Partial<Options>);
    readonly downloadDestPath: string;
    readonly downloadDestDirectory: string;
    readonly downloading: boolean;

    getNetworkStatus(): Promise<string>;

    getLocalVersionInfo(): {
        VERSION_NAME: string;
        VERSION_CODE: string;
    };

    checkApkHasDownloaded(path?: string): Promise<boolean>;

    /**
     * download file
     * @param fileUrl
     * @param downloadConf
     */
    downloadFile(fileUrl: string, downloadConf?: {
        tempDownloadPath: string;
        downloadTitle?: string | undefined;
        downloadDescription?: string | undefined;
        saveAsName?: string | undefined;
        allowedInRoaming?: boolean | undefined;
        allowedInMetered?: boolean | undefined;
        showInDownloads?: boolean | undefined;
        external?: boolean | undefined;
        path?: string | undefined;
    }): void;

    /**
     * update app and install
     * @param apkUrl
     */
    updateAndroidApp(apkUrl: string): Promise<void>;

    installApk(apkPath?: string): void;

    /**
     * Check the ios app version info from app store.
     */
    checkAppVersionIOS(): Promise<{
        latestVersion: string;
        localVersion: string;
        hasNewVersion: boolean;
        trackViewUrl: string;
        lookupInfo: {
            version: string;
            trackViewUrl: string;
            [key: string]: any;
        };
    }>;

    /**
     * navigate to app store download page.
     */
    navigateToAppStore(trackViewUrl?: string): void;

    startAppUpdate(apkUrl: string, appStoreUrl?: string): void;
}

export default AppUpgrade;

Additional Details

  • Last updated: Thu, 21 Dec 2023 19:06:51 GMT
  • Dependencies: none

Credits

These definitions were written by taoqf.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-native-easy-upgrade

Weekly Downloads

3

Version

0.0.6

License

MIT

Unpacked Size

6.62 kB

Total Files

5

Last publish

Collaborators

  • types