{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://velox.dev/schema/methods/download.add.schema.json", "title": "download.add", "description": "Create one task. saveDir is canonicalized and checked against saveTo.allowedRoots before anything is written; a path that escapes them is refused with -32011 and no file is created.", "x-privileged": false, "x-transports": ["uds", "ws"], "x-deadlineMs": 5000, "x-errors": [-32011, -32012, -32013], "x-wsRestrictions": ["saveDir must be absent or resolve inside an existing category folder; anything else is -32011. The extension may request a download, it may not choose an arbitrary destination."], "type": "object", "properties": { "params": { "$ref": "https://velox.dev/schema/types/DownloadSpec.schema.json" }, "result": { "type": "object", "additionalProperties": false, "required": ["taskId", "state"], "properties": { "taskId": { "type": "string", "format": "uuid" }, "state": { "$ref": "https://velox.dev/schema/types/TaskState.schema.json" }, "duplicate": { "type": ["string", "null"], "format": "uuid", "description": "The existing task this URL matched, when downloads.duplicatePolicy resolved to 'skip'. taskId then names that existing task." } } } } }