Add admin chat endpoint and request schemas for private messages, party messages, and punishments

This commit is contained in:
2026-08-09 15:41:34 +02:00
parent 7f94569575
commit 423d9c9043
11 changed files with 237 additions and 12 deletions
+8
View File
@@ -107,3 +107,11 @@ paths:
$ref: './schemas/chat_info/chat_info.yml#/UserName'
/api/site/chat/send-message/{server}:
$ref: './schemas/server-message/server-message.yml#/sendServerMessage'
/api/site/chat/send-admin-chat/{server}:
$ref: './schemas/server-message/server-message.yml#/sendAdminChat'
/api/site/chat/send-private-message:
$ref: './schemas/server-message/server-message.yml#/sendPrivateMessage'
/api/site/chat/send-party-message:
$ref: './schemas/server-message/server-message.yml#/sendPartyMessage'
/api/site/chat/punish/{server}:
$ref: './schemas/server-message/server-message.yml#/punishPlayer'
@@ -22,7 +22,7 @@ sendServerMessage:
sendAdminChat:
post:
tags:
- admin-chat
- server-message
summary: Send an admin chat to a specific server
operationId: sendAdminChat
parameters:
@@ -40,6 +40,61 @@ sendAdminChat:
description: Server not found or not connected
'400':
description: Invalid request
sendPrivateMessage:
post:
tags:
- server-message
summary: Send a private message
operationId: sendPrivateMessage
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PrivateMessageRequest'
responses:
'202':
description: Message accepted and sent
'400':
description: Invalid request
sendPartyMessage:
post:
tags:
- server-message
summary: Send a party message
operationId: sendPartyMessage
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PartyMessageRequest'
responses:
'202':
description: Message accepted and sent
'400':
description: Invalid request
punishPlayer:
post:
tags:
- server-message
summary: Punish a player on a specific server
operationId: punishPlayer
parameters:
- $ref: '#/components/parameters/Server'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PunishRequest'
responses:
'202':
description: Punishment accepted and applied
'404':
description: Server not found or not connected
'400':
description: Invalid request
components:
parameters:
Server: