Add admin chat endpoint and request schemas for private messages, party messages, and punishments
This commit is contained in:
@@ -19,6 +19,27 @@ sendServerMessage:
|
|||||||
description: Server not found or not connected
|
description: Server not found or not connected
|
||||||
'400':
|
'400':
|
||||||
description: Invalid request
|
description: Invalid request
|
||||||
|
sendAdminChat:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- admin-chat
|
||||||
|
summary: Send an admin chat to a specific server
|
||||||
|
operationId: sendAdminChat
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/Server'
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ServerMessageRequest'
|
||||||
|
responses:
|
||||||
|
'202':
|
||||||
|
description: Message accepted and sent
|
||||||
|
'404':
|
||||||
|
description: Server not found or not connected
|
||||||
|
'400':
|
||||||
|
description: Invalid request
|
||||||
components:
|
components:
|
||||||
parameters:
|
parameters:
|
||||||
Server:
|
Server:
|
||||||
@@ -43,3 +64,74 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: The message to send
|
description: The message to send
|
||||||
maxLength: 256
|
maxLength: 256
|
||||||
|
PrivateMessageRequest:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- from
|
||||||
|
- message
|
||||||
|
- to
|
||||||
|
properties:
|
||||||
|
from:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
description: The sender UUID
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
description: The message to send
|
||||||
|
maxLength: 256
|
||||||
|
to:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
description: The recipient UUID
|
||||||
|
|
||||||
|
PartyMessageRequest:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- from
|
||||||
|
- message
|
||||||
|
- partyId
|
||||||
|
properties:
|
||||||
|
from:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
description: The sender UUID
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
description: The message to send
|
||||||
|
maxLength: 256
|
||||||
|
partyId:
|
||||||
|
type: string
|
||||||
|
format: int32
|
||||||
|
description: The party id
|
||||||
|
|
||||||
|
PunishRequest:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- executor
|
||||||
|
- target
|
||||||
|
- type
|
||||||
|
- reason
|
||||||
|
properties:
|
||||||
|
executor:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
description: The executor UUID
|
||||||
|
target:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
description: The target UUID
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
description: The type of punishment
|
||||||
|
enum:
|
||||||
|
- BAN
|
||||||
|
- MUTE
|
||||||
|
- WARN
|
||||||
|
- FLAG
|
||||||
|
reason:
|
||||||
|
type: string
|
||||||
|
description: The reason for the punishment
|
||||||
|
time:
|
||||||
|
type: string
|
||||||
|
format: duration
|
||||||
|
example: PT30S
|
||||||
|
|||||||
Reference in New Issue
Block a user