feat: add moderation action contract
This commit is contained in:
@@ -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 }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"action": "timeout",
|
||||||
|
"applied": true
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user