Add client_read, client_write, client_edit and client_download
This commit is contained in:
+18
-4
@@ -928,13 +928,24 @@ paths:
|
||||
- { name: transferId, in: path, required: true, schema: { type: string } }
|
||||
get:
|
||||
operationId: getClientTransfer
|
||||
description: The file or directory a copy ClientRequest sends, as a gzipped tar holding it under its own name. Served while the request is waiting for its reply.
|
||||
description: The file or directory an upload ClientRequest sends, as a gzipped tar holding it under its own name. Served while the request is waiting for its reply.
|
||||
responses:
|
||||
"200":
|
||||
description: The archive.
|
||||
content:
|
||||
application/gzip: { schema: { type: string, format: binary } }
|
||||
"404": { $ref: "#/components/responses/Error" }
|
||||
put:
|
||||
operationId: putClientTransfer
|
||||
description: The file or directory a download ClientRequest asks for, as a gzipped tar holding it under its own name. Accepted once, while the request is waiting for its reply.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/gzip: { schema: { type: string, format: binary } }
|
||||
responses:
|
||||
"204":
|
||||
description: Received.
|
||||
"404": { $ref: "#/components/responses/Error" }
|
||||
|
||||
/api/inbox/responses:
|
||||
post:
|
||||
@@ -1718,11 +1729,13 @@ components:
|
||||
description: Work a task agent asks a connected Mac to do, sent over /api/clients/connect.
|
||||
properties:
|
||||
id: { type: string }
|
||||
op: { type: string, enum: [bash, copy, hands] }
|
||||
op: { type: string, enum: [bash, upload, download, read_file, write_file, hands] }
|
||||
command: { type: string, description: "bash: run with zsh as a login shell in the home directory, in its own process group." }
|
||||
timeout_ms: { type: integer, description: "bash: kill the process group after this long." }
|
||||
transfer: { type: string, description: "copy: the transfer id to download from /api/clients/transfers/{transferId}." }
|
||||
dest: { type: string, description: "copy: where the archive's one entry ends up, absolute or starting with ~/; whatever is there is replaced." }
|
||||
transfer: { type: string, description: "upload: the transfer id to get from /api/clients/transfers/{transferId}. download: the transfer id to put the archive to." }
|
||||
dest: { type: string, description: "upload: where the archive's one entry ends up, absolute or starting with ~/; whatever is there is replaced." }
|
||||
path: { type: string, description: "download, read_file, write_file: the file (or, for download, file or directory) on the client, absolute or starting with ~/." }
|
||||
data: { type: string, format: byte, description: "write_file: the file's new contents; parent directories are created." }
|
||||
tool: { type: string, description: "hands: the byre-hands tool to call." }
|
||||
arguments:
|
||||
type: object
|
||||
@@ -1737,6 +1750,7 @@ components:
|
||||
error: { type: string, description: Set when the request couldn't be carried out. }
|
||||
exit_code: { type: integer, description: "bash: the exit status, -1 when it was killed by its timeout." }
|
||||
output: { type: string, description: "bash: stdout and stderr together, at most their last 64 KiB." }
|
||||
data: { type: string, format: byte, description: "read_file: the file's contents." }
|
||||
result:
|
||||
type: object
|
||||
additionalProperties: true
|
||||
|
||||
Reference in New Issue
Block a user