2023-04-24 14:50:13 +00:00
|
|
|
|
openapi: 3.0.0
|
|
|
|
|
servers:
|
|
|
|
|
- url: http://localhost:8000/support
|
|
|
|
|
info:
|
|
|
|
|
description: ''
|
|
|
|
|
version: 1.0.0
|
|
|
|
|
title: Heruvym
|
|
|
|
|
paths:
|
|
|
|
|
/create:
|
|
|
|
|
post:
|
|
|
|
|
summary: Метод для создания тикета
|
|
|
|
|
security:
|
|
|
|
|
- bearer_in_cookie: []
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Default response
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
Ticket:
|
|
|
|
|
type: string
|
|
|
|
|
example: c2fekjcobibtq7akknog
|
|
|
|
|
Sess:
|
|
|
|
|
type: string
|
|
|
|
|
example: fasdjklj2lz
|
|
|
|
|
'400':
|
|
|
|
|
$ref: "#/components/responses/BadRequest"
|
|
|
|
|
'401':
|
|
|
|
|
$ref: "#/components/responses/Unauthorized"
|
|
|
|
|
'500':
|
|
|
|
|
$ref: "#/components/responses/ErrorOccurred"
|
|
|
|
|
requestBody:
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- Title
|
|
|
|
|
- Message
|
|
|
|
|
properties:
|
|
|
|
|
Title:
|
|
|
|
|
type: string
|
|
|
|
|
example: test ticket title
|
|
|
|
|
Message:
|
|
|
|
|
type: string
|
|
|
|
|
example: test ticket message
|
2024-12-09 11:06:04 +00:00
|
|
|
|
System:
|
|
|
|
|
type: boolean
|
2023-04-24 14:50:13 +00:00
|
|
|
|
/subscribe:
|
|
|
|
|
get:
|
|
|
|
|
summary: SSE метод для подписывания на изменения по всем тикетам доступным пользователю
|
|
|
|
|
security:
|
|
|
|
|
- bearer_in_query: []
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Default response
|
|
|
|
|
headers:
|
|
|
|
|
Content-Type:
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
example: "text/event-stream"
|
|
|
|
|
enum:
|
|
|
|
|
- "text/event-stream"
|
|
|
|
|
Cache-Control:
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
example: "no-cache"
|
|
|
|
|
enum:
|
|
|
|
|
- "no-cache"
|
|
|
|
|
Connection:
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
example: "keep-alive"
|
|
|
|
|
enum:
|
|
|
|
|
- "keep-alive"
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: "#/components/schemas/Ticket"
|
|
|
|
|
'400':
|
|
|
|
|
$ref: "#/components/responses/BadRequest"
|
|
|
|
|
'401':
|
|
|
|
|
$ref: "#/components/responses/Unauthorized"
|
|
|
|
|
'424':
|
|
|
|
|
$ref: "#/components/responses/FailedDependency"
|
|
|
|
|
/ticket:
|
|
|
|
|
get:
|
|
|
|
|
summary: SSE метод для подписки на сообщения из одного тикета
|
|
|
|
|
security:
|
|
|
|
|
- bearer_in_query: []
|
2023-05-16 09:35:07 +00:00
|
|
|
|
parameters:
|
|
|
|
|
- in: query
|
|
|
|
|
name: "ticket"
|
|
|
|
|
example: "dfajrkletj234poijnmflzxcwerasdkjcmpl"
|
2023-04-24 14:50:13 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Default response
|
|
|
|
|
headers:
|
|
|
|
|
Content-Type:
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
example: "text/event-stream"
|
|
|
|
|
enum:
|
|
|
|
|
- "text/event-stream"
|
|
|
|
|
Cache-Control:
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
example: "no-cache"
|
|
|
|
|
enum:
|
|
|
|
|
- "no-cache"
|
|
|
|
|
Connection:
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
example: "keep-alive"
|
|
|
|
|
enum:
|
|
|
|
|
- "keep-alive"
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/Message'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: "#/components/responses/BadRequest"
|
|
|
|
|
'401':
|
|
|
|
|
$ref: "#/components/responses/Unauthorized"
|
|
|
|
|
'424':
|
|
|
|
|
$ref: "#/components/responses/FailedDependency"
|
|
|
|
|
/send:
|
|
|
|
|
post:
|
|
|
|
|
summary: Метод для отправки сообщения в тикет
|
|
|
|
|
security:
|
|
|
|
|
- bearer_in_cookie: []
|
|
|
|
|
requestBody:
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- message
|
|
|
|
|
- TicketID
|
|
|
|
|
- lang
|
|
|
|
|
properties:
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example: "test ticket message"
|
|
|
|
|
TicketID:
|
|
|
|
|
type: string
|
|
|
|
|
example: "c2fekjcobibtq7akknog"
|
|
|
|
|
lang:
|
|
|
|
|
type: string
|
|
|
|
|
example: "ru"
|
|
|
|
|
files:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
type: string
|
|
|
|
|
example: "idoffile"
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Default response
|
|
|
|
|
'400':
|
|
|
|
|
$ref: "#/components/responses/BadRequest"
|
|
|
|
|
'401':
|
|
|
|
|
$ref: "#/components/responses/Unauthorized"
|
|
|
|
|
'500':
|
|
|
|
|
$ref: "#/components/responses/ErrorOccurred"
|
2023-05-16 09:35:07 +00:00
|
|
|
|
/requestScreensot:
|
|
|
|
|
post:
|
|
|
|
|
summary: Метод для реквеста скриншота
|
|
|
|
|
security:
|
|
|
|
|
- bearer_in_cookie: []
|
|
|
|
|
requestBody:
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- TicketID
|
|
|
|
|
- Lang
|
|
|
|
|
properties:
|
|
|
|
|
ticket:
|
|
|
|
|
type: string
|
|
|
|
|
example: "c2fekjcobibtq7akknog"
|
|
|
|
|
lang:
|
|
|
|
|
type: string
|
|
|
|
|
example: "ru"
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Default response
|
|
|
|
|
'400':
|
|
|
|
|
$ref: "#/components/responses/BadRequest"
|
|
|
|
|
'401':
|
|
|
|
|
$ref: "#/components/responses/Unauthorized"
|
|
|
|
|
'500':
|
|
|
|
|
$ref: "#/components/responses/ErrorOccurred"
|
|
|
|
|
/sendFiles:
|
|
|
|
|
post:
|
|
|
|
|
summary: Метод для отправки файлов
|
|
|
|
|
security:
|
|
|
|
|
- bearer_in_cookie: [ ]
|
|
|
|
|
requestBody:
|
|
|
|
|
content:
|
|
|
|
|
multipart/form-data:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
fileName:
|
|
|
|
|
type: string
|
|
|
|
|
format: binary
|
|
|
|
|
ticket:
|
|
|
|
|
type: string
|
|
|
|
|
example: "4145mgfioasdfgt9845"
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Default response
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example: "4518u035u13fjopq0"
|
2024-02-22 15:26:34 +00:00
|
|
|
|
'208':
|
|
|
|
|
$ref: "#/components/responses/AlreadyReported"
|
2023-05-16 09:35:07 +00:00
|
|
|
|
'400':
|
|
|
|
|
$ref: "#/components/responses/BadRequest"
|
|
|
|
|
'401':
|
|
|
|
|
$ref: "#/components/responses/Unauthorized"
|
2024-02-21 15:11:54 +00:00
|
|
|
|
'413':
|
2024-02-21 15:14:09 +00:00
|
|
|
|
$ref: "#/components/responses/RequestEntityTooLarge"
|
2024-02-21 18:07:40 +00:00
|
|
|
|
'406':
|
|
|
|
|
$ref: '#/components/responses/NotAcceptable'
|
|
|
|
|
'429':
|
|
|
|
|
$ref: '#/components/responses/TooManyRequests'
|
2023-05-16 09:35:07 +00:00
|
|
|
|
'500':
|
|
|
|
|
$ref: "#/components/responses/ErrorOccurred"
|
|
|
|
|
/sendSC:
|
|
|
|
|
post:
|
|
|
|
|
summary: Метод для отправки файлов SC
|
|
|
|
|
security:
|
|
|
|
|
- bearer_in_cookie: [ ]
|
|
|
|
|
requestBody:
|
|
|
|
|
content:
|
|
|
|
|
multipart/form-data:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
fileName:
|
|
|
|
|
type: string
|
|
|
|
|
format: binary
|
|
|
|
|
ticket:
|
|
|
|
|
type: string
|
|
|
|
|
example: "4145mgfioasdfgt9845"
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Default response
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example: "4518u035u13fjopq0"
|
|
|
|
|
'400':
|
|
|
|
|
$ref: "#/components/responses/BadRequest"
|
|
|
|
|
'401':
|
|
|
|
|
$ref: "#/components/responses/Unauthorized"
|
|
|
|
|
'500':
|
|
|
|
|
$ref: "#/components/responses/ErrorOccurred"
|
2023-04-24 14:50:13 +00:00
|
|
|
|
/getTickets:
|
|
|
|
|
post:
|
|
|
|
|
summary: Метод для получения тикетов с пагинацией
|
|
|
|
|
security:
|
|
|
|
|
- bearer_in_cookie: []
|
|
|
|
|
requestBody:
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
amt:
|
|
|
|
|
type: integer
|
|
|
|
|
example: 10
|
|
|
|
|
description: Количество тикетов на странице
|
|
|
|
|
page:
|
|
|
|
|
type: integer
|
|
|
|
|
example: 1
|
|
|
|
|
description: Страница
|
|
|
|
|
srch:
|
|
|
|
|
type: string
|
|
|
|
|
example: "test"
|
|
|
|
|
description: Поисковый запрос
|
|
|
|
|
status:
|
|
|
|
|
type: string
|
|
|
|
|
example: "open"
|
|
|
|
|
description: Статус тикета
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Default response
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
Data:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
$ref: "#/components/schemas/Ticket"
|
|
|
|
|
Count:
|
|
|
|
|
type: integer
|
|
|
|
|
example: 10
|
|
|
|
|
description: Количество найденных тикетов по поисковому запросу
|
|
|
|
|
'204':
|
|
|
|
|
description: No content
|
|
|
|
|
'400':
|
|
|
|
|
$ref: "#/components/responses/BadRequest"
|
|
|
|
|
'401':
|
|
|
|
|
$ref: "#/components/responses/Unauthorized"
|
|
|
|
|
'500':
|
|
|
|
|
$ref: "#/components/responses/ErrorOccurred"
|
|
|
|
|
/getMessages:
|
|
|
|
|
post:
|
|
|
|
|
summary: Метод для получения сообщений тикета с пагинацией
|
|
|
|
|
security:
|
|
|
|
|
- bearer_in_cookie: [ ]
|
|
|
|
|
requestBody:
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
amt:
|
|
|
|
|
type: integer
|
|
|
|
|
example: 10
|
|
|
|
|
page:
|
|
|
|
|
type: integer
|
|
|
|
|
example: 1
|
|
|
|
|
srch:
|
|
|
|
|
type: string
|
|
|
|
|
example: "test"
|
|
|
|
|
ticket:
|
|
|
|
|
type: string
|
|
|
|
|
example: "c2fekjcobibtq7akknog"
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Default response
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
$ref: "#/components/schemas/Message"
|
|
|
|
|
'204':
|
|
|
|
|
description: No content
|
|
|
|
|
'400':
|
|
|
|
|
$ref: "#/components/responses/BadRequest"
|
|
|
|
|
'401':
|
|
|
|
|
$ref: "#/components/responses/Unauthorized"
|
|
|
|
|
/pick:
|
|
|
|
|
post:
|
|
|
|
|
summary: Подхватывание сотрудником диалога
|
|
|
|
|
security:
|
|
|
|
|
- bearer_in_cookie: []
|
|
|
|
|
requestBody:
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
ticket:
|
|
|
|
|
type: string
|
|
|
|
|
example: "c2fekjcobibtq7akknog"
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Default response
|
|
|
|
|
'400':
|
|
|
|
|
$ref: "#/components/responses/BadRequest"
|
|
|
|
|
'401':
|
|
|
|
|
$ref: "#/components/responses/Unauthorized"
|
|
|
|
|
/delegate:
|
|
|
|
|
post:
|
|
|
|
|
summary: Передача тикета другому сотруднику
|
|
|
|
|
security:
|
|
|
|
|
- bearer_in_cookie: []
|
|
|
|
|
requestBody:
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
ticket:
|
|
|
|
|
type: string
|
|
|
|
|
example: "c2fekjcobibtq7akknog"
|
|
|
|
|
answerer:
|
|
|
|
|
type: string
|
|
|
|
|
example: "c2fekjcobibtq7akknog"
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Default response
|
|
|
|
|
'400':
|
|
|
|
|
$ref: "#/components/responses/BadRequest"
|
|
|
|
|
'401':
|
|
|
|
|
$ref: "#/components/responses/Unauthorized"
|
|
|
|
|
/vote:
|
|
|
|
|
post:
|
|
|
|
|
summary: Метод для оценки полезности ответа
|
|
|
|
|
security:
|
|
|
|
|
- bearer_in_cookie: []
|
|
|
|
|
requestBody:
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
ticket:
|
|
|
|
|
type: string
|
|
|
|
|
example: "c2fekjcobibtq7akknog"
|
|
|
|
|
rate:
|
|
|
|
|
type: string
|
|
|
|
|
example: "5"
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Default response
|
|
|
|
|
'400':
|
|
|
|
|
$ref: "#/components/responses/BadRequest"
|
|
|
|
|
'401':
|
|
|
|
|
$ref: "#/components/responses/Unauthorized"
|
|
|
|
|
/close:
|
|
|
|
|
post:
|
|
|
|
|
summary: Метод для закрытия тикета
|
|
|
|
|
security:
|
|
|
|
|
- bearer_in_cookie: [ ]
|
|
|
|
|
requestBody:
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
ticket:
|
|
|
|
|
type: string
|
|
|
|
|
example: "c2fekjcobibtq7akknog"
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Default response
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
Ticket:
|
|
|
|
|
type: string
|
|
|
|
|
example: c2fekjcobibtq7akknog
|
|
|
|
|
'400':
|
|
|
|
|
$ref: "#/components/responses/BadRequest"
|
|
|
|
|
'401':
|
|
|
|
|
$ref: "#/components/responses/Unauthorized"
|
2023-05-16 18:21:27 +00:00
|
|
|
|
/account/pagination:
|
|
|
|
|
get:
|
|
|
|
|
summary: Получение информации об аккаунтах
|
|
|
|
|
tags:
|
|
|
|
|
- account
|
|
|
|
|
description: Получение список аккаунтов с пагинацией из БД
|
|
|
|
|
parameters:
|
|
|
|
|
- schema:
|
|
|
|
|
type: number
|
|
|
|
|
in: query
|
|
|
|
|
name: page
|
|
|
|
|
required: false
|
|
|
|
|
description: номер страницы
|
|
|
|
|
- schema:
|
|
|
|
|
type: number
|
|
|
|
|
in: query
|
|
|
|
|
name: limit
|
|
|
|
|
required: false
|
|
|
|
|
description: Лимит количества аккаунтов (больше 100 не обрабатывается)
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Список аккаунтов
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
description: Список аккаунтов
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
accounts:
|
|
|
|
|
type: array
|
|
|
|
|
description: Массив аккаунтов
|
|
|
|
|
items:
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
_id:
|
|
|
|
|
type: string
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
|
|
|
|
nickname:
|
|
|
|
|
type: string
|
|
|
|
|
avatar:
|
|
|
|
|
type: string
|
|
|
|
|
role:
|
|
|
|
|
type: string
|
|
|
|
|
isDeleted:
|
|
|
|
|
type: boolean
|
|
|
|
|
createdAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
updatedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
deletedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
examples:
|
|
|
|
|
- _id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: false
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
- _id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: true
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2019-04-14T15:32:15Z'
|
|
|
|
|
deletedAt: '2021-08-17T13:23:44Z'
|
|
|
|
|
totalPages:
|
|
|
|
|
type: number
|
|
|
|
|
example:
|
|
|
|
|
totalPages: 10
|
|
|
|
|
accounts:
|
|
|
|
|
- _id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: false
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
- _id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: true
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2019-04-14T15:32:15Z'
|
|
|
|
|
deletedAt: '2021-08-17T13:23:44Z'
|
|
|
|
|
/account/{userId}:
|
|
|
|
|
get:
|
|
|
|
|
summary: Получение информации об аккаунте
|
|
|
|
|
tags:
|
|
|
|
|
- account
|
|
|
|
|
description: Получение аккаунта по ID
|
|
|
|
|
parameters:
|
|
|
|
|
- schema:
|
|
|
|
|
type: string
|
|
|
|
|
in: path
|
|
|
|
|
name: userId
|
|
|
|
|
required: true
|
|
|
|
|
description: ID пользователя
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
_id:
|
|
|
|
|
type: string
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
|
|
|
|
nickname:
|
|
|
|
|
type: string
|
|
|
|
|
avatar:
|
|
|
|
|
type: string
|
|
|
|
|
role:
|
|
|
|
|
type: string
|
|
|
|
|
isDeleted:
|
|
|
|
|
type: boolean
|
|
|
|
|
createdAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
updatedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
deletedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
examples:
|
|
|
|
|
example1:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: false
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
example2:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: true
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2019-04-14T15:32:15Z'
|
|
|
|
|
deletedAt: '2021-08-17T13:23:44Z'
|
|
|
|
|
'400':
|
|
|
|
|
description: Bad Request
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Bad Request
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 400
|
|
|
|
|
error: Bad Request
|
|
|
|
|
message: invalid user id
|
|
|
|
|
delete:
|
|
|
|
|
summary: Удаление аккаунта по ID
|
|
|
|
|
tags:
|
|
|
|
|
- account
|
|
|
|
|
description: Помечает аккаунт удалённым, но не удаляет его из БД
|
|
|
|
|
parameters:
|
|
|
|
|
- schema:
|
|
|
|
|
type: string
|
|
|
|
|
in: path
|
|
|
|
|
name: userId
|
|
|
|
|
required: true
|
|
|
|
|
description: ID пользователя
|
|
|
|
|
security:
|
|
|
|
|
- bearer: [ ]
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
_id:
|
|
|
|
|
type: string
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
|
|
|
|
nickname:
|
|
|
|
|
type: string
|
|
|
|
|
avatar:
|
|
|
|
|
type: string
|
|
|
|
|
role:
|
|
|
|
|
type: string
|
|
|
|
|
isDeleted:
|
|
|
|
|
type: boolean
|
|
|
|
|
createdAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
updatedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
deletedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
examples:
|
|
|
|
|
example1:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: false
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
example2:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: true
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2019-04-14T15:32:15Z'
|
|
|
|
|
deletedAt: '2021-08-17T13:23:44Z'
|
|
|
|
|
'400':
|
|
|
|
|
description: Bad Request
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Bad Request
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 400
|
|
|
|
|
error: Bad Request
|
|
|
|
|
message: invalid user id
|
|
|
|
|
'401':
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 401
|
|
|
|
|
error: Unauthorized
|
|
|
|
|
message: invalid token
|
|
|
|
|
'404':
|
|
|
|
|
description: Not Found
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Not Found
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 404
|
|
|
|
|
error: Not Found
|
|
|
|
|
message: user not found
|
|
|
|
|
/account/:
|
|
|
|
|
get:
|
|
|
|
|
summary: Получение информации об аккаунте
|
|
|
|
|
tags:
|
|
|
|
|
- account
|
|
|
|
|
description: Получение информации об аккаунте через токен доступа
|
|
|
|
|
security:
|
|
|
|
|
- bearer: [ ]
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
_id:
|
|
|
|
|
type: string
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
|
|
|
|
nickname:
|
|
|
|
|
type: string
|
|
|
|
|
avatar:
|
|
|
|
|
type: string
|
|
|
|
|
role:
|
|
|
|
|
type: string
|
|
|
|
|
isDeleted:
|
|
|
|
|
type: boolean
|
|
|
|
|
createdAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
updatedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
deletedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
examples:
|
|
|
|
|
example1:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: false
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
example2:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: true
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2019-04-14T15:32:15Z'
|
|
|
|
|
deletedAt: '2021-08-17T13:23:44Z'
|
|
|
|
|
'400':
|
|
|
|
|
description: Bad Request
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Bad Request
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 400
|
|
|
|
|
error: Bad Request
|
|
|
|
|
message: invalid user id
|
|
|
|
|
post:
|
|
|
|
|
summary: Создание аккаунта
|
|
|
|
|
tags:
|
|
|
|
|
- account
|
|
|
|
|
security:
|
|
|
|
|
- bearer: [ ]
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
_id:
|
|
|
|
|
type: string
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
|
|
|
|
nickname:
|
|
|
|
|
type: string
|
|
|
|
|
avatar:
|
|
|
|
|
type: string
|
|
|
|
|
role:
|
|
|
|
|
type: string
|
|
|
|
|
isDeleted:
|
|
|
|
|
type: boolean
|
|
|
|
|
createdAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
updatedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
deletedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
examples:
|
|
|
|
|
example1:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: false
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
example2:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: true
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2019-04-14T15:32:15Z'
|
|
|
|
|
deletedAt: '2021-08-17T13:23:44Z'
|
|
|
|
|
'400':
|
|
|
|
|
description: Bad Request
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Bad Request
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 400
|
|
|
|
|
error: Bad Request
|
|
|
|
|
message: invalid user id
|
|
|
|
|
'401':
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 401
|
|
|
|
|
error: Unauthorized
|
|
|
|
|
message: invalid token
|
|
|
|
|
'404':
|
|
|
|
|
description: Not Found
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Not Found
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 404
|
|
|
|
|
error: Not Found
|
|
|
|
|
message: user not found
|
|
|
|
|
'409':
|
|
|
|
|
description: Conflict
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Conflict
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 409
|
|
|
|
|
error: Conflict
|
|
|
|
|
message: account already exist
|
|
|
|
|
delete:
|
|
|
|
|
summary: Удаление аккаунта
|
|
|
|
|
tags:
|
|
|
|
|
- account
|
|
|
|
|
description: Помечает аккаунт удалённым, но не удаляет его из БД
|
|
|
|
|
security:
|
|
|
|
|
- bearer: [ ]
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
_id:
|
|
|
|
|
type: string
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
|
|
|
|
nickname:
|
|
|
|
|
type: string
|
|
|
|
|
avatar:
|
|
|
|
|
type: string
|
|
|
|
|
role:
|
|
|
|
|
type: string
|
|
|
|
|
isDeleted:
|
|
|
|
|
type: boolean
|
|
|
|
|
createdAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
updatedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
deletedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
examples:
|
|
|
|
|
example1:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: false
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
example2:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: true
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2019-04-14T15:32:15Z'
|
|
|
|
|
deletedAt: '2021-08-17T13:23:44Z'
|
|
|
|
|
'400':
|
|
|
|
|
description: Bad Request
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Bad Request
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 400
|
|
|
|
|
error: Bad Request
|
|
|
|
|
message: invalid user id
|
|
|
|
|
'401':
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 401
|
|
|
|
|
error: Unauthorized
|
|
|
|
|
message: invalid token
|
|
|
|
|
'404':
|
|
|
|
|
description: Not Found
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Not Found
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 404
|
|
|
|
|
error: Not Found
|
|
|
|
|
message: user not found
|
|
|
|
|
/account/restore:
|
|
|
|
|
post:
|
|
|
|
|
summary: Восстановление аккаунта
|
|
|
|
|
tags:
|
|
|
|
|
- account
|
|
|
|
|
description: Восстанавливает аккаунт, который не был удалён окончательно
|
|
|
|
|
security:
|
|
|
|
|
- bearer: [ ]
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
_id:
|
|
|
|
|
type: string
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
|
|
|
|
nickname:
|
|
|
|
|
type: string
|
|
|
|
|
avatar:
|
|
|
|
|
type: string
|
|
|
|
|
role:
|
|
|
|
|
type: string
|
|
|
|
|
isDeleted:
|
|
|
|
|
type: boolean
|
|
|
|
|
createdAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
updatedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
deletedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
examples:
|
|
|
|
|
example1:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: false
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
example2:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: true
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2019-04-14T15:32:15Z'
|
|
|
|
|
deletedAt: '2021-08-17T13:23:44Z'
|
|
|
|
|
'400':
|
|
|
|
|
description: Bad Request
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Bad Request
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 400
|
|
|
|
|
error: Bad Request
|
|
|
|
|
message: invalid user id
|
|
|
|
|
'401':
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 401
|
|
|
|
|
error: Unauthorized
|
|
|
|
|
message: invalid token
|
|
|
|
|
'404':
|
|
|
|
|
description: Not Found
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Not Found
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 404
|
|
|
|
|
error: Not Found
|
|
|
|
|
message: user not found
|
|
|
|
|
/account/role:
|
|
|
|
|
patch:
|
|
|
|
|
summary: Присвоение роли пользователя
|
|
|
|
|
tags:
|
|
|
|
|
- account
|
|
|
|
|
requestBody:
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- userId
|
|
|
|
|
- role
|
|
|
|
|
properties:
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
|
|
|
|
description: ID пользователя
|
|
|
|
|
role:
|
|
|
|
|
type: string
|
|
|
|
|
description: название роли
|
|
|
|
|
required: true
|
|
|
|
|
security:
|
|
|
|
|
- bearer: [ ]
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
_id:
|
|
|
|
|
type: string
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
|
|
|
|
nickname:
|
|
|
|
|
type: string
|
|
|
|
|
avatar:
|
|
|
|
|
type: string
|
|
|
|
|
role:
|
|
|
|
|
type: string
|
|
|
|
|
isDeleted:
|
|
|
|
|
type: boolean
|
|
|
|
|
createdAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
updatedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
deletedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
examples:
|
|
|
|
|
example1:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: false
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
example2:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: true
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2019-04-14T15:32:15Z'
|
|
|
|
|
deletedAt: '2021-08-17T13:23:44Z'
|
|
|
|
|
'400':
|
|
|
|
|
description: Bad Request
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Bad Request
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 400
|
|
|
|
|
error: Bad Request
|
|
|
|
|
message: invalid user id
|
|
|
|
|
'401':
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 401
|
|
|
|
|
error: Unauthorized
|
|
|
|
|
message: invalid token
|
|
|
|
|
'404':
|
|
|
|
|
description: Not Found
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Not Found
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 404
|
|
|
|
|
error: Not Found
|
|
|
|
|
message: user not found
|
|
|
|
|
/account/avatar:
|
|
|
|
|
patch:
|
|
|
|
|
summary: Присвоение аватарки пользователя
|
|
|
|
|
tags:
|
|
|
|
|
- account
|
|
|
|
|
requestBody:
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- userId
|
|
|
|
|
- avatar
|
|
|
|
|
properties:
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
|
|
|
|
description: ID пользователя
|
|
|
|
|
avatar:
|
|
|
|
|
type: string
|
|
|
|
|
description: путь до аватарки
|
|
|
|
|
required: true
|
|
|
|
|
security:
|
|
|
|
|
- bearer: [ ]
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
_id:
|
|
|
|
|
type: string
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
|
|
|
|
nickname:
|
|
|
|
|
type: string
|
|
|
|
|
avatar:
|
|
|
|
|
type: string
|
|
|
|
|
role:
|
|
|
|
|
type: string
|
|
|
|
|
isDeleted:
|
|
|
|
|
type: boolean
|
|
|
|
|
createdAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
updatedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
deletedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
examples:
|
|
|
|
|
example1:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: false
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
example2:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: true
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2019-04-14T15:32:15Z'
|
|
|
|
|
deletedAt: '2021-08-17T13:23:44Z'
|
|
|
|
|
'400':
|
|
|
|
|
description: Bad Request
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Bad Request
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 400
|
|
|
|
|
error: Bad Request
|
|
|
|
|
message: invalid user id
|
|
|
|
|
'401':
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 401
|
|
|
|
|
error: Unauthorized
|
|
|
|
|
message: invalid token
|
|
|
|
|
'404':
|
|
|
|
|
description: Not Found
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Not Found
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 404
|
|
|
|
|
error: Not Found
|
|
|
|
|
message: user not found
|
|
|
|
|
/account/nickname:
|
|
|
|
|
patch:
|
|
|
|
|
summary: Присвоение никнейма пользователя
|
|
|
|
|
tags:
|
|
|
|
|
- account
|
|
|
|
|
requestBody:
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- userId
|
|
|
|
|
- role
|
|
|
|
|
properties:
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
|
|
|
|
description: ID пользователя
|
|
|
|
|
nickname:
|
|
|
|
|
type: string
|
|
|
|
|
description: никнейм
|
|
|
|
|
required: true
|
|
|
|
|
security:
|
|
|
|
|
- bearer: [ ]
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
_id:
|
|
|
|
|
type: string
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
|
|
|
|
nickname:
|
|
|
|
|
type: string
|
|
|
|
|
avatar:
|
|
|
|
|
type: string
|
|
|
|
|
role:
|
|
|
|
|
type: string
|
|
|
|
|
isDeleted:
|
|
|
|
|
type: boolean
|
|
|
|
|
createdAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
updatedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
deletedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
examples:
|
|
|
|
|
example1:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: false
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
example2:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: true
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2019-04-14T15:32:15Z'
|
|
|
|
|
deletedAt: '2021-08-17T13:23:44Z'
|
|
|
|
|
'400':
|
|
|
|
|
description: Bad Request
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Bad Request
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 400
|
|
|
|
|
error: Bad Request
|
|
|
|
|
message: invalid user id
|
|
|
|
|
'401':
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 401
|
|
|
|
|
error: Unauthorized
|
|
|
|
|
message: invalid token
|
|
|
|
|
'404':
|
|
|
|
|
description: Not Found
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Not Found
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 404
|
|
|
|
|
error: Not Found
|
|
|
|
|
message: user not found
|
|
|
|
|
/account/delete:
|
|
|
|
|
delete:
|
|
|
|
|
summary: Удаление аккаунта
|
|
|
|
|
tags:
|
|
|
|
|
- account
|
|
|
|
|
description: Удаляет аккаунт из БД окончательно
|
|
|
|
|
security:
|
|
|
|
|
- bearer: [ ]
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
_id:
|
|
|
|
|
type: string
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
|
|
|
|
nickname:
|
|
|
|
|
type: string
|
|
|
|
|
avatar:
|
|
|
|
|
type: string
|
|
|
|
|
role:
|
|
|
|
|
type: string
|
|
|
|
|
isDeleted:
|
|
|
|
|
type: boolean
|
|
|
|
|
createdAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
updatedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
deletedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
examples:
|
|
|
|
|
example1:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: false
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
example2:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: true
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2019-04-14T15:32:15Z'
|
|
|
|
|
deletedAt: '2021-08-17T13:23:44Z'
|
|
|
|
|
'400':
|
|
|
|
|
description: Bad Request
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Bad Request
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 400
|
|
|
|
|
error: Bad Request
|
|
|
|
|
message: invalid user id
|
|
|
|
|
'401':
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 401
|
|
|
|
|
error: Unauthorized
|
|
|
|
|
message: invalid token
|
|
|
|
|
'404':
|
|
|
|
|
description: Not Found
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Not Found
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 404
|
|
|
|
|
error: Not Found
|
|
|
|
|
message: user not found
|
|
|
|
|
/account/delete/{userId}:
|
|
|
|
|
delete:
|
|
|
|
|
summary: Удаление аккаунта по ID
|
|
|
|
|
tags:
|
|
|
|
|
- account
|
|
|
|
|
description: Удаляет аккаунт из БД окончательно
|
|
|
|
|
parameters:
|
|
|
|
|
- schema:
|
|
|
|
|
type: string
|
|
|
|
|
in: path
|
|
|
|
|
name: userId
|
|
|
|
|
required: true
|
|
|
|
|
description: ID пользователя
|
|
|
|
|
security:
|
|
|
|
|
- bearer: [ ]
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
description: Аккаунт
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
_id:
|
|
|
|
|
type: string
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
|
|
|
|
nickname:
|
|
|
|
|
type: string
|
|
|
|
|
avatar:
|
|
|
|
|
type: string
|
|
|
|
|
role:
|
|
|
|
|
type: string
|
|
|
|
|
isDeleted:
|
|
|
|
|
type: boolean
|
|
|
|
|
createdAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
updatedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
deletedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
examples:
|
|
|
|
|
example1:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: false
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
example2:
|
|
|
|
|
value:
|
|
|
|
|
_id: 807f1f77bcf81cd799439011
|
|
|
|
|
userId: 507f1f77bcf86cd799439011
|
|
|
|
|
nickname: Ivanov Ivan Ivanovich
|
|
|
|
|
avatar: /media/avatar/default-avatar.jpg
|
|
|
|
|
role: user
|
|
|
|
|
isDeleted: true
|
|
|
|
|
createdAt: '2017-07-21T17:32:28Z'
|
|
|
|
|
updatedAt: '2019-04-14T15:32:15Z'
|
|
|
|
|
deletedAt: '2021-08-17T13:23:44Z'
|
|
|
|
|
'400':
|
|
|
|
|
description: Bad Request
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Bad Request
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 400
|
|
|
|
|
error: Bad Request
|
|
|
|
|
message: invalid user id
|
|
|
|
|
'401':
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 401
|
|
|
|
|
error: Unauthorized
|
|
|
|
|
message: invalid token
|
|
|
|
|
'404':
|
|
|
|
|
description: Not Found
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
description: Not Found
|
|
|
|
|
properties:
|
|
|
|
|
statusCode:
|
|
|
|
|
type: integer
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
|
|
|
|
example:
|
|
|
|
|
statusCode: 404
|
|
|
|
|
error: Not Found
|
|
|
|
|
message: user not found
|
2023-04-24 14:50:13 +00:00
|
|
|
|
components:
|
|
|
|
|
securitySchemes:
|
|
|
|
|
bearer_in_cookie:
|
|
|
|
|
type: apiKey
|
|
|
|
|
name: Authorization
|
|
|
|
|
in: cookie
|
|
|
|
|
description: "Cookie Bearer JWT авторизация. Пример: 'Bearer gvrektljh23nklje'"
|
|
|
|
|
bearer_in_query:
|
|
|
|
|
type: apiKey
|
|
|
|
|
name: Authorization
|
|
|
|
|
in: query
|
|
|
|
|
description: "Query Bearer JWT авторизация. Пример: 'gvrektljh23nklje'"
|
|
|
|
|
responses:
|
|
|
|
|
ErrorOccurred:
|
|
|
|
|
description: Error occurred
|
|
|
|
|
content:
|
|
|
|
|
text/plain:
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
example: "SomeErrorOccurred"
|
|
|
|
|
BadRequest:
|
|
|
|
|
description: Bad request
|
|
|
|
|
content:
|
|
|
|
|
text/plain:
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
example: "No title"
|
|
|
|
|
MethodNotAllowed:
|
|
|
|
|
description: Method not allowed
|
|
|
|
|
content:
|
|
|
|
|
text/plain:
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
example: "No session"
|
|
|
|
|
Unauthorized:
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
FailedDependency:
|
|
|
|
|
description: "Failed dependency"
|
|
|
|
|
content:
|
|
|
|
|
text/plain:
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
example: "flushing is not allowed"
|
2024-02-21 15:11:54 +00:00
|
|
|
|
RequestEntityTooLarge:
|
|
|
|
|
description: RequestEntityTooLarge
|
|
|
|
|
content:
|
|
|
|
|
text/plain:
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
example: "File too large"
|
2024-02-21 18:07:40 +00:00
|
|
|
|
NotAcceptable:
|
|
|
|
|
description: NotAcceptable
|
2024-02-21 15:11:54 +00:00
|
|
|
|
content:
|
|
|
|
|
text/plain:
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
example: "Unsupported Media Type"
|
2024-02-21 18:07:40 +00:00
|
|
|
|
TooManyRequests:
|
|
|
|
|
description: TooManyRequests
|
|
|
|
|
content:
|
|
|
|
|
text/plain:
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
example: "file upload limit exceeded"
|
2024-02-22 15:26:34 +00:00
|
|
|
|
AlreadyReported:
|
|
|
|
|
description: AlreadyReported
|
|
|
|
|
content:
|
|
|
|
|
text/plain:
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
example: "file already exists"
|
2023-04-24 14:50:13 +00:00
|
|
|
|
schemas:
|
|
|
|
|
Ticket:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
ID:
|
|
|
|
|
type: string
|
|
|
|
|
example: "f34512sdaf234"
|
|
|
|
|
UserID:
|
|
|
|
|
type: string
|
|
|
|
|
example: "fw4ej5oi12mlfasd"
|
|
|
|
|
SessionID:
|
|
|
|
|
type: string
|
|
|
|
|
example: "fajsdlkgj34589w0"
|
|
|
|
|
AnswererID:
|
|
|
|
|
type: string
|
|
|
|
|
example: "ajrtopjnmklzweptik2"
|
|
|
|
|
State:
|
|
|
|
|
type: string
|
|
|
|
|
example: "open"
|
|
|
|
|
enum:
|
|
|
|
|
- "open"
|
|
|
|
|
- "closed"
|
|
|
|
|
- "answer"
|
|
|
|
|
- "wait"
|
|
|
|
|
TopMessage:
|
|
|
|
|
$ref: "#/components/schemas/Message"
|
|
|
|
|
Title:
|
|
|
|
|
type: string
|
|
|
|
|
example: "Test title"
|
|
|
|
|
CreatedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
example: "2017-07-21T17:32:28Z"
|
|
|
|
|
UpdatedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
example: "2017-07-21T17:32:28Z"
|
|
|
|
|
Rate:
|
|
|
|
|
type: integer
|
|
|
|
|
example: 1
|
|
|
|
|
Message:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
ID:
|
|
|
|
|
type: string
|
|
|
|
|
example: "ZXC43n5klnzxlkcnfv34"
|
|
|
|
|
TicketID:
|
|
|
|
|
type: string
|
|
|
|
|
example: "jSDwerkljm23mios9"
|
|
|
|
|
UserID:
|
|
|
|
|
type: string
|
|
|
|
|
example: "flZmvlertjk6o453mlyhrty"
|
|
|
|
|
SessionID:
|
|
|
|
|
type: string
|
|
|
|
|
example: "ASpZp3245dllASgmkldrjJI"
|
|
|
|
|
Files:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
type: string
|
|
|
|
|
example: "iddoffile"
|
|
|
|
|
Shown:
|
|
|
|
|
type: object
|
|
|
|
|
additionalProperties:
|
|
|
|
|
type: integer
|
|
|
|
|
CreatedAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
example: "2017-07-21T17:32:28Z"
|
|
|
|
|
security:
|
|
|
|
|
- bearer_in_cookie: []
|
|
|
|
|
- bearer_in_query: []
|