{
  "lexicon": 1,
  "id": "tools.ozone.team.addMember",
  "defs": {
    "main": {
      "type": "procedure",
      "description": "Add a member to the ozone team. Requires admin role.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["did", "role"],
          "properties": {
            "did": { "type": "string", "format": "did" },
            "role": {
              "type": "string",
              "knownValues": [
                "tools.ozone.team.defs#roleAdmin",
                "tools.ozone.team.defs#roleModerator",
                "tools.ozone.team.defs#roleVerifier",
                "tools.ozone.team.defs#roleTriage"
              ]
            }
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "ref",
          "ref": "tools.ozone.team.defs#member"
        }
      },
      "errors": [
        {
          "name": "MemberAlreadyExists",
          "description": "Member already exists in the team."
        }
      ]
    }
  }
}
