UNPKG

2.22 kBTypeScriptView Raw
1export interface ReleaseNoteInfo {
2 /**
3 * The version.
4 */
5 readonly version: string;
6 /**
7 * The note.
8 */
9 readonly note: string | null;
10}
11export interface BlockMapDataHolder {
12 /**
13 * The file size. Used to verify downloaded size (save one HTTP request to get length).
14 * Also used when block map data is embedded into the file (appimage, windows web installer package).
15 */
16 size?: number;
17 /**
18 * The block map file size. Used when block map data is embedded into the file (appimage, windows web installer package).
19 * This information can be obtained from the file itself, but it requires additional HTTP request,
20 * so, to reduce request count, block map size is specified in the update metadata too.
21 */
22 blockMapSize?: number;
23 /**
24 * The file checksum.
25 */
26 readonly sha512: string;
27 readonly isAdminRightsRequired?: boolean;
28}
29export interface PackageFileInfo extends BlockMapDataHolder {
30 readonly path: string;
31}
32export interface UpdateFileInfo extends BlockMapDataHolder {
33 url: string;
34}
35export interface UpdateInfo {
36 /**
37 * The version.
38 */
39 readonly version: string;
40 readonly files: Array<UpdateFileInfo>;
41 /** @deprecated */
42 readonly path: string;
43 /** @deprecated */
44 readonly sha512: string;
45 /**
46 * The release name.
47 */
48 releaseName?: string | null;
49 /**
50 * The release notes. List if `updater.fullChangelog` is set to `true`, `string` otherwise.
51 */
52 releaseNotes?: string | Array<ReleaseNoteInfo> | null;
53 /**
54 * The release date.
55 */
56 releaseDate: string;
57 /**
58 * The [staged rollout](/auto-update#staged-rollouts) percentage, 0-100.
59 */
60 readonly stagingPercentage?: number;
61 /**
62 * The minimum version of system required for the app to run. Sample value: macOS `23.1.0`, Windows `10.0.22631`.
63 * Same with os.release() value, this is a kernel version.
64 */
65 readonly minimumSystemVersion?: string;
66}
67export interface WindowsUpdateInfo extends UpdateInfo {
68 packages?: {
69 [arch: string]: PackageFileInfo;
70 } | null;
71 /**
72 * @deprecated
73 * @private
74 */
75 sha2?: string;
76}