Merge branch 'feature/T3660' into 'master'
feature/T3660 See merge request hrbox-public/api!1
This commit was merged in pull request #1.
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
|||||||
|
# phpstorm project files
|
||||||
|
.idea
|
||||||
|
|
||||||
|
# netbeans project files
|
||||||
|
nbproject
|
||||||
|
|
||||||
|
# zend studio for eclipse project files
|
||||||
|
.buildpath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
|
||||||
|
# windows thumbnail cache
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Mac DS_Store Files
|
||||||
|
.DS_Store
|
||||||
+569
@@ -0,0 +1,569 @@
|
|||||||
|
swagger: '2.0'
|
||||||
|
info:
|
||||||
|
description: |
|
||||||
|
HRBox integration app API
|
||||||
|
|
||||||
|
x-hrbox-client-id: {clientId}
|
||||||
|
x-hrbox-client-secret: {secretKey}
|
||||||
|
|
||||||
|
{clientId} - client id
|
||||||
|
{secretKey} - secret key
|
||||||
|
|
||||||
|
version: 2.0.0
|
||||||
|
title: HRbox Integration API
|
||||||
|
contact:
|
||||||
|
email: yuriy@hrbox.io
|
||||||
|
# host: api.hrbox.io
|
||||||
|
# basePath: /api/v1
|
||||||
|
tags:
|
||||||
|
- name: user-group
|
||||||
|
description: User groups
|
||||||
|
- name: user
|
||||||
|
description: Users
|
||||||
|
# schemes:
|
||||||
|
# - http
|
||||||
|
paths:
|
||||||
|
/user-group:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- user-group
|
||||||
|
summary: Get user groups
|
||||||
|
operationId: userGroupIndex
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: per-page
|
||||||
|
in: query
|
||||||
|
description: How many items return in one page
|
||||||
|
type: integer
|
||||||
|
default: 20
|
||||||
|
- name: page
|
||||||
|
in: query
|
||||||
|
description: Current page
|
||||||
|
type: integer
|
||||||
|
default: 1
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Returns array of user group and pagination related data
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
_meta:
|
||||||
|
$ref: '#/definitions/meta'
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/userGroup'
|
||||||
|
401:
|
||||||
|
description: Unathorized request
|
||||||
|
403:
|
||||||
|
description: Forbidden request
|
||||||
|
500:
|
||||||
|
description: Server Error
|
||||||
|
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- user-group
|
||||||
|
summary: Create user group
|
||||||
|
operationId: userGroupCreate
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
is_visible:
|
||||||
|
type: boolean
|
||||||
|
user_group_type_id:
|
||||||
|
type: integer
|
||||||
|
$ref: '#/definitions/userGroupTypeId'
|
||||||
|
thumb_file_id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
conditions:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/userGroupCondition'
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Returns userGroup data
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
$ref: '#/definitions/userGroup'
|
||||||
|
401:
|
||||||
|
description: Unathorized request
|
||||||
|
403:
|
||||||
|
description: Forbidden request
|
||||||
|
500:
|
||||||
|
description: Server Error
|
||||||
|
|
||||||
|
/user-group/{$id}:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- user-group
|
||||||
|
summary: View user group
|
||||||
|
operationId: userGroupView
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: ID
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Returns userGroup data
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
$ref: '#/definitions/userGroup'
|
||||||
|
401:
|
||||||
|
description: Unathorized request
|
||||||
|
403:
|
||||||
|
description: Forbidden request
|
||||||
|
404:
|
||||||
|
description: Not Found
|
||||||
|
500:
|
||||||
|
description: Server Error
|
||||||
|
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- user-group
|
||||||
|
summary: Edit user group
|
||||||
|
operationId: userGroupUpdate
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: ID
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
is_visible:
|
||||||
|
type: boolean
|
||||||
|
user_group_type_id:
|
||||||
|
type: integer
|
||||||
|
$ref: '#/definitions/userGroupTypeId'
|
||||||
|
thumb_file_id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
conditions:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/userGroupCondition'
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Returns userGroup data
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
$ref: '#/definitions/userGroup'
|
||||||
|
401:
|
||||||
|
description: Unathorized request
|
||||||
|
403:
|
||||||
|
description: Forbidden request
|
||||||
|
404:
|
||||||
|
description: Not Found
|
||||||
|
500:
|
||||||
|
description: Server Error
|
||||||
|
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- user-group
|
||||||
|
summary: Delete user group
|
||||||
|
operationId: userGroupDelete
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: ID
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Deleted
|
||||||
|
401:
|
||||||
|
description: Unathorized request
|
||||||
|
403:
|
||||||
|
description: Forbidden request
|
||||||
|
404:
|
||||||
|
description: Not Found
|
||||||
|
500:
|
||||||
|
description: Server Error
|
||||||
|
|
||||||
|
/user-group/{$id}/users:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- user-group
|
||||||
|
summary: Get the list of users in user group
|
||||||
|
operationId: userGroupUsersIndex
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: ID
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- name: per-page
|
||||||
|
in: query
|
||||||
|
description: How many items return in one page
|
||||||
|
type: integer
|
||||||
|
default: 20
|
||||||
|
- name: page
|
||||||
|
in: query
|
||||||
|
description: Current page
|
||||||
|
type: integer
|
||||||
|
default: 1
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Returns array of user group and pagination related data
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
_meta:
|
||||||
|
$ref: '#/definitions/meta'
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/user'
|
||||||
|
401:
|
||||||
|
description: Unathorized request
|
||||||
|
403:
|
||||||
|
description: Forbidden request
|
||||||
|
500:
|
||||||
|
description: Server Error
|
||||||
|
|
||||||
|
/user-group/{$id}/users/add:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- user-group
|
||||||
|
summary: Add users in user group
|
||||||
|
operationId: userGroupUsersAdd
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: ID
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
description: List org_employment_id
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Success response server
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
success:
|
||||||
|
type: boolean
|
||||||
|
count:
|
||||||
|
type: integer
|
||||||
|
errors:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
401:
|
||||||
|
description: Unathorized request
|
||||||
|
403:
|
||||||
|
description: Forbidden request
|
||||||
|
500:
|
||||||
|
description: Server Error
|
||||||
|
|
||||||
|
/user-group/{$id}/users/update:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- user-group
|
||||||
|
summary: Updates list of users in user group
|
||||||
|
operationId: userGroupUsersUpdate
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: ID
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
description: List org_employment_id
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Success response server
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
success:
|
||||||
|
type: boolean
|
||||||
|
count:
|
||||||
|
type: integer
|
||||||
|
errors:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
401:
|
||||||
|
description: Unathorized request
|
||||||
|
403:
|
||||||
|
description: Forbidden request
|
||||||
|
500:
|
||||||
|
description: Server Error
|
||||||
|
|
||||||
|
/user-group/{$id}/users/remove:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- user-group
|
||||||
|
summary: Removes users
|
||||||
|
operationId: userGroupUsersRemove
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: ID
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
description: List org_employment_id
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Success response server
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
success:
|
||||||
|
type: boolean
|
||||||
|
count:
|
||||||
|
type: integer
|
||||||
|
errors:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
401:
|
||||||
|
description: Unathorized request
|
||||||
|
403:
|
||||||
|
description: Forbidden request
|
||||||
|
500:
|
||||||
|
description: Server Error
|
||||||
|
|
||||||
|
definitions:
|
||||||
|
|
||||||
|
user:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
first_name:
|
||||||
|
type: string
|
||||||
|
last_name:
|
||||||
|
type: string
|
||||||
|
middle_name:
|
||||||
|
type: string
|
||||||
|
birthday_date:
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
reg_status_id:
|
||||||
|
type: integer
|
||||||
|
country_id:
|
||||||
|
type: string
|
||||||
|
is_external:
|
||||||
|
type: boolean
|
||||||
|
city_id:
|
||||||
|
type: string
|
||||||
|
spec_id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
company:
|
||||||
|
type: string
|
||||||
|
gender_id:
|
||||||
|
type: integer
|
||||||
|
photo_file_id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
updated_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
created_user_id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
updated_user_id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
|
||||||
|
userGroup:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
is_visible:
|
||||||
|
type: boolean
|
||||||
|
user_group_type_id:
|
||||||
|
type: integer
|
||||||
|
$ref: '#/definitions/userGroupTypeId'
|
||||||
|
conditions:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/userGroupCondition'
|
||||||
|
thumb_file_id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
updated_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
created_user_id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
updated_user_id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
|
||||||
|
userGroupTypeId:
|
||||||
|
type: integer
|
||||||
|
enum: [1, 2, 3, 4, 5]
|
||||||
|
description: >
|
||||||
|
* `1` - Системные\system
|
||||||
|
* `2` - Видимые админам\visible for admin
|
||||||
|
* `3` - Группы обучения\LMS group
|
||||||
|
* `4` - Видимые всем\visible for all
|
||||||
|
* `5` - Динамическая\dynamic
|
||||||
|
|
||||||
|
userGroupCondition:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
attr:
|
||||||
|
type: string
|
||||||
|
$ref: '#/definitions/userGroupConditionAttr'
|
||||||
|
operator:
|
||||||
|
type: string
|
||||||
|
$ref: '#/definitions/userGroupConditionOperator'
|
||||||
|
value:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
userGroupConditionAttr:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- 'employment.department_id'
|
||||||
|
- 'employment.position'
|
||||||
|
- 'employment.is_main'
|
||||||
|
- 'employment.seniority'
|
||||||
|
- 'employment.chief.user_id'
|
||||||
|
- 'city_id'
|
||||||
|
- 'region.id'
|
||||||
|
- 'companyName'
|
||||||
|
- 'spec_id'
|
||||||
|
- 'age'
|
||||||
|
- 'role'
|
||||||
|
- 'gender_id'
|
||||||
|
- 'reg_status_id'
|
||||||
|
- 'cabinet'
|
||||||
|
- 'is_boss'
|
||||||
|
- 'is_external'
|
||||||
|
- 'status'
|
||||||
|
|
||||||
|
userGroupConditionOperator:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- '>'
|
||||||
|
- '>='
|
||||||
|
- '='
|
||||||
|
- '<='
|
||||||
|
- '<'
|
||||||
|
- '!='
|
||||||
|
- 'in'
|
||||||
|
- 'not_in'
|
||||||
|
- 'JC'
|
||||||
|
- 'JNC'
|
||||||
|
|
||||||
|
meta:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
totalCount:
|
||||||
|
type: integer
|
||||||
|
default: 0
|
||||||
|
description: Total items count in database
|
||||||
|
pageCount:
|
||||||
|
type: integer
|
||||||
|
default: 1
|
||||||
|
description: How much pages there are with current perPage value
|
||||||
|
currentPage:
|
||||||
|
type: integer
|
||||||
|
default: 1
|
||||||
|
description: Current page number
|
||||||
|
perPage:
|
||||||
|
type: integer
|
||||||
|
default: 10
|
||||||
|
description: How much items per page
|
||||||
|
|
||||||
|
# Added by API Auto Mocking Plugin
|
||||||
|
# host: api.hrbox.io
|
||||||
|
# basePath: /api/v1
|
||||||
|
schemes:
|
||||||
|
- https
|
||||||
|
# Added by API Auto Mocking Plugin
|
||||||
|
host: virtserver.swaggerhub.com
|
||||||
|
basePath: /hrbox.io/Integration/2.0.0
|
||||||
Reference in New Issue
Block a user