{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "WorkOS web app manifest extension",
  "type": "object",
  "required": ["version", "capabilities"],
  "properties": {
    "version": { "const": 1 },
    "capabilities": {
      "type": "array", "maxItems": 32, "uniqueItems": true,
      "items": { "enum": ["files.read", "files.write", "preferences", "share", "clipboard", "notifications", "camera", "photos"] }
    },
    "commands": {
      "type": "array", "maxItems": 24,
      "items": {
        "type": "object", "required": ["id", "title", "location"],
        "properties": {
          "id": { "type": "string", "minLength": 1, "maxLength": 80 },
          "title": { "type": "string", "minLength": 1, "maxLength": 80 },
          "location": { "enum": ["files", "desktop", "launcher", "window"] },
          "extensions": { "type": "array", "items": { "type": "string", "minLength": 1 } }
        }
      }
    }
  }
}
