Update Moderation API

This commit is contained in:
ruslan
2023-07-07 12:26:49 +03:00
parent 6fa886a55d
commit fbdeefdef2
+115 -21
View File
@@ -2391,7 +2391,7 @@ components:
description: > description: >
Entity ID: Entity ID:
* `20` - User * `20` - User
* `118` - User postcard * `118` - Postcard
* `140` - Comment * `140` - Comment
* `360` - Idea * `360` - Idea
* `152` - Voting nominee * `152` - Voting nominee
@@ -2404,7 +2404,14 @@ components:
- 152 - 152
example: 20 example: 20
type_id: type_id:
description: USER_AVATAR - Change user profile photo <br> USER_CABINET - Change city, cabinet <br> USER_POSTCARD - Postcard <br> COMMENT - Comment <br> IDEA - Idea <br> VOTING_NOMINEE - Voting nominee photos description: >
Moderation types:
* `USER_AVATAR` - Change user profile photo. Fields - photo_file_id, settings.
* `USER_CABINET` - Change city, cabinet. Fields - city, cabinet.
* `USER_POSTCARD` - Send postcard. Fields - text, user_id, postcard_id.
* `COMMENT` - Add comment. Fields - message, content_json.
* `IDEA` - Idea suggestion. Fields - idea_purpose_id, department_id, title, description, files.
* `VOTING_NOMINEE` - Image participating in the voting. Fields - file_id, nomination_id, title, description.
type: string type: string
enum: enum:
- USER_AVATAR - USER_AVATAR
@@ -2452,9 +2459,24 @@ components:
description: User cabinet field. description: User cabinet field.
type: string type: string
example: 1a example: 1a
- properties:
text:
description: Postcard text.
type: string
example: Example text.
user_id:
description: User model ID.
type: string
format: uuid
example: 8768c19d-dae7-43f0-8b51-a86705f33a1b
postcard_id:
description: Postcard model ID.
type: string
format: uuid
example: e101d3be-ca63-49e0-9c94-a32fefc20c92
- properties: - properties:
message: message:
description: Field "message" in Comment model. Comment text. description: Field "message" in Comment model.
type: string type: string
example: Comment text. example: Comment text.
content_json: content_json:
@@ -2569,21 +2591,21 @@ components:
type: string type: string
example: Photo description example. example: Photo description example.
created_at: created_at:
description: Text description: Moderation creation date.
type: string type: string
format: date format: date
updated_at: updated_at:
description: Text description: Moderation update date.
type: string type: string
format: date format: date
statusName: statusName:
description: Text description: Status name.
type: string type: string
typeName: typeName:
description: Text description: Type name.
type: string type: string
formatChanges: formatChanges:
description: <b>(In OpenAPI 2, "oneOf" didn't exist)</b> One of moderation types. Model fields that can be changed. Data formatted for use in view files. description: Model fields that can be changed. Data formatted for use in view files.
type: object type: object
oneOf: oneOf:
- properties: - properties:
@@ -2607,7 +2629,8 @@ components:
value: value:
description: Field value. description: Field value.
type: string type: string
example: https://demo.hrbox.io/file/open/4b7477f9-5000-49f1-9ce1-02cb95c0cac6.jpg format: uuid
example: 4b7477f9-5000-49f1-9ce1-02cb95c0cac6
url: url:
type: string type: string
default: null default: null
@@ -2700,9 +2723,80 @@ components:
example: 1a example: 1a
url: url:
type: string type: string
- properties:
text:
description: Postcard text.
type: object
properties:
type:
description: Field value type.
type: string
enum:
- string
- img
- files
- html
example: string
label:
description: Field label.
type: string
example: Postcard text
value:
description: Field value.
type: string
default: null
example: Example text.
url:
type: string
user_id:
description: User name.
type: object
properties:
type:
description: Field value type.
type: string
enum:
- string
- img
- files
- html
example: string
label:
description: Field label.
type: string
example: User
value:
description: Field value.
type: string
example: FirstName LastName
url:
type: string
postcard_id:
description: Postcard image.
type: object
properties:
type:
description: Field value type.
type: string
enum:
- string
- img
- files
- html
example: img
label:
description: Field label.
type: string
example: Postcard
value:
description: Field value.
type: string
example: https://demo.hrbox.io/file/open/d6f5be76-58fa-4b61-a248-74e10b2b5ed0.jpg
url:
type: string
- properties: - properties:
subject: subject:
description: Text description: Comment subject.
type: object type: object
properties: properties:
type: type:
@@ -2726,7 +2820,7 @@ components:
type: string type: string
example: https://demo.hrbox.io/read/3379b1ac54/news-title example: https://demo.hrbox.io/read/3379b1ac54/news-title
message: message:
description: Text description: Comment message.
type: object type: object
properties: properties:
type: type:
@@ -2749,7 +2843,7 @@ components:
url: url:
type: string type: string
content_json: content_json:
description: Text description: Comment attached files.
type: object type: object
properties: properties:
type: type:
@@ -3047,33 +3141,33 @@ components:
url: url:
type: string type: string
referenceAttributes: referenceAttributes:
description: Text description: Reference model attributes.
type: object type: object
requestedUser: requestedUser:
description: Text description: Requested user.
type: object type: object
properties: properties:
id: id:
description: Text description: Requested user ID.
type: string type: string
format: uuid format: uuid
iconUrl: iconUrl:
description: Text description: Requested user ID.
type: string type: string
name: name:
description: Text description: Requested user name.
type: string type: string
moderatedUser: moderatedUser:
description: Text description: Moderated user.
type: object type: object
properties: properties:
id: id:
description: Text description: Moderated user ID.
type: string type: string
format: uuid format: uuid
iconUrl: iconUrl:
description: Text description: Moderated user ID.
type: string type: string
name: name:
description: Text description: Moderated user name.
type: string type: string