UNPKG

1.98 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}
62export interface WindowsUpdateInfo extends UpdateInfo {
63 packages?: {
64 [arch: string]: PackageFileInfo;
65 } | null;
66 /**
67 * @deprecated
68 * @private
69 */
70 sha2?: string;
71}