mirror of
https://github.com/aljazceru/signal-cli-rest-api.git
synced 2025-12-20 16:14:29 +01:00
extended receive endpoint + AUTO_RECEIVE_SCHEDULE functionality
* added timeout, ignore_attachments and ignore_stories query parameter to receive endpoint. * added AUTO_RECEIVE_SCHEDULE_RECEIVE_TIMEOUT, AUTO_RECEIVE_SCHEDULE_IGNORE_ATTACHMENTS and AUTO_RECEIVE_SCHEDULE_IGNORE_STORIES environment variables to the AUTO_RECEIVE_SCHEDULE functionality. see #365
This commit is contained in:
@@ -241,9 +241,7 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
},
|
||||
"200": {},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -283,9 +281,7 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": ""
|
||||
},
|
||||
"204": {},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -327,9 +323,7 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": ""
|
||||
},
|
||||
"204": {},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -371,9 +365,7 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": ""
|
||||
},
|
||||
"204": {},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -1156,6 +1148,18 @@ var doc = `{
|
||||
"description": "Receive timeout in seconds (default: 1)",
|
||||
"name": "timeout",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Specify whether the attachments of the received message should be ignored",
|
||||
"name": "ignore_attachments",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Specify whether stories should be ignored when receiving messages",
|
||||
"name": "ignore_stories",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -1208,9 +1212,7 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": ""
|
||||
},
|
||||
"201": {},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -1482,9 +1484,7 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": ""
|
||||
},
|
||||
"204": {},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -1732,17 +1732,41 @@ var doc = `{
|
||||
"data:\u003cMIME-TYPE\u003e;filename=\u003cFILENAME\u003e;base64\u003ccomma\u003e\u003cBASE64 ENCODED DATA\u003e"
|
||||
]
|
||||
},
|
||||
"mentions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/client.MessageMention"
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "string"
|
||||
},
|
||||
"quote_author": {
|
||||
"type": "string"
|
||||
},
|
||||
"quote_mentions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/client.MessageMention"
|
||||
}
|
||||
},
|
||||
"quote_message": {
|
||||
"type": "string"
|
||||
},
|
||||
"quote_timestamp": {
|
||||
"type": "integer"
|
||||
},
|
||||
"recipients": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"sticker": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1834,6 +1858,15 @@ var doc = `{
|
||||
"build": {
|
||||
"type": "integer"
|
||||
},
|
||||
"capabilities": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mode": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1911,6 +1944,20 @@ var doc = `{
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"client.MessageMention": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"author": {
|
||||
"type": "string"
|
||||
},
|
||||
"length": {
|
||||
"type": "integer"
|
||||
},
|
||||
"start": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
|
||||
@@ -225,9 +225,7 @@
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
},
|
||||
"200": {},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -267,9 +265,7 @@
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": ""
|
||||
},
|
||||
"204": {},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -311,9 +307,7 @@
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": ""
|
||||
},
|
||||
"204": {},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -355,9 +349,7 @@
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": ""
|
||||
},
|
||||
"204": {},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -1140,6 +1132,18 @@
|
||||
"description": "Receive timeout in seconds (default: 1)",
|
||||
"name": "timeout",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Specify whether the attachments of the received message should be ignored",
|
||||
"name": "ignore_attachments",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Specify whether stories should be ignored when receiving messages",
|
||||
"name": "ignore_stories",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -1192,9 +1196,7 @@
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": ""
|
||||
},
|
||||
"201": {},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -1466,9 +1468,7 @@
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": ""
|
||||
},
|
||||
"204": {},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -1716,17 +1716,41 @@
|
||||
"data:\u003cMIME-TYPE\u003e;filename=\u003cFILENAME\u003e;base64\u003ccomma\u003e\u003cBASE64 ENCODED DATA\u003e"
|
||||
]
|
||||
},
|
||||
"mentions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/client.MessageMention"
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "string"
|
||||
},
|
||||
"quote_author": {
|
||||
"type": "string"
|
||||
},
|
||||
"quote_mentions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/client.MessageMention"
|
||||
}
|
||||
},
|
||||
"quote_message": {
|
||||
"type": "string"
|
||||
},
|
||||
"quote_timestamp": {
|
||||
"type": "integer"
|
||||
},
|
||||
"recipients": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"sticker": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1818,6 +1842,15 @@
|
||||
"build": {
|
||||
"type": "integer"
|
||||
},
|
||||
"capabilities": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mode": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1895,6 +1928,20 @@
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"client.MessageMention": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"author": {
|
||||
"type": "string"
|
||||
},
|
||||
"length": {
|
||||
"type": "integer"
|
||||
},
|
||||
"start": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
|
||||
@@ -106,9 +106,7 @@ definitions:
|
||||
api.SendMessageV1:
|
||||
properties:
|
||||
base64_attachment:
|
||||
example: '''<BASE64 ENCODED DATA>'' OR ''data:<MIME-TYPE>;base64,<BASE64 ENCODED
|
||||
DATA>'' OR ''data:<MIME-TYPE>;filename=<FILENAME>;base64,<BASE64 ENCODED
|
||||
DATA>'''
|
||||
example: '''<BASE64 ENCODED DATA>'' OR ''data:<MIME-TYPE>;base64,<BASE64 ENCODED DATA>'' OR ''data:<MIME-TYPE>;filename=<FILENAME>;base64,<BASE64 ENCODED DATA>'''
|
||||
type: string
|
||||
is_group:
|
||||
type: boolean
|
||||
@@ -131,14 +129,30 @@ definitions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
mentions:
|
||||
items:
|
||||
$ref: '#/definitions/client.MessageMention'
|
||||
type: array
|
||||
message:
|
||||
type: string
|
||||
number:
|
||||
type: string
|
||||
quote_author:
|
||||
type: string
|
||||
quote_mentions:
|
||||
items:
|
||||
$ref: '#/definitions/client.MessageMention'
|
||||
type: array
|
||||
quote_message:
|
||||
type: string
|
||||
quote_timestamp:
|
||||
type: integer
|
||||
recipients:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
sticker:
|
||||
type: string
|
||||
type: object
|
||||
api.TrustIdentityRequest:
|
||||
properties:
|
||||
@@ -197,6 +211,12 @@ definitions:
|
||||
properties:
|
||||
build:
|
||||
type: integer
|
||||
capabilities:
|
||||
additionalProperties:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
mode:
|
||||
type: string
|
||||
version:
|
||||
@@ -248,6 +268,15 @@ definitions:
|
||||
status:
|
||||
type: string
|
||||
type: object
|
||||
client.MessageMention:
|
||||
properties:
|
||||
author:
|
||||
type: string
|
||||
length:
|
||||
type: integer
|
||||
start:
|
||||
type: integer
|
||||
type: object
|
||||
info:
|
||||
contact: {}
|
||||
description: This is the Signal Cli REST API documentation.
|
||||
@@ -396,8 +425,7 @@ paths:
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: ""
|
||||
"200": {}
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
@@ -424,8 +452,7 @@ paths:
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"204":
|
||||
description: ""
|
||||
"204": {}
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
@@ -453,22 +480,19 @@ paths:
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"204":
|
||||
description: ""
|
||||
"204": {}
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/api.Error'
|
||||
summary: Updates the info associated to a number on the contact list. If the
|
||||
contact doesn’t exist yet, it will be added.
|
||||
summary: Updates the info associated to a number on the contact list. If the contact doesn’t exist yet, it will be added.
|
||||
tags:
|
||||
- Contacts
|
||||
/v1/devices/{number}:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Links another device to this device. Only works, if this is the
|
||||
master device.
|
||||
description: Links another device to this device. Only works, if this is the master device.
|
||||
parameters:
|
||||
- description: Registered Phone Number
|
||||
in: path
|
||||
@@ -484,8 +508,7 @@ paths:
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"204":
|
||||
description: ""
|
||||
"204": {}
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
@@ -857,8 +880,7 @@ paths:
|
||||
- Identities
|
||||
/v1/identities/{number}/trust/{numberToTrust}:
|
||||
put:
|
||||
description: Trust an identity. When 'trust_all_known_keys' is set to' true',
|
||||
all known keys of this user are trusted. **This is only recommended for testing.**
|
||||
description: Trust an identity. When 'trust_all_known_keys' is set to' true', all known keys of this user are trusted. **This is only recommended for testing.**
|
||||
parameters:
|
||||
- description: Input Data
|
||||
in: body
|
||||
@@ -993,9 +1015,7 @@ paths:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Receives Signal Messages from the Signal Network. If you are running
|
||||
the docker container in normal/native mode, this is a GET endpoint. In json-rpc
|
||||
mode this is a websocket endpoint.
|
||||
description: Receives Signal Messages from the Signal Network. If you are running the docker container in normal/native mode, this is a GET endpoint. In json-rpc mode this is a websocket endpoint.
|
||||
parameters:
|
||||
- description: Registered Phone Number
|
||||
in: path
|
||||
@@ -1006,6 +1026,14 @@ paths:
|
||||
in: query
|
||||
name: timeout
|
||||
type: string
|
||||
- description: Specify whether the attachments of the received message should be ignored
|
||||
in: query
|
||||
name: ignore_attachments
|
||||
type: string
|
||||
- description: Specify whether stories should be ignored when receiving messages
|
||||
in: query
|
||||
name: ignore_stories
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@@ -1041,8 +1069,7 @@ paths:
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"201":
|
||||
description: ""
|
||||
"201": {}
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
@@ -1089,8 +1116,7 @@ paths:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Check if one or more phone numbers are registered with the Signal
|
||||
Service.
|
||||
description: Check if one or more phone numbers are registered with the Signal Service.
|
||||
parameters:
|
||||
- collectionFormat: multi
|
||||
description: Numbers to check
|
||||
@@ -1208,9 +1234,7 @@ paths:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Disables push support for this device. **WARNING:** If *delete_account*
|
||||
is set to *true*, the account will be deleted from the Signal Server. This
|
||||
cannot be undone without loss.
|
||||
description: Disables push support for this device. **WARNING:** If *delete_account* is set to *true*, the account will be deleted from the Signal Server. This cannot be undone without loss.
|
||||
parameters:
|
||||
- description: Registered Phone Number
|
||||
in: path
|
||||
@@ -1225,8 +1249,7 @@ paths:
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"204":
|
||||
description: ""
|
||||
"204": {}
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
|
||||
Reference in New Issue
Block a user