add OAuth scope status contract

This commit is contained in:
2026-10-25 05:05:28 +01:00
parent 2e386c1e63
commit 868e56e5e8
2 changed files with 24 additions and 0 deletions
@@ -0,0 +1,16 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://trixie.reaperofveriod.nl/contracts/v1/twitch-oauth-status-response.json",
"title": "Twitch OAuth scope status response",
"type": "object",
"additionalProperties": false,
"required": ["identity", "connected", "required_scopes", "granted_scopes", "missing_scopes", "reauthorization_required"],
"properties": {
"identity": { "enum": ["streamer", "bot", "moderator"] },
"connected": { "type": "boolean" },
"required_scopes": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
"granted_scopes": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
"missing_scopes": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
"reauthorization_required": { "type": "boolean" }
}
}
@@ -0,0 +1,8 @@
{
"identity": "streamer",
"connected": false,
"required_scopes": ["user:read:chat"],
"granted_scopes": [],
"missing_scopes": ["user:read:chat"],
"reauthorization_required": true
}