{
  "id": "ctzn.network/community-set-member-roles-method",
  "title": "Set member roles method",
  "description": "Assign or unassign roles to a member of the community.",
  "type": "dbmethod",
  "parameters": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "required": ["member", "roles"],
    "properties": {
      "member": {
        "type": "object",
        "required": ["dbUrl", "userId"],
        "properties": {
          "dbUrl": {
            "type": "string",
            "format": "uri"
          },
          "userId": {
            "type": "string",
            "pattern": ".+@.+"
          }
        }
      },
      "roles": {
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    }
  },
  "definition": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "required": ["key", "url"],
    "properties": {
      "key": {"type": "string"},
      "url": {"type": "string", "format": "uri"}
    }
  }
}