{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://schemas.kiberonlabs.com/api-key-scopes/v1.0.0/schema.json",
    "title": "Kiberon Labs API Key Scopes",
    "description": "The authoritative set of scopes that may be granted to Kiberon Labs organization API keys.",
    "type": "array",
    "minItems": 1,
    "uniqueItems": true,
    "items": {
        "$ref": "#/$defs/scope"
    },
    "$defs": {
        "scope": {
            "title": "API Key Scope",
            "description": "A permission granted to a Kiberon Labs organization API key.",
            "oneOf": [
                {
                    "const": "read:projects",
                    "title": "Projects",
                    "description": "Read project details and status."
                },
                {
                    "const": "read:documents",
                    "title": "Documents",
                    "description": "Read documents shared with the organization."
                },
                {
                    "const": "read:timeline",
                    "title": "Timeline",
                    "description": "Read project timeline updates."
                },
                {
                    "const": "read:messages",
                    "title": "Messages",
                    "description": "Read organization messages."
                },
                {
                    "const": "write:messages",
                    "title": "Send messages",
                    "description": "Send messages to the Kiberon Labs team."
                }
            ]
        }
    }
}