1{ 2 "title": "JSON schema for app_startup.json", 3 "$schema": "http://json-schema.org/draft-07/schema#", 4 "type": "object", 5 "additionalProperties": false, 6 "required": [ 7 "configEntry" 8 ], 9 "propertyNames": { 10 "enum": [ 11 "startupTasks", 12 "configEntry", 13 "appPreloadHintStartupTasks", 14 "systemPreloadHintStartupTasks" 15 ] 16 }, 17 "properties": { 18 "startupTasks": { 19 "type": "array", 20 "uniqueItems": true, 21 "items": { 22 "type": "object", 23 "propertyNames": { 24 "enum": [ 25 "name", 26 "srcEntry", 27 "dependencies", 28 "excludeFromAutoStart", 29 "runOnThread", 30 "waitOnMainThread", 31 "matchRules" 32 ] 33 }, 34 "required": [ 35 "name", 36 "srcEntry" 37 ], 38 "properties": { 39 "name": { 40 "description": "Indicates the name of the startup task.", 41 "type": "string", 42 "pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$", 43 "maxLength": 127 44 }, 45 "srcEntry": { 46 "description": "Indicates the js code path corresponding to the startup task.", 47 "type": "string", 48 "maxLength": 127 49 }, 50 "dependencies": { 51 "description": "Indicates the dependencies of the startup task.", 52 "type": "array", 53 "uniqueItems": true, 54 "items": { 55 "type": "string" 56 }, 57 "default": [] 58 }, 59 "excludeFromAutoStart": { 60 "description": "Indicates whether the startup task is excluded from automatic start.", 61 "type": "boolean", 62 "default": false 63 }, 64 "runOnThread": { 65 "description": "Indicates the running thread of the startup task.", 66 "type": "string", 67 "enum": [ 68 "mainThread", 69 "taskPool" 70 ], 71 "default": "mainThread" 72 }, 73 "waitOnMainThread": { 74 "description": "Indicates whether the startup task block the main thread.", 75 "type": "boolean", 76 "default": true 77 }, 78 "matchRules": { 79 "description": "Incidcates match rules of the startup task.", 80 "type": "object", 81 "propertyNames": { 82 "enum": [ 83 "uris", 84 "insightIntents", 85 "actions", 86 "customization" 87 ] 88 }, 89 "properties": { 90 "uris": { 91 "description": "Indicates uri match rule of the startup task.", 92 "type": "array", 93 "uniqueItems": true, 94 "items": { 95 "type": "string" 96 } 97 }, 98 "insightIntents": { 99 "description": "Indicates insightIntent match rule of the startup task.", 100 "type": "array", 101 "uniqueItems": true, 102 "items": { 103 "type": "string" 104 } 105 }, 106 "actions": { 107 "description": "Indicates action match rule of the startup task.", 108 "type": "array", 109 "uniqueItems": true, 110 "items": { 111 "type": "string" 112 } 113 }, 114 "customization": { 115 "description": "Indicates custom match rule of the startup task.", 116 "type": "array", 117 "uniqueItems": true, 118 "items": { 119 "type": "string" 120 } 121 } 122 } 123 } 124 } 125 } 126 }, 127 "configEntry": { 128 "description": "Indicates the js code path corresponding to the startup config.", 129 "type": "string", 130 "maxLength": 127 131 }, 132 "appPreloadHintStartupTasks": { 133 "type": "array", 134 "uniqueItems": true, 135 "items": { 136 "type": "object", 137 "propertyNames": { 138 "enum": [ 139 "name", 140 "srcEntry", 141 "dependencies", 142 "excludeFromAutoStart", 143 "runOnThread", 144 "matchRules" 145 ] 146 }, 147 "required": [ 148 "name", 149 "srcEntry", 150 "runOnThread" 151 ], 152 "properties": { 153 "name": { 154 "description": "Indicates the name of the preload task.", 155 "type": "string", 156 "pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$", 157 "maxLength": 127 158 }, 159 "srcEntry": { 160 "description": "Indicates the js code path corresponding to the preload task.", 161 "type": "string", 162 "maxLength": 127 163 }, 164 "dependencies": { 165 "description": "Indicates the dependencies of the preload task.", 166 "type": "array", 167 "uniqueItems": true, 168 "items": { 169 "type": "string" 170 }, 171 "default": [] 172 }, 173 "excludeFromAutoStart": { 174 "description": "Indicates whether the preload task is excluded from automatic start.", 175 "type": "boolean", 176 "default": false 177 }, 178 "runOnThread": { 179 "description": "Indicates the running thread, preload task runs only on child thread.", 180 "type": "string", 181 "enum": [ 182 "taskPool" 183 ] 184 }, 185 "matchRules": { 186 "description": "Incidcates match rules of the startup task.", 187 "type": "object", 188 "propertyNames": { 189 "enum": [ 190 "uris", 191 "insightIntents", 192 "actions" 193 ] 194 }, 195 "properties": { 196 "uris": { 197 "description": "Indicates uri match rule of the startup task.", 198 "type": "array", 199 "uniqueItems": true, 200 "items": { 201 "type": "string" 202 } 203 }, 204 "insightIntents": { 205 "description": "Indicates insightIntent match rule of the startup task.", 206 "type": "array", 207 "uniqueItems": true, 208 "items": { 209 "type": "string" 210 } 211 }, 212 "actions": { 213 "description": "Indicates action match rule of the startup task.", 214 "type": "array", 215 "uniqueItems": true, 216 "items": { 217 "type": "string" 218 } 219 } 220 } 221 } 222 } 223 } 224 }, 225 "systemPreloadHintStartupTasks": { 226 "type": "array", 227 "uniqueItems": true, 228 "items": { 229 "type": "object", 230 "propertyNames": { 231 "enum": [ 232 "name", 233 "srcEntry", 234 "ohmurl" 235 ] 236 }, 237 "required": [ 238 "name", 239 "srcEntry", 240 "ohmurl" 241 ], 242 "properties": { 243 "name": { 244 "description": "Indicates the name of the preload task.", 245 "type": "string", 246 "pattern": "^[@a-zA-Z][0-9a-zA-Z_.]+$", 247 "maxLength": 127 248 }, 249 "srcEntry": { 250 "description": "Indicates the js code path corresponding to the preload task.", 251 "type": "string", 252 "maxLength": 127 253 }, 254 "ohmurl": { 255 "description": "Indicates the system so name of the preload task.", 256 "type": "string", 257 "maxLength": 127 258 } 259 } 260 } 261 } 262 } 263}