Merge branch 'feature/H-547' into 'master'
feature/H-547 See merge request hrbox-public/api!3
This commit was merged in pull request #3.
This commit is contained in:
+131
-1
@@ -1777,6 +1777,79 @@ paths:
|
|||||||
500:
|
500:
|
||||||
description: Server Error.
|
description: Server Error.
|
||||||
|
|
||||||
|
/file/index:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- file
|
||||||
|
summary: index user files.
|
||||||
|
operationId: /file/index
|
||||||
|
parameters:
|
||||||
|
- name: file_type
|
||||||
|
in: query
|
||||||
|
example: image
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- image
|
||||||
|
- video
|
||||||
|
- document
|
||||||
|
- archive
|
||||||
|
- other
|
||||||
|
- encrypted
|
||||||
|
- name: search
|
||||||
|
in: query
|
||||||
|
description: Query string
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: Some text
|
||||||
|
- name: per-page
|
||||||
|
in: query
|
||||||
|
description: How many items return in one page (default 20).
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- name: page
|
||||||
|
in: query
|
||||||
|
description: Current page.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- name: sort
|
||||||
|
description: Sorting fields and directions (example, -created_at, +name)
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- name
|
||||||
|
- ext
|
||||||
|
- file_type
|
||||||
|
- mime_type
|
||||||
|
- created_at
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: File objects.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/fileIndex'
|
||||||
|
_links:
|
||||||
|
$ref: '#/components/schemas/_links'
|
||||||
|
_meta:
|
||||||
|
$ref: '#/components/schemas/_meta'
|
||||||
|
400:
|
||||||
|
description: Bad Request.
|
||||||
|
401:
|
||||||
|
description: Unauthorized.
|
||||||
|
403:
|
||||||
|
description: Unauthorized.
|
||||||
|
404:
|
||||||
|
description: Unauthorized.
|
||||||
|
500:
|
||||||
|
description: Server Error.
|
||||||
|
|
||||||
/user-status/index:
|
/user-status/index:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -4702,4 +4775,61 @@ components:
|
|||||||
type: boolean
|
type: boolean
|
||||||
example: false
|
example: false
|
||||||
comment:
|
comment:
|
||||||
$ref: '#/components/schemas/commentView'
|
$ref: '#/components/schemas/commentView'
|
||||||
|
|
||||||
|
fileIndex:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
description: File model ID.
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
example: e456bfb3-31dc-4c94-81ca-17dc49043a2b
|
||||||
|
name:
|
||||||
|
description: File name.
|
||||||
|
type: string
|
||||||
|
example: 2023-12-05 15-08-10.png
|
||||||
|
url:
|
||||||
|
description: File open URL.
|
||||||
|
type: string
|
||||||
|
example: https://demo.hrbox.io/file/open/e456bfb3-31dc-4c94-81ca-17dc49043a2b.jpg
|
||||||
|
ext:
|
||||||
|
description: File extension.
|
||||||
|
type: string
|
||||||
|
example: png
|
||||||
|
meta:
|
||||||
|
description: File meta information.
|
||||||
|
type: object
|
||||||
|
default: null
|
||||||
|
example: {
|
||||||
|
"width": 1920,
|
||||||
|
"height": 1080
|
||||||
|
}
|
||||||
|
properties:
|
||||||
|
width:
|
||||||
|
description: Image width.
|
||||||
|
type: integer
|
||||||
|
example: 1920
|
||||||
|
height:
|
||||||
|
description: Image height.
|
||||||
|
type: integer
|
||||||
|
example: 1080
|
||||||
|
file_type:
|
||||||
|
description: File type.
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- image
|
||||||
|
- video
|
||||||
|
- document
|
||||||
|
- archive
|
||||||
|
- other
|
||||||
|
- encrypted
|
||||||
|
example: image
|
||||||
|
is_public:
|
||||||
|
description: File is public.
|
||||||
|
type: boolean
|
||||||
|
example: false
|
||||||
|
mime_type:
|
||||||
|
description: File MIME-Type.
|
||||||
|
type: string
|
||||||
|
example: image/png
|
||||||
Reference in New Issue
Block a user