[api] chat msg report

This commit is contained in:
Devin Zuczek
2026-09-19 11:21:07 -04:00
parent 69dda96739
commit 5e2fad31df
6 changed files with 304 additions and 14 deletions
+21
View File
@@ -1432,6 +1432,27 @@ export const CreateReportRequest = z.object({
.describe('Instance type name, e.g. `Public`. Stored verbatim'),
})
/**
* `POST /api/chatreport/createChatReport` form body — a report against one chat message.
* Form-encoded, so everything is a string; only `ChatMessageId` is required. Neither the
* reporter (the bearer token) nor the reported player (the message's sender) is in the body.
*/
export const CreateChatReportRequest = z.object({
ChatMessageId: z.string().describe('Id of the message being reported, e.g. `72`'),
ChatThreadId: z
.string()
.optional()
.describe('The thread the message is in. Accepted and unused — the message names its own'),
ReportCategory: z
.string()
.optional()
.describe(
'The reason picked in the report UI, sent as a NAME (`Discriminatory`) where the ' +
'player report sends a number. Mapped onto the numeric category the table stores'
),
ReportDescription: z.string().optional().describe('The free-text description the reporter typed'),
})
/**
* `POST /api/playerwarnings` form body — a warning a moderator hands down. Everything
* is a string on the wire (it's form-encoded); only `WarnedPlayerId` is required. The