1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-17 23:56:11 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Add custom endpoints

This commit is contained in:
sunnylqm
2020-07-28 23:15:42 +08:00
parent d17eac48f0
commit f110df1206
5 changed files with 101 additions and 69 deletions

18
lib/index.d.ts vendored
View File

@@ -20,17 +20,27 @@ export interface UpdateAvailableResult {
description: string;
metaInfo: string;
pdiffUrl: string;
diffUrl: string;
}
diffUrl?: string;
};
export type CheckResult = Partial<ExpiredResult & UpTodateResult & UpdateAvailableResult>;
export type CheckResult =
| ExpiredResult
| UpTodateResult
| UpdateAvailableResult;
export function checkUpdate(appkey: string): Promise<CheckResult>;
export function downloadUpdate(options: UpdateAvailableResult): Promise<undefined | string>;
export function downloadUpdate(
options: UpdateAvailableResult,
): Promise<undefined | string>;
export function switchVersion(hash: string): void;
export function switchVersionLater(hash: string): void;
export function markSuccess(): void;
export function setCustomEndpoints(
mainEndpoint: string,
backupEndpoints?: string[],
): void;