Merge pull request #584 from derpferd/patch-1

Add missing groupid parameter
This commit is contained in:
Bernhard B.
2024-09-13 16:11:19 +02:00
committed by GitHub
4 changed files with 300 additions and 123 deletions

View File

@@ -686,6 +686,7 @@ func (a *Api) CreateGroup(c *gin.Context) {
// @Failure 400 {object} Error // @Failure 400 {object} Error
// @Param data body ChangeGroupMembersRequest true "Members" // @Param data body ChangeGroupMembersRequest true "Members"
// @Param number path string true "Registered Phone Number" // @Param number path string true "Registered Phone Number"
// @Param groupid path string true "Group ID"
// @Router /v1/groups/{number}/{groupid}/members [post] // @Router /v1/groups/{number}/{groupid}/members [post]
func (a *Api) AddMembersToGroup(c *gin.Context) { func (a *Api) AddMembersToGroup(c *gin.Context) {
number := c.Param("number") number := c.Param("number")
@@ -730,6 +731,7 @@ func (a *Api) AddMembersToGroup(c *gin.Context) {
// @Failure 400 {object} Error // @Failure 400 {object} Error
// @Param data body ChangeGroupMembersRequest true "Members" // @Param data body ChangeGroupMembersRequest true "Members"
// @Param number path string true "Registered Phone Number" // @Param number path string true "Registered Phone Number"
// @Param groupid path string true "Group ID"
// @Router /v1/groups/{number}/{groupid}/members [delete] // @Router /v1/groups/{number}/{groupid}/members [delete]
func (a *Api) RemoveMembersFromGroup(c *gin.Context) { func (a *Api) RemoveMembersFromGroup(c *gin.Context) {
number := c.Param("number") number := c.Param("number")
@@ -774,6 +776,7 @@ func (a *Api) RemoveMembersFromGroup(c *gin.Context) {
// @Failure 400 {object} Error // @Failure 400 {object} Error
// @Param data body ChangeGroupAdminsRequest true "Admins" // @Param data body ChangeGroupAdminsRequest true "Admins"
// @Param number path string true "Registered Phone Number" // @Param number path string true "Registered Phone Number"
// @Param groupid path string true "Group ID"
// @Router /v1/groups/{number}/{groupid}/admins [post] // @Router /v1/groups/{number}/{groupid}/admins [post]
func (a *Api) AddAdminsToGroup(c *gin.Context) { func (a *Api) AddAdminsToGroup(c *gin.Context) {
number := c.Param("number") number := c.Param("number")
@@ -818,6 +821,7 @@ func (a *Api) AddAdminsToGroup(c *gin.Context) {
// @Failure 400 {object} Error // @Failure 400 {object} Error
// @Param data body ChangeGroupAdminsRequest true "Admins" // @Param data body ChangeGroupAdminsRequest true "Admins"
// @Param number path string true "Registered Phone Number" // @Param number path string true "Registered Phone Number"
// @Param groupid path string true "Group ID"
// @Router /v1/groups/{number}/{groupid}/admins [delete] // @Router /v1/groups/{number}/{groupid}/admins [delete]
func (a *Api) RemoveAdminsFromGroup(c *gin.Context) { func (a *Api) RemoveAdminsFromGroup(c *gin.Context) {
number := c.Param("number") number := c.Param("number")

View File

@@ -1,25 +1,15 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // Code generated by swaggo/swag. DO NOT EDIT
// This file was generated by swaggo/swag
package docs package docs
import ( import "github.com/swaggo/swag"
"bytes"
"encoding/json"
"strings"
"github.com/alecthomas/template" const docTemplate = `{
"github.com/swaggo/swag"
)
var doc = `{
"schemes": {{ marshal .Schemes }}, "schemes": {{ marshal .Schemes }},
"swagger": "2.0", "swagger": "2.0",
"info": { "info": {
"description": "{{.Description}}", "description": "{{escape .Description}}",
"title": "{{.Title}}", "title": "{{.Title}}",
"contact": {}, "contact": {},
"license": {},
"version": "{{.Version}}" "version": "{{.Version}}"
}, },
"host": "{{.Host}}", "host": "{{.Host}}",
@@ -106,7 +96,9 @@ var doc = `{
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -148,7 +140,9 @@ var doc = `{
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -196,7 +190,9 @@ var doc = `{
"$ref": "#/definitions/client.SetUsernameResponse" "$ref": "#/definitions/client.SetUsernameResponse"
} }
}, },
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -227,7 +223,9 @@ var doc = `{
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -433,7 +431,9 @@ var doc = `{
} }
], ],
"responses": { "responses": {
"200": {}, "200": {
"description": "OK"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -473,7 +473,9 @@ var doc = `{
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -545,7 +547,9 @@ var doc = `{
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -578,7 +582,9 @@ var doc = `{
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -620,7 +626,9 @@ var doc = `{
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -885,6 +893,13 @@ var doc = `{
"name": "number", "name": "number",
"in": "path", "in": "path",
"required": true "required": true
},
{
"type": "string",
"description": "Group ID",
"name": "groupid",
"in": "path",
"required": true
} }
], ],
"responses": { "responses": {
@@ -930,6 +945,13 @@ var doc = `{
"name": "number", "name": "number",
"in": "path", "in": "path",
"required": true "required": true
},
{
"type": "string",
"description": "Group ID",
"name": "groupid",
"in": "path",
"required": true
} }
], ],
"responses": { "responses": {
@@ -1067,6 +1089,13 @@ var doc = `{
"name": "number", "name": "number",
"in": "path", "in": "path",
"required": true "required": true
},
{
"type": "string",
"description": "Group ID",
"name": "groupid",
"in": "path",
"required": true
} }
], ],
"responses": { "responses": {
@@ -1112,6 +1141,13 @@ var doc = `{
"name": "number", "name": "number",
"in": "path", "in": "path",
"required": true "required": true
},
{
"type": "string",
"description": "Group ID",
"name": "groupid",
"in": "path",
"required": true
} }
], ],
"responses": { "responses": {
@@ -1577,7 +1613,9 @@ var doc = `{
} }
], ],
"responses": { "responses": {
"201": {}, "201": {
"description": "Created"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -1764,7 +1802,9 @@ var doc = `{
} }
} }
}, },
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -1804,7 +1844,9 @@ var doc = `{
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -1937,7 +1979,9 @@ var doc = `{
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -2036,7 +2080,6 @@ var doc = `{
"type": "object", "type": "object",
"properties": { "properties": {
"logging": { "logging": {
"type": "object",
"$ref": "#/definitions/api.LoggingConfiguration" "$ref": "#/definitions/api.LoggingConfiguration"
} }
} }
@@ -2065,7 +2108,6 @@ var doc = `{
"type": "string" "type": "string"
}, },
"permissions": { "permissions": {
"type": "object",
"$ref": "#/definitions/api.GroupPermissions" "$ref": "#/definitions/api.GroupPermissions"
} }
} }
@@ -2250,7 +2292,10 @@ var doc = `{
"type": "integer" "type": "integer"
}, },
"mentions": { "mentions": {
"type": "string" "type": "array",
"items": {
"$ref": "#/definitions/data.MessageMention"
}
}, },
"message": { "message": {
"type": "string" "type": "string"
@@ -2265,7 +2310,10 @@ var doc = `{
"type": "string" "type": "string"
}, },
"quote_mentions": { "quote_mentions": {
"type": "string" "type": "array",
"items": {
"$ref": "#/definitions/data.MessageMention"
}
}, },
"quote_message": { "quote_message": {
"type": "string" "type": "string"
@@ -2559,6 +2607,20 @@ var doc = `{
"type": "string" "type": "string"
} }
} }
},
"data.MessageMention": {
"type": "object",
"properties": {
"author": {
"type": "string"
},
"length": {
"type": "integer"
},
"start": {
"type": "integer"
}
}
} }
}, },
"tags": [ "tags": [
@@ -2613,49 +2675,18 @@ var doc = `{
] ]
}` }`
type swaggerInfo struct {
Version string
Host string
BasePath string
Schemes []string
Title string
Description string
}
// SwaggerInfo holds exported Swagger Info so clients can modify it // SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = swaggerInfo{ var SwaggerInfo = &swag.Spec{
Version: "1.0", Version: "1.0",
Host: "", Host: "",
BasePath: "/", BasePath: "/",
Schemes: []string{}, Schemes: []string{},
Title: "Signal Cli REST API", Title: "Signal Cli REST API",
Description: "This is the Signal Cli REST API documentation.", Description: "This is the Signal Cli REST API documentation.",
} InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
type s struct{}
func (s *s) ReadDoc() string {
sInfo := SwaggerInfo
sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
t, err := template.New("swagger_info").Funcs(template.FuncMap{
"marshal": func(v interface{}) string {
a, _ := json.Marshal(v)
return string(a)
},
}).Parse(doc)
if err != nil {
return doc
}
var tpl bytes.Buffer
if err := t.Execute(&tpl, sInfo); err != nil {
return doc
}
return tpl.String()
} }
func init() { func init() {
swag.Register(swag.Name, &s{}) swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
} }

View File

@@ -4,7 +4,6 @@
"description": "This is the Signal Cli REST API documentation.", "description": "This is the Signal Cli REST API documentation.",
"title": "Signal Cli REST API", "title": "Signal Cli REST API",
"contact": {}, "contact": {},
"license": {},
"version": "1.0" "version": "1.0"
}, },
"basePath": "/", "basePath": "/",
@@ -90,7 +89,9 @@
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -132,7 +133,9 @@
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -180,7 +183,9 @@
"$ref": "#/definitions/client.SetUsernameResponse" "$ref": "#/definitions/client.SetUsernameResponse"
} }
}, },
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -211,7 +216,9 @@
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -417,7 +424,9 @@
} }
], ],
"responses": { "responses": {
"200": {}, "200": {
"description": "OK"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -457,7 +466,9 @@
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -529,7 +540,9 @@
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -562,7 +575,9 @@
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -604,7 +619,9 @@
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -869,6 +886,13 @@
"name": "number", "name": "number",
"in": "path", "in": "path",
"required": true "required": true
},
{
"type": "string",
"description": "Group ID",
"name": "groupid",
"in": "path",
"required": true
} }
], ],
"responses": { "responses": {
@@ -914,6 +938,13 @@
"name": "number", "name": "number",
"in": "path", "in": "path",
"required": true "required": true
},
{
"type": "string",
"description": "Group ID",
"name": "groupid",
"in": "path",
"required": true
} }
], ],
"responses": { "responses": {
@@ -1051,6 +1082,13 @@
"name": "number", "name": "number",
"in": "path", "in": "path",
"required": true "required": true
},
{
"type": "string",
"description": "Group ID",
"name": "groupid",
"in": "path",
"required": true
} }
], ],
"responses": { "responses": {
@@ -1096,6 +1134,13 @@
"name": "number", "name": "number",
"in": "path", "in": "path",
"required": true "required": true
},
{
"type": "string",
"description": "Group ID",
"name": "groupid",
"in": "path",
"required": true
} }
], ],
"responses": { "responses": {
@@ -1561,7 +1606,9 @@
} }
], ],
"responses": { "responses": {
"201": {}, "201": {
"description": "Created"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -1748,7 +1795,9 @@
} }
} }
}, },
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -1788,7 +1837,9 @@
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -1921,7 +1972,9 @@
} }
], ],
"responses": { "responses": {
"204": {}, "204": {
"description": "No Content"
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -2020,7 +2073,6 @@
"type": "object", "type": "object",
"properties": { "properties": {
"logging": { "logging": {
"type": "object",
"$ref": "#/definitions/api.LoggingConfiguration" "$ref": "#/definitions/api.LoggingConfiguration"
} }
} }
@@ -2049,7 +2101,6 @@
"type": "string" "type": "string"
}, },
"permissions": { "permissions": {
"type": "object",
"$ref": "#/definitions/api.GroupPermissions" "$ref": "#/definitions/api.GroupPermissions"
} }
} }
@@ -2234,7 +2285,10 @@
"type": "integer" "type": "integer"
}, },
"mentions": { "mentions": {
"type": "string" "type": "array",
"items": {
"$ref": "#/definitions/data.MessageMention"
}
}, },
"message": { "message": {
"type": "string" "type": "string"
@@ -2249,7 +2303,10 @@
"type": "string" "type": "string"
}, },
"quote_mentions": { "quote_mentions": {
"type": "string" "type": "array",
"items": {
"$ref": "#/definitions/data.MessageMention"
}
}, },
"quote_message": { "quote_message": {
"type": "string" "type": "string"
@@ -2543,6 +2600,20 @@
"type": "string" "type": "string"
} }
} }
},
"data.MessageMention": {
"type": "object",
"properties": {
"author": {
"type": "string"
},
"length": {
"type": "integer"
},
"start": {
"type": "integer"
}
}
} }
}, },
"tags": [ "tags": [

View File

@@ -32,7 +32,6 @@ definitions:
properties: properties:
logging: logging:
$ref: '#/definitions/api.LoggingConfiguration' $ref: '#/definitions/api.LoggingConfiguration'
type: object
type: object type: object
api.CreateGroupRequest: api.CreateGroupRequest:
properties: properties:
@@ -52,7 +51,6 @@ definitions:
type: string type: string
permissions: permissions:
$ref: '#/definitions/api.GroupPermissions' $ref: '#/definitions/api.GroupPermissions'
type: object
type: object type: object
api.CreateGroupResponse: api.CreateGroupResponse:
properties: properties:
@@ -147,7 +145,9 @@ definitions:
api.SendMessageV1: api.SendMessageV1:
properties: properties:
base64_attachment: 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 type: string
is_group: is_group:
type: boolean type: boolean
@@ -173,7 +173,9 @@ definitions:
edit_timestamp: edit_timestamp:
type: integer type: integer
mentions: mentions:
type: string items:
$ref: '#/definitions/data.MessageMention'
type: array
message: message:
type: string type: string
notify_self: notify_self:
@@ -183,7 +185,9 @@ definitions:
quote_author: quote_author:
type: string type: string
quote_mentions: quote_mentions:
type: string items:
$ref: '#/definitions/data.MessageMention'
type: array
quote_message: quote_message:
type: string type: string
quote_timestamp: quote_timestamp:
@@ -375,10 +379,18 @@ definitions:
username_link: username_link:
type: string type: string
type: object type: object
data.MessageMention:
properties:
author:
type: string
length:
type: integer
start:
type: integer
type: object
info: info:
contact: {} contact: {}
description: This is the Signal Cli REST API documentation. description: This is the Signal Cli REST API documentation.
license: {}
title: Signal Cli REST API title: Signal Cli REST API
version: "1.0" version: "1.0"
paths: paths:
@@ -418,7 +430,11 @@ paths:
post: post:
consumes: consumes:
- application/json - application/json
description: 'When running into rate limits, sometimes the limit can be lifted, by solving a CAPTCHA. To get the captcha token, go to https://signalcaptchas.org/challenge/generate.html For the staging environment, use: https://signalcaptchas.org/staging/registration/generate.html. The "challenge_token" is the token from the failed send attempt. The "captcha" is the captcha result, starting with signalcaptcha://' description: 'When running into rate limits, sometimes the limit can be lifted,
by solving a CAPTCHA. To get the captcha token, go to https://signalcaptchas.org/challenge/generate.html
For the staging environment, use: https://signalcaptchas.org/staging/registration/generate.html.
The "challenge_token" is the token from the failed send attempt. The "captcha"
is the captcha result, starting with signalcaptcha://'
parameters: parameters:
- description: Registered Phone Number - description: Registered Phone Number
in: path in: path
@@ -434,7 +450,8 @@ paths:
produces: produces:
- application/json - application/json
responses: responses:
"204": {} "204":
description: No Content
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
@@ -462,7 +479,8 @@ paths:
produces: produces:
- application/json - application/json
responses: responses:
"204": {} "204":
description: No Content
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
@@ -484,7 +502,8 @@ paths:
produces: produces:
- application/json - application/json
responses: responses:
"204": {} "204":
description: No Content
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
@@ -495,7 +514,10 @@ paths:
post: post:
consumes: consumes:
- application/json - application/json
description: Allows to set the username that should be used for this account. This can either be just the nickname (e.g. test) or the complete username with discriminator (e.g. test.123). Returns the new username with discriminator and the username link. description: Allows to set the username that should be used for this account.
This can either be just the nickname (e.g. test) or the complete username
with discriminator (e.g. test.123). Returns the new username with discriminator
and the username link.
parameters: parameters:
- description: Registered Phone Number - description: Registered Phone Number
in: path in: path
@@ -515,7 +537,8 @@ paths:
description: Created description: Created
schema: schema:
$ref: '#/definitions/client.SetUsernameResponse' $ref: '#/definitions/client.SetUsernameResponse'
"204": {} "204":
description: No Content
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
@@ -651,7 +674,8 @@ paths:
produces: produces:
- application/json - application/json
responses: responses:
"200": {} "200":
description: OK
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
@@ -678,7 +702,8 @@ paths:
produces: produces:
- application/json - application/json
responses: responses:
"204": {} "204":
description: No Content
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
@@ -726,19 +751,23 @@ paths:
produces: produces:
- application/json - application/json
responses: responses:
"204": {} "204":
description: No Content
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: '#/definitions/api.Error' $ref: '#/definitions/api.Error'
summary: Updates the info associated to a number on the contact list. If the contact doesnt exist yet, it will be added. summary: Updates the info associated to a number on the contact list. If the
contact doesnt exist yet, it will be added.
tags: tags:
- Contacts - Contacts
/v1/contacts/{number}/sync: /v1/contacts/{number}/sync:
post: post:
consumes: consumes:
- application/json - application/json
description: Send a synchronization message with the local contacts list to all linked devices. This command should only be used if this is the primary device. description: Send a synchronization message with the local contacts list to
all linked devices. This command should only be used if this is the primary
device.
parameters: parameters:
- description: Registered Phone Number - description: Registered Phone Number
in: path in: path
@@ -748,19 +777,22 @@ paths:
produces: produces:
- application/json - application/json
responses: responses:
"204": {} "204":
description: No Content
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: '#/definitions/api.Error' $ref: '#/definitions/api.Error'
summary: Send a synchronization message with the local contacts list to all linked devices. summary: Send a synchronization message with the local contacts list to all
linked devices.
tags: tags:
- Contacts - Contacts
/v1/devices/{number}: /v1/devices/{number}:
post: post:
consumes: consumes:
- application/json - 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: parameters:
- description: Registered Phone Number - description: Registered Phone Number
in: path in: path
@@ -776,7 +808,8 @@ paths:
produces: produces:
- application/json - application/json
responses: responses:
"204": {} "204":
description: No Content
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
@@ -952,6 +985,11 @@ paths:
name: number name: number
required: true required: true
type: string type: string
- description: Group ID
in: path
name: groupid
required: true
type: string
produces: produces:
- application/json - application/json
responses: responses:
@@ -982,6 +1020,11 @@ paths:
name: number name: number
required: true required: true
type: string type: string
- description: Group ID
in: path
name: groupid
required: true
type: string
produces: produces:
- application/json - application/json
responses: responses:
@@ -1073,6 +1116,11 @@ paths:
name: number name: number
required: true required: true
type: string type: string
- description: Group ID
in: path
name: groupid
required: true
type: string
produces: produces:
- application/json - application/json
responses: responses:
@@ -1103,6 +1151,11 @@ paths:
name: number name: number
required: true required: true
type: string type: string
- description: Group ID
in: path
name: groupid
required: true
type: string
produces: produces:
- application/json - application/json
responses: responses:
@@ -1183,7 +1236,8 @@ paths:
- Identities - Identities
/v1/identities/{number}/trust/{numberToTrust}: /v1/identities/{number}/trust/{numberToTrust}:
put: 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: parameters:
- description: Input Data - description: Input Data
in: body in: body
@@ -1348,7 +1402,9 @@ paths:
get: get:
consumes: consumes:
- application/json - 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: parameters:
- description: Registered Phone Number - description: Registered Phone Number
in: path in: path
@@ -1359,7 +1415,8 @@ paths:
in: query in: query
name: timeout name: timeout
type: string type: string
- description: Specify whether the attachments of the received message should be ignored - description: Specify whether the attachments of the received message should
be ignored
in: query in: query
name: ignore_attachments name: ignore_attachments
type: string type: string
@@ -1367,7 +1424,8 @@ paths:
in: query in: query
name: ignore_stories name: ignore_stories
type: string type: string
- description: 'Specify the maximum number of messages to receive (default: unlimited)' - description: 'Specify the maximum number of messages to receive (default:
unlimited)'
in: query in: query
name: max_messages name: max_messages
type: string type: string
@@ -1410,7 +1468,8 @@ paths:
produces: produces:
- application/json - application/json
responses: responses:
"201": {} "201":
description: Created
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
@@ -1457,7 +1516,8 @@ paths:
get: get:
consumes: consumes:
- application/json - 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: parameters:
- description: Registered Phone Number - description: Registered Phone Number
in: path in: path
@@ -1534,7 +1594,8 @@ paths:
items: items:
$ref: '#/definitions/client.ListInstalledStickerPacksResponse' $ref: '#/definitions/client.ListInstalledStickerPacksResponse'
type: array type: array
"204": {} "204":
description: No Content
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
@@ -1545,7 +1606,11 @@ paths:
post: post:
consumes: consumes:
- application/json - application/json
description: 'In order to add a sticker pack, browse to https://signalstickers.org/ and select the sticker pack you want to add. Then, press the "Add to Signal" button. If you look at the address bar in your browser you should see an URL in this format: https://signal.art/addstickers/#pack_id=XXX&pack_key=YYY, where XXX is the pack_id and YYY is the pack_key.' description: 'In order to add a sticker pack, browse to https://signalstickers.org/
and select the sticker pack you want to add. Then, press the "Add to Signal"
button. If you look at the address bar in your browser you should see an URL
in this format: https://signal.art/addstickers/#pack_id=XXX&pack_key=YYY,
where XXX is the pack_id and YYY is the pack_key.'
parameters: parameters:
- description: Registered Phone Number - description: Registered Phone Number
in: path in: path
@@ -1561,7 +1626,8 @@ paths:
produces: produces:
- application/json - application/json
responses: responses:
"204": {} "204":
description: No Content
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
@@ -1634,7 +1700,9 @@ paths:
post: post:
consumes: consumes:
- application/json - 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: parameters:
- description: Registered Phone Number - description: Registered Phone Number
in: path in: path
@@ -1649,7 +1717,8 @@ paths:
produces: produces:
- application/json - application/json
responses: responses:
"204": {} "204":
description: No Content
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
@@ -1661,7 +1730,9 @@ paths:
post: post:
consumes: consumes:
- application/json - application/json
description: 'Send a signal message. Set the text_mode to ''styled'' in case you want to add formatting to your text message. Styling Options: *italic text*, **bold text**, ~strikethrough text~.' description: 'Send a signal message. Set the text_mode to ''styled'' in case
you want to add formatting to your text message. Styling Options: *italic
text*, **bold text**, ~strikethrough text~.'
parameters: parameters:
- description: Input Data - description: Input Data
in: body in: body