mirror of
https://github.com/aljazceru/signal-cli-rest-api.git
synced 2026-01-01 22:14:48 +01:00
109
src/docs/docs.go
109
src/docs/docs.go
@@ -284,6 +284,83 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/identities/{number}": {
|
||||
"get": {
|
||||
"description": "List all identities for the given number.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Identities"
|
||||
],
|
||||
"summary": "List Identities",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Registered Phone Number",
|
||||
"name": "number",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/api.IdentityEntry"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/identities/{number}/{numberToTrust}": {
|
||||
"put": {
|
||||
"description": "Trust an identity.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Identities"
|
||||
],
|
||||
"summary": "Trust Identity",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Input Data",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/api.TrustIdentityRequest"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Registered Phone Number",
|
||||
"name": "number",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Number To Trust",
|
||||
"name": "numberToTrust",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "No Content",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/profiles/{number}": {
|
||||
"put": {
|
||||
"description": "Set your name and optional an avatar.",
|
||||
@@ -627,6 +704,26 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.IdentityEntry": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"added": {
|
||||
"type": "string"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "string"
|
||||
},
|
||||
"safety_number": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.SendMessageV1": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -673,6 +770,14 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.TrustIdentityRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"verified_safety_number": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.UpdateProfileRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -717,6 +822,10 @@ var doc = `{
|
||||
{
|
||||
"description": "Update Profile.",
|
||||
"name": "Profiles"
|
||||
},
|
||||
{
|
||||
"description": "List and Trust Identities.",
|
||||
"name": "Identities"
|
||||
}
|
||||
]
|
||||
}`
|
||||
|
||||
@@ -269,6 +269,83 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/identities/{number}": {
|
||||
"get": {
|
||||
"description": "List all identities for the given number.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Identities"
|
||||
],
|
||||
"summary": "List Identities",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Registered Phone Number",
|
||||
"name": "number",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/api.IdentityEntry"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/identities/{number}/{numberToTrust}": {
|
||||
"put": {
|
||||
"description": "Trust an identity.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Identities"
|
||||
],
|
||||
"summary": "Trust Identity",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Input Data",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/api.TrustIdentityRequest"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Registered Phone Number",
|
||||
"name": "number",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Number To Trust",
|
||||
"name": "numberToTrust",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "No Content",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/profiles/{number}": {
|
||||
"put": {
|
||||
"description": "Set your name and optional an avatar.",
|
||||
@@ -612,6 +689,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.IdentityEntry": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"added": {
|
||||
"type": "string"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "string"
|
||||
},
|
||||
"safety_number": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.SendMessageV1": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -658,6 +755,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.TrustIdentityRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"verified_safety_number": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.UpdateProfileRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -702,6 +807,10 @@
|
||||
{
|
||||
"description": "Update Profile.",
|
||||
"name": "Profiles"
|
||||
},
|
||||
{
|
||||
"description": "List and Trust Identities.",
|
||||
"name": "Identities"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -36,6 +36,19 @@ definitions:
|
||||
name:
|
||||
type: string
|
||||
type: object
|
||||
api.IdentityEntry:
|
||||
properties:
|
||||
added:
|
||||
type: string
|
||||
fingerprint:
|
||||
type: string
|
||||
number:
|
||||
type: string
|
||||
safety_number:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
type: object
|
||||
api.SendMessageV1:
|
||||
properties:
|
||||
base64_attachment:
|
||||
@@ -66,6 +79,11 @@ definitions:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
api.TrustIdentityRequest:
|
||||
properties:
|
||||
verified_safety_number:
|
||||
type: string
|
||||
type: object
|
||||
api.UpdateProfileRequest:
|
||||
properties:
|
||||
base64_avatar:
|
||||
@@ -257,6 +275,57 @@ paths:
|
||||
summary: API Health Check
|
||||
tags:
|
||||
- General
|
||||
/v1/identities/{number}:
|
||||
get:
|
||||
description: List all identities for the given number.
|
||||
parameters:
|
||||
- description: Registered Phone Number
|
||||
in: path
|
||||
name: number
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/api.IdentityEntry'
|
||||
type: array
|
||||
summary: List Identities
|
||||
tags:
|
||||
- Identities
|
||||
/v1/identities/{number}/{numberToTrust}:
|
||||
put:
|
||||
description: Trust an identity.
|
||||
parameters:
|
||||
- description: Input Data
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/api.TrustIdentityRequest'
|
||||
- description: Registered Phone Number
|
||||
in: path
|
||||
name: number
|
||||
required: true
|
||||
type: string
|
||||
- description: Number To Trust
|
||||
in: path
|
||||
name: numberToTrust
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"204":
|
||||
description: No Content
|
||||
schema:
|
||||
type: string
|
||||
summary: Trust Identity
|
||||
tags:
|
||||
- Identities
|
||||
/v1/profiles/{number}:
|
||||
put:
|
||||
description: Set your name and optional an avatar.
|
||||
@@ -459,3 +528,5 @@ tags:
|
||||
name: Attachments
|
||||
- description: Update Profile.
|
||||
name: Profiles
|
||||
- description: List and Trust Identities.
|
||||
name: Identities
|
||||
|
||||
Reference in New Issue
Block a user