Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion openapi/components/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,22 @@ avatarId:
in: path
required: true
schema:
type: string
$ref: ./schemas/AvatarID.yaml
description: Must be a valid avatar ID.
targetAvatarId:
name: targetAvatarId
in: query
required: true
schema:
$ref: ./schemas/AvatarID.yaml
description: Must be a valid avatar ID.
avatarModerationType:
name: avatarModerationType
in: query
required: true
schema:
$ref: ./schemas/AvatarModerationType.yaml
description: The avatar moderation type associated with the avatar.
messageType:
name: messageType
in: path
Expand Down
37 changes: 36 additions & 1 deletion openapi/components/paths/authentication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ paths:
get:
summary: Get Global Avatar Moderations
operationId: getGlobalAvatarModerations
description: Returns list of globally blocked avatars.
description: Returns list of globally moderated avatars.
tags:
- authentication
security:
Expand All @@ -181,6 +181,41 @@ paths:
$ref: ../responses/authentication/GetAvatarModerationsResponse.yaml
'401':
$ref: ../responses/MissingCredentialsError.yaml
post:
summary: Create Global Avatar Moderation
operationId: createGlobalAvatarModeration
description: Globally moderates an avatar.
requestBody:
required: true
content:
application/json:
schema:
$ref: ../requests/CreateAvatarModerationRequest.yaml
tags:
- authentication
security:
- authCookie: []
responses:
'200':
$ref: ../responses/authentication/CreateAvatarModerationResponse.yaml
'401':
$ref: ../responses/MissingCredentialsError.yaml
delete:
summary: Delete Global Avatar Moderation
operationId: deleteGlobalAvatarModeration
description: Globally unmoderates an avatar.
parameters:
- $ref: ../parameters.yaml#/targetAvatarId
- $ref: ../parameters.yaml#/avatarModerationType
tags:
- authentication
security:
- authCookie: []
responses:
'200':
$ref: ../responses/authentication/DeleteAvatarModerationResponse.yaml
'401':
$ref: ../responses/MissingCredentialsError.yaml
/auth/twofactorauth/otp/verify:
post:
summary: Verify 2FA code with Recovery code
Expand Down
10 changes: 10 additions & 0 deletions openapi/components/requests/CreateAvatarModerationRequest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title: CreateAvatarModerationRequest
type: object
properties:
targetAvatarId:
$ref: ../schemas/AvatarID.yaml
avatarModerationType:
$ref: ../schemas/AvatarModerationType.yaml
required:
- targetAvatarId
- avatarModerationType
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Returns a single AvatarModerationCreated object
content:
application/json:
schema:
$ref: ../../schemas/AvatarModerationCreated.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Returns a single OkStatus2 object
content:
application/json:
schema:
$ref: ../../schemas/OkStatus2.yaml
15 changes: 15 additions & 0 deletions openapi/components/schemas/AvatarModerationCreated.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
title: AvatarModerationCreated
type: object
properties:
avatarModerationType:
$ref: ./AvatarModerationType.yaml
created:
type: integer
format: int64
description: Timestamp in milliseconds since Unix epoch
targetAvatarId:
$ref: ./AvatarID.yaml
required:
- avatarModerationType
- created
- targetAvatarId
9 changes: 9 additions & 0 deletions openapi/components/schemas/OkStatus2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: OkStatus2
type: object
description: Another status response consisting of solely a string description of whether the result of an operation was ok.
properties:
OK:
type: string
description: The actual status itself
required:
- OK