Skip to content

Commit a6aa426

Browse files
Complement #503 (#505)
1 parent 9bc184c commit a6aa426

7 files changed

Lines changed: 95 additions & 2 deletions

File tree

openapi/components/parameters.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,22 @@ avatarId:
383383
in: path
384384
required: true
385385
schema:
386-
type: string
386+
$ref: ./schemas/AvatarID.yaml
387+
description: Must be a valid avatar ID.
388+
targetAvatarId:
389+
name: targetAvatarId
390+
in: query
391+
required: true
392+
schema:
393+
$ref: ./schemas/AvatarID.yaml
387394
description: Must be a valid avatar ID.
395+
avatarModerationType:
396+
name: avatarModerationType
397+
in: query
398+
required: true
399+
schema:
400+
$ref: ./schemas/AvatarModerationType.yaml
401+
description: The avatar moderation type associated with the avatar.
388402
messageType:
389403
name: messageType
390404
in: path

openapi/components/paths/authentication.yaml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ paths:
171171
get:
172172
summary: Get Global Avatar Moderations
173173
operationId: getGlobalAvatarModerations
174-
description: Returns list of globally blocked avatars.
174+
description: Returns list of globally moderated avatars.
175175
tags:
176176
- authentication
177177
security:
@@ -181,6 +181,41 @@ paths:
181181
$ref: ../responses/authentication/GetAvatarModerationsResponse.yaml
182182
'401':
183183
$ref: ../responses/MissingCredentialsError.yaml
184+
post:
185+
summary: Create Global Avatar Moderation
186+
operationId: createGlobalAvatarModeration
187+
description: Globally moderates an avatar.
188+
requestBody:
189+
required: true
190+
content:
191+
application/json:
192+
schema:
193+
$ref: ../requests/CreateAvatarModerationRequest.yaml
194+
tags:
195+
- authentication
196+
security:
197+
- authCookie: []
198+
responses:
199+
'200':
200+
$ref: ../responses/authentication/CreateAvatarModerationResponse.yaml
201+
'401':
202+
$ref: ../responses/MissingCredentialsError.yaml
203+
delete:
204+
summary: Delete Global Avatar Moderation
205+
operationId: deleteGlobalAvatarModeration
206+
description: Globally unmoderates an avatar.
207+
parameters:
208+
- $ref: ../parameters.yaml#/targetAvatarId
209+
- $ref: ../parameters.yaml#/avatarModerationType
210+
tags:
211+
- authentication
212+
security:
213+
- authCookie: []
214+
responses:
215+
'200':
216+
$ref: ../responses/authentication/DeleteAvatarModerationResponse.yaml
217+
'401':
218+
$ref: ../responses/MissingCredentialsError.yaml
184219
/auth/twofactorauth/otp/verify:
185220
post:
186221
summary: Verify 2FA code with Recovery code
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
title: CreateAvatarModerationRequest
2+
type: object
3+
properties:
4+
targetAvatarId:
5+
$ref: ../schemas/AvatarID.yaml
6+
avatarModerationType:
7+
$ref: ../schemas/AvatarModerationType.yaml
8+
required:
9+
- targetAvatarId
10+
- avatarModerationType
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
description: Returns a single AvatarModerationCreated object
2+
content:
3+
application/json:
4+
schema:
5+
$ref: ../../schemas/AvatarModerationCreated.yaml
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
description: Returns a single OkStatus2 object
2+
content:
3+
application/json:
4+
schema:
5+
$ref: ../../schemas/OkStatus2.yaml
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
title: AvatarModerationCreated
2+
type: object
3+
properties:
4+
avatarModerationType:
5+
$ref: ./AvatarModerationType.yaml
6+
created:
7+
type: integer
8+
format: int64
9+
description: Timestamp in milliseconds since Unix epoch
10+
targetAvatarId:
11+
$ref: ./AvatarID.yaml
12+
required:
13+
- avatarModerationType
14+
- created
15+
- targetAvatarId
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
title: OkStatus2
2+
type: object
3+
description: Another status response consisting of solely a string description of whether the result of an operation was ok.
4+
properties:
5+
OK:
6+
type: string
7+
description: The actual status itself
8+
required:
9+
- OK

0 commit comments

Comments
 (0)