feat: прохождение опросов #13
+419
-46
@@ -1,4 +1,4 @@
|
|||||||
openapi: 3.0.1
|
openapi: 3.1.0
|
||||||
info:
|
info:
|
||||||
version: 2.0.0
|
version: 2.0.0
|
||||||
title: HRBox Mobile API
|
title: HRBox Mobile API
|
||||||
@@ -4052,6 +4052,224 @@ paths:
|
|||||||
500:
|
500:
|
||||||
description: Server Error.
|
description: Server Error.
|
||||||
|
|
||||||
|
/survey/index:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- survey
|
||||||
|
summary: Доступные опросы
|
||||||
|
operationId: /survey/index
|
||||||
|
parameters:
|
||||||
|
- name: sort
|
||||||
|
description: Сортировка опросов
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- name
|
||||||
|
- name: name
|
||||||
|
in: query
|
||||||
|
description: Название
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- name: type_id
|
||||||
|
in: query
|
||||||
|
description: >
|
||||||
|
Тип опроса
|
||||||
|
* `1` - Обычный
|
||||||
|
* `2` - ICSI
|
||||||
|
* `360` - ICSI
|
||||||
|
* `6` - Обратная связь
|
||||||
|
schema:
|
||||||
|
type: number
|
||||||
|
enum:
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- 360
|
||||||
|
- 6
|
||||||
|
- name: survey_status_id
|
||||||
|
in: query
|
||||||
|
description: >
|
||||||
|
Статус опроса
|
||||||
|
* `1` - Завершен
|
||||||
|
* `2` - Запущен
|
||||||
|
schema:
|
||||||
|
type: number
|
||||||
|
enum:
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/survey'
|
||||||
|
_links:
|
||||||
|
$ref: '#/components/schemas/_links'
|
||||||
|
_meta:
|
||||||
|
$ref: '#/components/schemas/_meta'
|
||||||
|
400:
|
||||||
|
description: Bad Request.
|
||||||
|
401:
|
||||||
|
description: Unauthorized.
|
||||||
|
403:
|
||||||
|
description: Unauthorized.
|
||||||
|
404:
|
||||||
|
description: Not found.
|
||||||
|
500:
|
||||||
|
description: Server Error.
|
||||||
|
|
||||||
|
/survey-assignment/index:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- survey
|
||||||
|
summary: Назначенные опросы
|
||||||
|
operationId: /survey-assignment/index
|
||||||
|
parameters:
|
||||||
|
- name: sort
|
||||||
|
description: Сортировка назначений
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- survey.name
|
||||||
|
- survey.available_date
|
||||||
|
- surveyTarget
|
||||||
|
- created_at
|
||||||
|
- finished_at
|
||||||
|
- started_at
|
||||||
|
- name: survey_name
|
||||||
|
in: query
|
||||||
|
description: Название опроса
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- name: type_id
|
||||||
|
in: query
|
||||||
|
description: >
|
||||||
|
Тип назначения
|
||||||
|
* `1` - Вручную
|
||||||
|
* `2` - Самоназначение
|
||||||
|
schema:
|
||||||
|
type: number
|
||||||
|
enum:
|
||||||
|
- 1
|
||||||
|
- 3
|
||||||
|
- name: survey_type_id
|
||||||
|
in: query
|
||||||
|
description: >
|
||||||
|
Тип опроса
|
||||||
|
* `1` - Обычный
|
||||||
|
* `2` - ICSI
|
||||||
|
* `360` - ICSI
|
||||||
|
* `6` - Обратная связь
|
||||||
|
schema:
|
||||||
|
type: number
|
||||||
|
enum:
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- 360
|
||||||
|
- 6
|
||||||
|
- name: survey_assignment_status_id
|
||||||
|
in: query
|
||||||
|
description: >
|
||||||
|
Статус прохождения опроса
|
||||||
|
* `1` - Завершен
|
||||||
|
* `2` - Не пройден"
|
||||||
|
* `3` - В процессе"
|
||||||
|
schema:
|
||||||
|
type: number
|
||||||
|
enum:
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- 3
|
||||||
|
- name: survey_target_user_id
|
||||||
|
in: query
|
||||||
|
description: "Id пользователя на которого запущен опрос"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
- name: allow
|
||||||
|
in: query
|
||||||
|
description: "Доступные для прохождения назначенные опросы"
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
format: integer
|
||||||
|
- name: is_finished
|
||||||
|
in: query
|
||||||
|
description: "Завершенные прохождения"
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
format: integer
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/surveyAssignment'
|
||||||
|
_links:
|
||||||
|
$ref: '#/components/schemas/_links'
|
||||||
|
_meta:
|
||||||
|
$ref: '#/components/schemas/_meta'
|
||||||
|
400:
|
||||||
|
description: Bad Request.
|
||||||
|
401:
|
||||||
|
description: Unauthorized.
|
||||||
|
403:
|
||||||
|
description: Unauthorized.
|
||||||
|
404:
|
||||||
|
description: Not found.
|
||||||
|
500:
|
||||||
|
description: Server Error.
|
||||||
|
|
||||||
|
/survey-report/360:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- survey
|
||||||
|
summary: Список отчетов 360
|
||||||
|
operationId: /survey-report/360
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
cabinetReport360Url:
|
||||||
|
type: string
|
||||||
|
description: "Ссылка для просмотра отчета"
|
||||||
|
_links:
|
||||||
|
$ref: '#/components/schemas/_links'
|
||||||
|
_meta:
|
||||||
|
$ref: '#/components/schemas/_meta'
|
||||||
|
400:
|
||||||
|
description: Bad Request.
|
||||||
|
401:
|
||||||
|
description: Unauthorized.
|
||||||
|
403:
|
||||||
|
description: Unauthorized.
|
||||||
|
404:
|
||||||
|
description: Not found.
|
||||||
|
500:
|
||||||
|
description: Server Error.
|
||||||
|
|
||||||
components:
|
components:
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
SessionAuth:
|
SessionAuth:
|
||||||
@@ -4287,7 +4505,6 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
example: image.jpg
|
example: image.jpg
|
||||||
|
|
||||||
|
|
||||||
accountSecret:
|
accountSecret:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -7378,6 +7595,206 @@ components:
|
|||||||
shopOrderView:
|
shopOrderView:
|
||||||
$ref: '#/components/schemas/shopOrder'
|
$ref: '#/components/schemas/shopOrder'
|
||||||
|
|
||||||
|
survey:
|
||||||
|
type: object
|
||||||
|
description: "Опрос"
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
default: "Main survey"
|
||||||
|
description: "Название"
|
||||||
|
type_id:
|
||||||
|
type: integer
|
||||||
|
description: "Тип опроса"
|
||||||
|
oneOf:
|
||||||
|
- title: DEFAULT
|
||||||
|
const: 1
|
||||||
|
description: "Обычный"
|
||||||
|
- title: ICSI
|
||||||
|
const: 2
|
||||||
|
description: "ICSI"
|
||||||
|
- title: SURVEY_360
|
||||||
|
const: 360
|
||||||
|
description: "360"
|
||||||
|
- title: FEEDBACK
|
||||||
|
const: 6
|
||||||
|
description: "Обратная связь"
|
||||||
|
type_name:
|
||||||
|
type: string
|
||||||
|
default: "Обычный"
|
||||||
|
description: "Тип опроса"
|
||||||
|
is_available:
|
||||||
|
type: boolean
|
||||||
|
description: "Доступен всем"
|
||||||
|
is_available_by_date:
|
||||||
|
type: boolean
|
||||||
|
description: "Доступность по дате"
|
||||||
|
is_choice_anonymous:
|
||||||
|
type: boolean
|
||||||
|
description: "Возможность выбора анонимности"
|
||||||
|
available_date:
|
||||||
|
type: string
|
||||||
|
format: date_time
|
||||||
|
description: "Дата доступа"
|
||||||
|
deadline_at:
|
||||||
|
type: string
|
||||||
|
format: date_time
|
||||||
|
description: "Дата дедлайна"
|
||||||
|
canStart:
|
||||||
|
type: boolean
|
||||||
|
description: "Возможность начать прохождение"
|
||||||
|
urlStart:
|
||||||
|
type: string
|
||||||
|
description: "Ссылка на прохождение опроса"
|
||||||
|
result_params:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
allow_repeat:
|
||||||
|
type: boolean
|
||||||
|
description: "Возможность перепройти опрос"
|
||||||
|
show_results:
|
||||||
|
type: boolean
|
||||||
|
description: "Возможность смотреть результат"
|
||||||
|
|
||||||
|
surveyAssignment:
|
||||||
|
type: object
|
||||||
|
description: "Назначение на опрос"
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
is_anonymous:
|
||||||
|
type: boolean
|
||||||
|
description: "Анонимное прохождение"
|
||||||
|
started_at:
|
||||||
|
type: string
|
||||||
|
format: date_time
|
||||||
|
description: "Дата начала"
|
||||||
|
finished_at:
|
||||||
|
type: string
|
||||||
|
format: date_time
|
||||||
|
description: "Дата завершения"
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date_time
|
||||||
|
description: "Дата назначения"
|
||||||
|
survey360MatrixPositionName:
|
||||||
|
type: string
|
||||||
|
description: "В какой роли прохождение опроса"
|
||||||
|
survey360_matrix_position_id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
description: "Id роли прохождения"
|
||||||
|
surveyAssignmentStatusName:
|
||||||
|
type: string
|
||||||
|
description: "Название статуса"
|
||||||
|
survey_assignment_status_id:
|
||||||
|
type: integer
|
||||||
|
description: Статус прохождения опроса
|
||||||
|
oneOf:
|
||||||
|
- title: STATUS_COMPLETED
|
||||||
|
const: 1
|
||||||
|
description: "Завершен"
|
||||||
|
- title: STATUS_NOT_STARTED
|
||||||
|
const: 2
|
||||||
|
description: "Не пройден"
|
||||||
|
- title: STATUS_IN_PROGRESS
|
||||||
|
const: 3
|
||||||
|
description: "В процессе"
|
||||||
|
type_id:
|
||||||
|
type: number
|
||||||
|
description: "Тип назначения"
|
||||||
|
oneOf:
|
||||||
|
- title: NORMAL_ASSIGN
|
||||||
|
const: 1
|
||||||
|
description: "Вручную"
|
||||||
|
- title: SELF_ASSIGN
|
||||||
|
const: 3
|
||||||
|
description: "Самоназначение"
|
||||||
|
survey_id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
description: "Id опроса"
|
||||||
|
survey_target_id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
description: "Id таргета"
|
||||||
|
canStart:
|
||||||
|
type: boolean
|
||||||
|
description: "Возможность начать или продолжить прохождение"
|
||||||
|
urlStart:
|
||||||
|
type: string
|
||||||
|
description: "Ссылка на прохождение опроса"
|
||||||
|
cabinetReportChoicesUrl:
|
||||||
|
type: string
|
||||||
|
description: "Ссылка на просмотр результата, если значение null, то нет доступа для просмотра"
|
||||||
|
|
||||||
|
surveyTarget:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
entity_id:
|
||||||
|
type: integer
|
||||||
|
description: "Id сущности"
|
||||||
|
item_id:
|
||||||
|
type: integer
|
||||||
|
description: "Id записи сущности"
|
||||||
|
targetName:
|
||||||
|
type: string
|
||||||
|
description: "Название, заголовок записи сущности"
|
||||||
|
target:
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/userProfile'
|
||||||
|
|
||||||
|
mdWidgetUserItem:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
description: User ID
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
example: 195e1707-3f5d-4780-8dc1-b1023e1f974f
|
||||||
|
itemTitle:
|
||||||
|
description: User name
|
||||||
|
type: string
|
||||||
|
itemUrl:
|
||||||
|
description: User profile URL
|
||||||
|
type: string
|
||||||
|
example: https://hrenot.hrnox.io/core/user/view?id=5bc40c54-da74-4d5b-ac24-123374dc1a5a
|
||||||
|
itemImageUrl:
|
||||||
|
description: User avatar URL
|
||||||
|
type: string
|
||||||
|
example: https://hrenot.hrnox.io/file/user-face/5bc40c54-da74-4d5b-ac24-123374dc1a5a/300.jpg
|
||||||
|
itemEntityId:
|
||||||
|
description: Entity ID
|
||||||
|
type: number
|
||||||
|
example: 1
|
||||||
|
itemTip:
|
||||||
|
description: User position
|
||||||
|
type: string
|
||||||
|
example: CEO
|
||||||
|
itemDate:
|
||||||
|
description: Date board item
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
example: 19 july
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
position:
|
||||||
|
description: User position
|
||||||
|
type: string
|
||||||
|
example: CEO
|
||||||
|
departmentName:
|
||||||
|
description: User department name
|
||||||
|
type: string
|
||||||
|
example: 'New Department'
|
||||||
|
|
||||||
shopOrderCheckoutRequestBody:
|
shopOrderCheckoutRequestBody:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -7567,50 +7984,6 @@ components:
|
|||||||
shopOrderCancelResponse:
|
shopOrderCancelResponse:
|
||||||
$ref: '#/components/schemas/apiDefaultResponse'
|
$ref: '#/components/schemas/apiDefaultResponse'
|
||||||
|
|
||||||
mdWidgetUserItem:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
description: User ID
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
example: 195e1707-3f5d-4780-8dc1-b1023e1f974f
|
|
||||||
itemTitle:
|
|
||||||
description: User name
|
|
||||||
type: string
|
|
||||||
itemUrl:
|
|
||||||
description: User profile URL
|
|
||||||
type: string
|
|
||||||
example: https://hrenot.hrnox.io/core/user/view?id=5bc40c54-da74-4d5b-ac24-123374dc1a5a
|
|
||||||
itemImageUrl:
|
|
||||||
description: User avatar URL
|
|
||||||
type: string
|
|
||||||
example: https://hrenot.hrnox.io/file/user-face/5bc40c54-da74-4d5b-ac24-123374dc1a5a/300.jpg
|
|
||||||
itemEntityId:
|
|
||||||
description: Entity ID
|
|
||||||
type: number
|
|
||||||
example: 1
|
|
||||||
itemTip:
|
|
||||||
description: User position
|
|
||||||
type: string
|
|
||||||
example: CEO
|
|
||||||
itemDate:
|
|
||||||
description: Date board item
|
|
||||||
type: string
|
|
||||||
format: date
|
|
||||||
example: 19 july
|
|
||||||
data:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
position:
|
|
||||||
description: User position
|
|
||||||
type: string
|
|
||||||
example: CEO
|
|
||||||
departmentName:
|
|
||||||
description: User department name
|
|
||||||
type: string
|
|
||||||
example: 'New Department'
|
|
||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
boardDateTypeParam:
|
boardDateTypeParam:
|
||||||
in: query
|
in: query
|
||||||
|
|||||||
Reference in New Issue
Block a user