user-status: добавлены методы index и set
This commit is contained in:
+146
-5
@@ -15,13 +15,16 @@ info:
|
|||||||
email: yuriy@hrbox.io
|
email: yuriy@hrbox.io
|
||||||
# host: api.hrbox.io
|
# host: api.hrbox.io
|
||||||
# basePath: /api/v1
|
# basePath: /api/v1
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- name: user-group
|
- name: user-group
|
||||||
description: User groups
|
description: User groups
|
||||||
- name: user
|
- name: user-status
|
||||||
description: Users
|
description: User statuses
|
||||||
|
|
||||||
# schemes:
|
# schemes:
|
||||||
# - http
|
# - http
|
||||||
|
|
||||||
paths:
|
paths:
|
||||||
/user-group:
|
/user-group:
|
||||||
get:
|
get:
|
||||||
@@ -51,7 +54,7 @@ paths:
|
|||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
_meta:
|
_meta:
|
||||||
$ref: '#/definitions/meta'
|
$ref: '#/definitions/_meta'
|
||||||
data:
|
data:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@@ -249,7 +252,7 @@ paths:
|
|||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
_meta:
|
_meta:
|
||||||
$ref: '#/definitions/meta'
|
$ref: '#/definitions/_meta'
|
||||||
data:
|
data:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@@ -398,6 +401,104 @@ paths:
|
|||||||
500:
|
500:
|
||||||
description: Server Error
|
description: Server Error
|
||||||
|
|
||||||
|
/user-status:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- user-status
|
||||||
|
summary: Get user statuses list.
|
||||||
|
operationId: actionIndex
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: per-page
|
||||||
|
description: How many items return in one page.
|
||||||
|
in: query
|
||||||
|
type: integer
|
||||||
|
default: 20
|
||||||
|
- name: page
|
||||||
|
description: The current page.
|
||||||
|
in: query
|
||||||
|
type: integer
|
||||||
|
default: 1
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Returns list of available user statuses.
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/userStatus'
|
||||||
|
_links:
|
||||||
|
$ref: '#/definitions/_links'
|
||||||
|
_meta:
|
||||||
|
$ref: '#/definitions/_meta'
|
||||||
|
401:
|
||||||
|
description: Unauthorized.
|
||||||
|
403:
|
||||||
|
description: Forbidden.
|
||||||
|
500:
|
||||||
|
description: Internal Server Error.
|
||||||
|
|
||||||
|
/user-status/set:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- user-status
|
||||||
|
summary: Change user status.
|
||||||
|
operationId: actionSet
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
org_employment_id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
description: Organization employment ID.
|
||||||
|
status_id:
|
||||||
|
type: string
|
||||||
|
description: An existing status ID or slug (send slug if it presented). The list of statuses can be obtained using the "/user-status/index" method.
|
||||||
|
is_active:
|
||||||
|
type: boolean
|
||||||
|
description: Set status activity.
|
||||||
|
expire_at:
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
description: Required when setting the status if the status has date-limited option enabled (is_expire = true). The expire_at date must be greater than the current date.
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Returns a success result.
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
success:
|
||||||
|
type: boolean
|
||||||
|
status:
|
||||||
|
type: integer
|
||||||
|
example: 200
|
||||||
|
400:
|
||||||
|
description: Bad Request. Returns a message with the error details.
|
||||||
|
401:
|
||||||
|
description: Unauthorized.
|
||||||
|
403:
|
||||||
|
description: Forbidden.
|
||||||
|
404:
|
||||||
|
description: Not found. Returns a message with the error details.
|
||||||
|
500:
|
||||||
|
description: Internal Server Error.
|
||||||
|
|
||||||
definitions:
|
definitions:
|
||||||
|
|
||||||
user:
|
user:
|
||||||
@@ -538,7 +639,47 @@ definitions:
|
|||||||
- 'JC'
|
- 'JC'
|
||||||
- 'JNC'
|
- 'JNC'
|
||||||
|
|
||||||
meta:
|
userStatus:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
slug:
|
||||||
|
type: string
|
||||||
|
is_custom:
|
||||||
|
type: boolean
|
||||||
|
is_editable:
|
||||||
|
type: boolean
|
||||||
|
is_expire:
|
||||||
|
type: boolean
|
||||||
|
display_in_modal:
|
||||||
|
type: boolean
|
||||||
|
labelColorHEX:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
_links:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
self:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
first:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
last:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
_meta:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
totalCount:
|
totalCount:
|
||||||
|
|||||||
Reference in New Issue
Block a user