From a3365651d1c1b1e444f0691ccf392d5962fa920d Mon Sep 17 00:00:00 2001 From: Carl Bingel Date: Sun, 9 Feb 2020 18:27:28 +0100 Subject: [PATCH] added file --- jsonevtloop_jsonschema_V2.txt | 80 +++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 jsonevtloop_jsonschema_V2.txt diff --git a/jsonevtloop_jsonschema_V2.txt b/jsonevtloop_jsonschema_V2.txt new file mode 100644 index 00000000..448ca7ec --- /dev/null +++ b/jsonevtloop_jsonschema_V2.txt @@ -0,0 +1,80 @@ + + ------------------------------ + Description of the JSON schema + ------------------------------ + + +Version 2 + + + JSON Requests are read from STDIN in "jsonevtloop" mode and the Reponses are + sent to STDOUT in "jsonevtloop" mode + + Generic Request attributes valid for ALL requests + { + "reqType": "", // MANDATORY: Name of request type + "reqID": // Optional: reqID that will be present in the + // response message for async callers to use as transaction id + // (note: for brevity omitted in the examples below) + } + Generic Response attributes valid for ALL responses + { + "respType": "", // Name of response type + "apiVer": 2, // API Version 2 + "reqID": , // Request Identifier as present in the request object + "status": "", // Whether the request was a success of failure + "message": "" // In case of status="error", this contains any error message + } + + + Send Message Request (direct message to another person) + { + "reqType": "send_message", + "recipientNumber": "", + "messageBody": "", + "attachments": [ "", ... ] + } + + + Alive Request + Test if signal-cli is still responding + { + "reqType": "alive" + } + + Alive Response + { + "respType": "alive" + } + + + Exit Request + Request immediate termination of signal-cli client + { + "reqType": "exit" + } + + Exit Response to an exit request + Indicated the exit was due to an exit request as opposed to an error + { + "respType": "exit", + "status": "ok" + } + + Exit Response due to an unrecoverable error + { + "respType": "exit", + "status": "error", + "message": "" + } + + Generic Error Response + { + "respType": "error", + "status": "error", + "message": "" + } + + + + \ No newline at end of file