add bot invocation contracts
This commit is contained in:
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://trixie.invalid/contracts/v1/bot-command-invoke-request.json",
|
||||||
|
"title": "Trixie bot command invocation request",
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["name", "user_id", "permission_level"],
|
||||||
|
"properties": {
|
||||||
|
"name": { "type": "string", "minLength": 1, "maxLength": 64 },
|
||||||
|
"user_id": { "type": "string", "minLength": 1, "maxLength": 64 },
|
||||||
|
"permission_level": { "enum": ["everyone", "subscriber", "moderator", "broadcaster"] },
|
||||||
|
"variables": { "type": "object", "additionalProperties": { "type": "string" } }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://trixie.invalid/contracts/v1/bot-command-invoke-response.json",
|
||||||
|
"title": "Trixie bot command invocation response",
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["status", "response", "remaining_cooldown_seconds", "error"],
|
||||||
|
"properties": {
|
||||||
|
"status": { "enum": ["ok", "cooldown", "not_found", "permission_denied", "error"] },
|
||||||
|
"response": { "type": ["string", "null"] },
|
||||||
|
"remaining_cooldown_seconds": { "type": ["integer", "null"], "minimum": 0 },
|
||||||
|
"error": { "type": ["string", "null"] }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"status": "ok",
|
||||||
|
"response": "Hello Alice",
|
||||||
|
"remaining_cooldown_seconds": null,
|
||||||
|
"error": null
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user