APIv2 User Status
This commit is contained in:
+220
-41
@@ -45,6 +45,8 @@ tags:
|
|||||||
description: Methods for working with postcards
|
description: Methods for working with postcards
|
||||||
- name: dashboard
|
- name: dashboard
|
||||||
description: Methods for getting dashboards and widgets data
|
description: Methods for getting dashboards and widgets data
|
||||||
|
- name: user-status
|
||||||
|
description: Methods for getting user statuses data
|
||||||
|
|
||||||
paths:
|
paths:
|
||||||
/mobile/bind/{id}/{token}:
|
/mobile/bind/{id}/{token}:
|
||||||
@@ -560,7 +562,7 @@ paths:
|
|||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
_meta:
|
_meta:
|
||||||
$ref: '#/components/schemas/meta'
|
$ref: '#/components/schemas/_meta'
|
||||||
data:
|
data:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@@ -773,7 +775,7 @@ paths:
|
|||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
_meta:
|
_meta:
|
||||||
$ref: '#/components/schemas/meta'
|
$ref: '#/components/schemas/_meta'
|
||||||
data:
|
data:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@@ -1511,26 +1513,6 @@ paths:
|
|||||||
500:
|
500:
|
||||||
description: Server Error.
|
description: Server Error.
|
||||||
|
|
||||||
# /idea/settings:
|
|
||||||
# get:
|
|
||||||
# tags:
|
|
||||||
# - idea
|
|
||||||
# summary: Idea module settings.
|
|
||||||
# operationId: /idea/settings
|
|
||||||
# responses:
|
|
||||||
# 200:
|
|
||||||
# description: Idea settings object.
|
|
||||||
# content:
|
|
||||||
# application/json:
|
|
||||||
# schema:
|
|
||||||
# $ref: '#/components/schemas/ideaSettings'
|
|
||||||
# 401:
|
|
||||||
# description: Unauthorized request.
|
|
||||||
# 403:
|
|
||||||
# description: Unauthorized request.
|
|
||||||
# 500:
|
|
||||||
# description: Server Error.
|
|
||||||
|
|
||||||
/idea/statuses:
|
/idea/statuses:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -1583,35 +1565,30 @@ paths:
|
|||||||
description: Дата создания идеи.
|
description: Дата создания идеи.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
|
||||||
example: 2023-01-01|2023-01-01
|
example: 2023-01-01|2023-01-01
|
||||||
- name: created_user_id
|
- name: created_user_id
|
||||||
in: query
|
in: query
|
||||||
description: Идентификатор пользователя. Можно передать несколько идентификаторов разделенные запятой.
|
description: Идентификатор пользователя. Можно передать несколько идентификаторов разделенные запятой.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
|
||||||
example: edee4e11-dab5-4aac-93ac-43c379aab6b2
|
example: edee4e11-dab5-4aac-93ac-43c379aab6b2
|
||||||
- name: idea_status_id
|
- name: idea_status_id
|
||||||
in: query
|
in: query
|
||||||
description: Статус идеи. Можно передать несколько идентификаторов разделенные запятой.
|
description: Статус идеи. Можно передать несколько идентификаторов разделенные запятой.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
|
||||||
example: 1
|
example: 1
|
||||||
- name: idea_purpose_id
|
- name: idea_purpose_id
|
||||||
in: query
|
in: query
|
||||||
description: Направление идеи. Можно передать несколько идентификаторов разделенные запятой.
|
description: Направление идеи. Можно передать несколько идентификаторов разделенные запятой.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
|
||||||
example: edee4e11-dab5-4aac-93ac-43c379aab6b2
|
example: edee4e11-dab5-4aac-93ac-43c379aab6b2
|
||||||
- name: performer_id
|
- name: performer_id
|
||||||
in: query
|
in: query
|
||||||
description: Исполнитель идеи. Можно передать несколько идентификаторов разделенные запятой.
|
description: Исполнитель идеи. Можно передать несколько идентификаторов разделенные запятой.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
|
||||||
example: edee4e11-dab5-4aac-93ac-43c379aab6b2
|
example: edee4e11-dab5-4aac-93ac-43c379aab6b2
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
@@ -1643,7 +1620,7 @@ paths:
|
|||||||
description: Idea ID.
|
description: Idea ID.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: true
|
||||||
example: edee4e11-dab5-4aac-93ac-43c379aab6b2
|
example: edee4e11-dab5-4aac-93ac-43c379aab6b2
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
@@ -1668,7 +1645,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- idea
|
- idea
|
||||||
summary: Idea edit.
|
summary: Idea edit.
|
||||||
operationId: idea/edit
|
operationId: /idea/edit
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
in: query
|
in: query
|
||||||
@@ -1706,7 +1683,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- idea
|
- idea
|
||||||
summary: Vote for idea.
|
summary: Vote for idea.
|
||||||
operationId: idea/vote
|
operationId: /idea/vote
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
in: query
|
in: query
|
||||||
@@ -1750,7 +1727,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- idea
|
- idea
|
||||||
summary: Participate an idea.
|
summary: Participate an idea.
|
||||||
operationId: idea/participate
|
operationId: /idea/participate
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
in: query
|
in: query
|
||||||
@@ -1789,6 +1766,128 @@ paths:
|
|||||||
500:
|
500:
|
||||||
description: Server Error.
|
description: Server Error.
|
||||||
|
|
||||||
|
/user-status/index:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- user-status
|
||||||
|
summary: User status index.
|
||||||
|
operationId: /user-status/index
|
||||||
|
parameters:
|
||||||
|
- name: name
|
||||||
|
in: query
|
||||||
|
description: Название статуса (like).
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: В отпуске
|
||||||
|
- name: slug
|
||||||
|
in: query
|
||||||
|
description: Уникальный именуемый идентификатор статуса (equals).
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: vacation
|
||||||
|
- name: is_custom
|
||||||
|
in: query
|
||||||
|
description: Статус создан администратором.
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
example: 1
|
||||||
|
- name: is_editable
|
||||||
|
in: query
|
||||||
|
description: Возможность редактирования статуса.
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
example: 1
|
||||||
|
- name: is_expire
|
||||||
|
in: query
|
||||||
|
description: Статус со сроком действия.
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
example: 1
|
||||||
|
- name: display_in_modal
|
||||||
|
in: query
|
||||||
|
description: Запрашивать статус в модальном окне запроса статуса.
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
example: 1
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Returns pagination and array of user status objects.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/userStatus'
|
||||||
|
_meta:
|
||||||
|
$ref: '#/components/schemas/_meta'
|
||||||
|
400:
|
||||||
|
description: Bad Request.
|
||||||
|
401:
|
||||||
|
description: Unauthorized request.
|
||||||
|
500:
|
||||||
|
description: Server Error.
|
||||||
|
|
||||||
|
/user-status/view:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- user-status
|
||||||
|
summary: User status view.
|
||||||
|
operationId: /user-status/view
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: query
|
||||||
|
description: User status ID.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
example: b726280a-2be6-4e62-ab24-1736389c6474
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: User status detailed object.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/userStatus'
|
||||||
|
400:
|
||||||
|
description: Bad Request.
|
||||||
|
401:
|
||||||
|
description: Unauthorized request.
|
||||||
|
404:
|
||||||
|
description: Page not found.
|
||||||
|
500:
|
||||||
|
description: Server Error.
|
||||||
|
|
||||||
|
/user-status/set:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- user-status
|
||||||
|
summary: Set user statuses.
|
||||||
|
operationId: /user-status/set
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/userStatusSetRequestBody'
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Result as boolean value.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
400:
|
||||||
|
description: Bad Request.
|
||||||
|
401:
|
||||||
|
description: Unauthorized request.
|
||||||
|
500:
|
||||||
|
description: Server Error.
|
||||||
|
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
arrayOfIds:
|
arrayOfIds:
|
||||||
@@ -1847,8 +1946,10 @@ components:
|
|||||||
modules:
|
modules:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
userStatus:
|
||||||
|
$ref: '#/components/schemas/tenantInfoModuleUserStatus'
|
||||||
idea:
|
idea:
|
||||||
$ref: '#/components/schemas/ideaSettings'
|
$ref: '#/components/schemas/tenantInfoModuleIdea'
|
||||||
xml:
|
xml:
|
||||||
name: tenantInfo
|
name: tenantInfo
|
||||||
|
|
||||||
@@ -2271,25 +2372,25 @@ components:
|
|||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
meta:
|
_meta:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
totalCount:
|
totalCount:
|
||||||
type: integer
|
|
||||||
default: 0
|
|
||||||
description: Total items count in database
|
description: Total items count in database
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
pageCount:
|
pageCount:
|
||||||
type: integer
|
|
||||||
default: 1
|
|
||||||
description: How much pages there are with current perPage value
|
description: How much pages there are with current perPage value
|
||||||
currentPage:
|
|
||||||
type: integer
|
type: integer
|
||||||
default: 1
|
default: 1
|
||||||
|
currentPage:
|
||||||
description: Current page number
|
description: Current page number
|
||||||
|
type: integer
|
||||||
|
default: 1
|
||||||
perPage:
|
perPage:
|
||||||
|
description: How much items per page
|
||||||
type: integer
|
type: integer
|
||||||
default: 10
|
default: 10
|
||||||
description: How much items per page
|
|
||||||
|
|
||||||
contact:
|
contact:
|
||||||
type: object
|
type: object
|
||||||
@@ -3609,8 +3710,8 @@ components:
|
|||||||
description: Moderated user name.
|
description: Moderated user name.
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
ideaSettings:
|
tenantInfoModuleIdea:
|
||||||
description: Список настроек модуля идей.
|
description: Настройки модуля идей.
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
isModuleEnabled:
|
isModuleEnabled:
|
||||||
@@ -4034,3 +4135,81 @@ components:
|
|||||||
example:
|
example:
|
||||||
- '53f2d03c-303a-4a3c-b57f-f7fb62fee538'
|
- '53f2d03c-303a-4a3c-b57f-f7fb62fee538'
|
||||||
- '42862a16-affa-4ba5-86c5-61376f46d695'
|
- '42862a16-affa-4ba5-86c5-61376f46d695'
|
||||||
|
|
||||||
|
tenantInfoModuleUserStatus:
|
||||||
|
description: Настройки модуля статусов пользователей.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
isUserStatusEnabled:
|
||||||
|
description: Модуль статусов пользователей вкл/выкл.
|
||||||
|
type: boolean
|
||||||
|
example: true
|
||||||
|
default: true
|
||||||
|
checkUserStatus:
|
||||||
|
description: Спрашивать статус пользователя.
|
||||||
|
type: boolean
|
||||||
|
example: true
|
||||||
|
default: false
|
||||||
|
modalHeaderText:
|
||||||
|
description: Текст заголовка модального окна.
|
||||||
|
type: string
|
||||||
|
default: Где вы сегодня работаете?
|
||||||
|
modalBodyText:
|
||||||
|
description: Текст описания в модальном окне.
|
||||||
|
type: string
|
||||||
|
default: Друзья, в текущей ситуации нам особенно важно знать, что с вами все в порядке. Поэтому просим вас каждое утро обновлять свой статус, чтобы мы понимали, где вы работаете.
|
||||||
|
|
||||||
|
userStatus:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
description: Идентификатор статуса.
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
example: b726280a-2be6-4e62-ab24-1736389c6474
|
||||||
|
name:
|
||||||
|
description: Название статуса.
|
||||||
|
type: string
|
||||||
|
example: В отпуске
|
||||||
|
slug:
|
||||||
|
description: Уникальный именуемый идентификатор статуса.
|
||||||
|
type: string
|
||||||
|
example: vacation
|
||||||
|
is_custom:
|
||||||
|
description: Статус создан администратором.
|
||||||
|
type: boolean
|
||||||
|
example: false
|
||||||
|
is_editable:
|
||||||
|
description: Возможность редактирования статуса.
|
||||||
|
type: boolean
|
||||||
|
example: false
|
||||||
|
is_expire:
|
||||||
|
description: Статус со сроком действия.
|
||||||
|
type: boolean
|
||||||
|
example: false
|
||||||
|
display_in_modal:
|
||||||
|
description: Запрашивать статус в модальном окне запроса статуса.
|
||||||
|
type: boolean
|
||||||
|
example: false
|
||||||
|
labelColorHEX:
|
||||||
|
description: Цвет статуса в HEX кодировке.
|
||||||
|
type: string
|
||||||
|
example: '#D90000'
|
||||||
|
|
||||||
|
userStatusSetRequestBody:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
description: Идентификатор статуса.
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
example: b726280a-2be6-4e62-ab24-1736389c6474
|
||||||
|
is_enabled:
|
||||||
|
description: Состояние статуса.
|
||||||
|
type: boolean
|
||||||
|
example: true
|
||||||
|
expire_at:
|
||||||
|
description: Срок действия статуса. Обязателен для установки статусов у которых включен срок действия.
|
||||||
|
type: string
|
||||||
|
format: 'date'
|
||||||
|
example: 2024-01-01
|
||||||
Reference in New Issue
Block a user