From 95e0b886719d1a04c58b19a530416a32afea15f6 Mon Sep 17 00:00:00 2001 From: Bernhard B Date: Sat, 11 May 2024 17:24:34 +0200 Subject: [PATCH] rebuilt swagger documentation --- src/docs/docs.go | 62 +++++++++++++++++++++++++++++++++++++++++++ src/docs/swagger.json | 62 +++++++++++++++++++++++++++++++++++++++++++ src/docs/swagger.yaml | 40 ++++++++++++++++++++++++++++ 3 files changed, 164 insertions(+) diff --git a/src/docs/docs.go b/src/docs/docs.go index 58a28ba..d39bef5 100644 --- a/src/docs/docs.go +++ b/src/docs/docs.go @@ -1405,6 +1405,46 @@ var doc = `{ } } }, + "/v1/receipts/{number}": { + "post": { + "description": "Send a read or viewed receipt", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Receipts" + ], + "summary": "Send a receipt.", + "parameters": [ + { + "description": "Receipt", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/api.Receipt" + } + } + ], + "responses": { + "204": { + "description": "No Content", + "schema": { + "type": "string" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/api.Error" + } + } + } + } + }, "/v1/receive/{number}": { "get": { "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.", @@ -2073,6 +2113,24 @@ var doc = `{ } } }, + "api.Receipt": { + "type": "object", + "properties": { + "receipt_type": { + "type": "string", + "enum": [ + "read", + "viewed" + ] + }, + "recipient": { + "type": "string" + }, + "timestamp": { + "type": "integer" + } + } + }, "api.RegisterNumberRequest": { "type": "object", "properties": { @@ -2495,6 +2553,10 @@ var doc = `{ "description": "React to messages.", "name": "Reactions" }, + { + "description": "Send receipts for messages.", + "name": "Receipts" + }, { "description": "Search the Signal Service.", "name": "Search" diff --git a/src/docs/swagger.json b/src/docs/swagger.json index f8f7a79..00287fd 100644 --- a/src/docs/swagger.json +++ b/src/docs/swagger.json @@ -1389,6 +1389,46 @@ } } }, + "/v1/receipts/{number}": { + "post": { + "description": "Send a read or viewed receipt", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Receipts" + ], + "summary": "Send a receipt.", + "parameters": [ + { + "description": "Receipt", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/api.Receipt" + } + } + ], + "responses": { + "204": { + "description": "No Content", + "schema": { + "type": "string" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/api.Error" + } + } + } + } + }, "/v1/receive/{number}": { "get": { "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.", @@ -2057,6 +2097,24 @@ } } }, + "api.Receipt": { + "type": "object", + "properties": { + "receipt_type": { + "type": "string", + "enum": [ + "read", + "viewed" + ] + }, + "recipient": { + "type": "string" + }, + "timestamp": { + "type": "integer" + } + } + }, "api.RegisterNumberRequest": { "type": "object", "properties": { @@ -2479,6 +2537,10 @@ "description": "React to messages.", "name": "Reactions" }, + { + "description": "Send receipts for messages.", + "name": "Receipts" + }, { "description": "Search the Signal Service.", "name": "Search" diff --git a/src/docs/swagger.yaml b/src/docs/swagger.yaml index c9ddf2b..97c77b5 100644 --- a/src/docs/swagger.yaml +++ b/src/docs/swagger.yaml @@ -102,6 +102,18 @@ definitions: timestamp: type: integer type: object + api.Receipt: + properties: + receipt_type: + enum: + - read + - viewed + type: string + recipient: + type: string + timestamp: + type: integer + type: object api.RegisterNumberRequest: properties: captcha: @@ -1276,6 +1288,32 @@ paths: summary: Send a reaction. tags: - Reactions + /v1/receipts/{number}: + post: + consumes: + - application/json + description: Send a read or viewed receipt + parameters: + - description: Receipt + in: body + name: data + required: true + schema: + $ref: '#/definitions/api.Receipt' + produces: + - application/json + responses: + "204": + description: No Content + schema: + type: string + "400": + description: Bad Request + schema: + $ref: '#/definitions/api.Error' + summary: Send a receipt. + tags: + - Receipts /v1/receive/{number}: get: consumes: @@ -1635,6 +1673,8 @@ tags: name: Identities - description: React to messages. name: Reactions +- description: Send receipts for messages. + name: Receipts - description: Search the Signal Service. name: Search - description: List and Install Sticker Packs