|
1 | 1 | {
|
2 | 2 | "$schema": "http://json-schema.org/draft-07/schema#",
|
3 |
| - "type": "object", |
4 | 3 | "title": "UpdateMessage",
|
5 | 4 | "additionalProperties": false,
|
6 | 5 | "description": "Message sent from browser when release notes are updated",
|
7 |
| - "properties": { |
8 |
| - "status": { |
9 |
| - "description": "Current status of version check", |
10 |
| - "type": "string", |
11 |
| - "enum": ["loading", "loaded", "updateReady"] |
12 |
| - }, |
13 |
| - "currentVersion": { |
14 |
| - "description": "Current version of the app", |
15 |
| - "type": "string" |
| 6 | + "type": "object", |
| 7 | + "oneOf": [ |
| 8 | + { |
| 9 | + "type": "object", |
| 10 | + "title": "Loading State", |
| 11 | + "description": "Loading release notes", |
| 12 | + "required": ["status", "currentVersion", "lastUpdate"], |
| 13 | + "properties": { |
| 14 | + "status": { |
| 15 | + "type": "string", |
| 16 | + "const": "loading" |
| 17 | + }, |
| 18 | + "currentVersion": { |
| 19 | + "description": "Current version of the app", |
| 20 | + "type": "string" |
| 21 | + }, |
| 22 | + "lastUpdate": { |
| 23 | + "description": "Timestamp of last check for version updates", |
| 24 | + "type": "number" |
| 25 | + } |
| 26 | + } |
16 | 27 | },
|
17 |
| - "latestVersion": { |
18 |
| - "description": "Latest version of the app. May be the same as currentVersion", |
19 |
| - "type": "string" |
| 28 | + { |
| 29 | + "type": "object", |
| 30 | + "title": "Release Notes Loaded State", |
| 31 | + "description": "Release notes loaded. Browser is up-to-date", |
| 32 | + "required": ["status", "currentVersion", "latestVersion", "lastUpdate"], |
| 33 | + "properties": { |
| 34 | + "status": { |
| 35 | + "type": "string", |
| 36 | + "const": "loaded" |
| 37 | + }, |
| 38 | + "currentVersion": { |
| 39 | + "description": "Current version of the app", |
| 40 | + "type": "string" |
| 41 | + }, |
| 42 | + "latestVersion": { |
| 43 | + "description": "Latest version of the app. May be the same as currentVersion", |
| 44 | + "type": "string" |
| 45 | + }, |
| 46 | + "lastUpdate": { |
| 47 | + "description": "Timestamp of last check for version updates", |
| 48 | + "type": "number" |
| 49 | + }, |
| 50 | + "releaseTitle": { |
| 51 | + "description": "Name of the current release (e.g. April 26 2024)", |
| 52 | + "type": "string" |
| 53 | + }, |
| 54 | + "releaseNotes": { |
| 55 | + "description": "Array containing notes for the latest release", |
| 56 | + "type": "array", |
| 57 | + "items": { |
| 58 | + "type": "string" |
| 59 | + } |
| 60 | + }, |
| 61 | + "releaseNotesPrivacyPro": { |
| 62 | + "description": "Array containing Privacy Pro notes for the latest release", |
| 63 | + "type": "array", |
| 64 | + "items": { |
| 65 | + "type": "string" |
| 66 | + } |
| 67 | + } |
| 68 | + } |
20 | 69 | },
|
21 |
| - "lastUpdate": { |
22 |
| - "description": "Timestamp of last check for version updates", |
23 |
| - "type": "number" |
| 70 | + { |
| 71 | + "type": "object", |
| 72 | + "title": "Update Ready State", |
| 73 | + "description": "Update downloaded and installed. Restart to update", |
| 74 | + "required": ["status", "automaticUpdate", "currentVersion", "latestVersion", "lastUpdate"], |
| 75 | + "properties": { |
| 76 | + "status": { |
| 77 | + "type": "string", |
| 78 | + "enum": ["updateReady", "criticalUpdateReady"] |
| 79 | + }, |
| 80 | + "automaticUpdate": { |
| 81 | + "type": "boolean" |
| 82 | + }, |
| 83 | + "currentVersion": { |
| 84 | + "description": "Current version of the app", |
| 85 | + "type": "string" |
| 86 | + }, |
| 87 | + "latestVersion": { |
| 88 | + "description": "Latest version of the app. May be the same as currentVersion", |
| 89 | + "type": "string" |
| 90 | + }, |
| 91 | + "lastUpdate": { |
| 92 | + "description": "Timestamp of last check for version updates", |
| 93 | + "type": "number" |
| 94 | + }, |
| 95 | + "releaseTitle": { |
| 96 | + "description": "Name of the current release (e.g. April 26 2024)", |
| 97 | + "type": "string" |
| 98 | + }, |
| 99 | + "releaseNotes": { |
| 100 | + "description": "Array containing notes for the latest release", |
| 101 | + "type": "array", |
| 102 | + "items": { |
| 103 | + "type": "string" |
| 104 | + } |
| 105 | + }, |
| 106 | + "releaseNotesPrivacyPro": { |
| 107 | + "description": "Array containing Privacy Pro notes for the latest release", |
| 108 | + "type": "array", |
| 109 | + "items": { |
| 110 | + "type": "string" |
| 111 | + } |
| 112 | + } |
| 113 | + } |
24 | 114 | },
|
25 |
| - "releaseTitle": { |
26 |
| - "description": "Name of the current release (e.g. April 26 2024)", |
27 |
| - "type": "string" |
| 115 | + { |
| 116 | + "type": "object", |
| 117 | + "title": "Update Error State", |
| 118 | + "description": "An error occurred during the update process", |
| 119 | + "required": ["status", "currentVersion", "latestVersion", "lastUpdate"], |
| 120 | + "properties": { |
| 121 | + "status": { |
| 122 | + "type": "string", |
| 123 | + "const": "updateError" |
| 124 | + }, |
| 125 | + "currentVersion": { |
| 126 | + "description": "Current version of the app", |
| 127 | + "type": "string" |
| 128 | + }, |
| 129 | + "latestVersion": { |
| 130 | + "description": "Latest version of the app. May be the same as currentVersion", |
| 131 | + "type": "string" |
| 132 | + }, |
| 133 | + "lastUpdate": { |
| 134 | + "description": "Timestamp of last check for version updates", |
| 135 | + "type": "number" |
| 136 | + }, |
| 137 | + "releaseTitle": { |
| 138 | + "description": "Name of the current release (e.g. April 26 2024)", |
| 139 | + "type": "string" |
| 140 | + }, |
| 141 | + "releaseNotes": { |
| 142 | + "description": "Array containing notes for the latest release", |
| 143 | + "type": "array", |
| 144 | + "items": { |
| 145 | + "type": "string" |
| 146 | + } |
| 147 | + }, |
| 148 | + "releaseNotesPrivacyPro": { |
| 149 | + "description": "Array containing Privacy Pro notes for the latest release", |
| 150 | + "type": "array", |
| 151 | + "items": { |
| 152 | + "type": "string" |
| 153 | + } |
| 154 | + } |
| 155 | + } |
28 | 156 | },
|
29 |
| - "releaseNotes": { |
30 |
| - "description": "Array containing notes for the latest release", |
31 |
| - "type": "array", |
32 |
| - "items": { |
33 |
| - "type": "string" |
| 157 | + { |
| 158 | + "type": "object", |
| 159 | + "title": "Downloading Update State", |
| 160 | + "description": "An update is available and being downloaded", |
| 161 | + "required": ["status", "currentVersion", "latestVersion", "lastUpdate", "downloadProgress"], |
| 162 | + "properties": { |
| 163 | + "status": { |
| 164 | + "type": "string", |
| 165 | + "const": "updateDownloading" |
| 166 | + }, |
| 167 | + "currentVersion": { |
| 168 | + "description": "Current version of the app", |
| 169 | + "type": "string" |
| 170 | + }, |
| 171 | + "latestVersion": { |
| 172 | + "description": "Latest version of the app. May be the same as currentVersion", |
| 173 | + "type": "string" |
| 174 | + }, |
| 175 | + "lastUpdate": { |
| 176 | + "description": "Timestamp of last check for version updates", |
| 177 | + "type": "number" |
| 178 | + }, |
| 179 | + "downloadProgress": { |
| 180 | + "description": "Download progress of new version as a decimal number from 0 to 1, where 1 is fully downloaded", |
| 181 | + "type": "number" |
| 182 | + } |
34 | 183 | }
|
35 | 184 | },
|
36 |
| - "releaseNotesPrivacyPro": { |
37 |
| - "description": "Array containing Privacy Pro notes for the latest release", |
38 |
| - "type": "array", |
39 |
| - "items": { |
40 |
| - "type": "string" |
| 185 | + { |
| 186 | + "type": "object", |
| 187 | + "title": "Preparing Update State", |
| 188 | + "description": "An update has been downloaded and is being installed", |
| 189 | + "required": ["status", "currentVersion", "latestVersion", "lastUpdate"], |
| 190 | + "properties": { |
| 191 | + "status": { |
| 192 | + "type": "string", |
| 193 | + "const": "updatePreparing" |
| 194 | + }, |
| 195 | + "currentVersion": { |
| 196 | + "description": "Current version of the app", |
| 197 | + "type": "string" |
| 198 | + }, |
| 199 | + "latestVersion": { |
| 200 | + "description": "Latest version of the app. May be the same as currentVersion", |
| 201 | + "type": "string" |
| 202 | + }, |
| 203 | + "lastUpdate": { |
| 204 | + "description": "Timestamp of last check for version updates", |
| 205 | + "type": "number" |
| 206 | + } |
41 | 207 | }
|
42 | 208 | }
|
43 |
| - }, |
44 |
| - "required": ["currentVersion", "lastUpdate", "status"] |
| 209 | + ] |
45 | 210 | }
|
0 commit comments