feat: add moderation action contract

This commit is contained in:
2026-10-25 04:49:34 +01:00
parent c63806b094
commit 8c84e45bf9
3 changed files with 31 additions and 0 deletions
@@ -0,0 +1,15 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://trixie.reaperofveriod.nl/contracts/v1/moderation-action-request.json",
"title": "Twitch moderation action",
"type": "object",
"additionalProperties": false,
"required": ["action", "user_id"],
"properties": {
"action": { "enum": ["ban", "timeout", "unban", "delete_message"] },
"user_id": { "type": "string", "minLength": 1, "maxLength": 64 },
"duration_seconds": { "type": "integer", "minimum": 1, "maximum": 1209600 },
"reason": { "type": "string", "maxLength": 500 },
"message_id": { "type": "string", "maxLength": 128 }
}
}
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://trixie.reaperofveriod.nl/contracts/v1/moderation-action-response.json",
"title": "Twitch moderation action response",
"type": "object",
"additionalProperties": false,
"required": ["action", "applied"],
"properties": {
"action": { "type": "string" },
"applied": { "const": true }
}
}