199 lines
4.3 KiB
JSON
199 lines
4.3 KiB
JSON
{
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"schemes": [
|
|
"https"
|
|
],
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "JNX Telegram Bot Manager API Documentation.",
|
|
"version": "1.0.0"
|
|
},
|
|
"host": "jannex",
|
|
"basePath": "/v1",
|
|
"paths": {
|
|
"/v1/notification": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"notification"
|
|
],
|
|
"summary": "Send notification to users",
|
|
"operationId": "sendNotification",
|
|
"parameters": [
|
|
{
|
|
"description": "Notification body",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/NotificationBody"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"description": "Bad request"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/status/{userId}": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"status"
|
|
],
|
|
"summary": "Check if user is verified",
|
|
"operationId": "userVerified",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "User ID",
|
|
"name": "userId",
|
|
"in": "params",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/StatusResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/verifycode/{userId}": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"verifycode"
|
|
],
|
|
"summary": "Get verify code for user",
|
|
"operationId": "getVerifyCode",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "User ID",
|
|
"name": "userId",
|
|
"in": "params",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/VerifyCodeResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request"
|
|
},
|
|
"500": {
|
|
"description": "Internal server error"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"verifycode"
|
|
],
|
|
"summary": "Delete verified user",
|
|
"operationId": "deleteVerifiedUser",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "User ID",
|
|
"name": "userId",
|
|
"in": "params",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"description": "Bad request"
|
|
},
|
|
"500": {
|
|
"description": "Internal server error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"NotificationBody": {
|
|
"type": "object",
|
|
"properties": {
|
|
"Message": {
|
|
"type": "string"
|
|
},
|
|
"Type": {
|
|
"type": "integer",
|
|
"format": "uint8"
|
|
},
|
|
"UserIds": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"x-go-package": "jannex/telegram-bot-manager/modules/structs"
|
|
},
|
|
"StatusResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"Status": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"x-go-package": "jannex/telegram-bot-manager/modules/structs"
|
|
},
|
|
"VerifyCodeResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"Code": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"x-go-package": "jannex/telegram-bot-manager/modules/structs"
|
|
}
|
|
}
|
|
} |