{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A community's members, requests, invitations or removals. Moderators only: the community account and the accounts its managing app names. Served by the managing app named in the community space's policy, at its #umbrae_app endpoint, with atproto service auth (iss the caller, aud the managing app, lxm this method); clients call through their PDS with atproto-proxy set to the policy's managingApp. Any managing app may serve it: a serving app, or a PDS that manages its own communities.",
      "errors": [
        {
          "description": "Not a community this managing app manages.",
          "name": "CommunityNotFound"
        },
        {
          "description": "The caller lacks the role this needs.",
          "name": "NotAllowed"
        },
        {
          "description": "The managing app doesn't admit this account.",
          "name": "NotAdmitted"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "members": {
              "items": {
                "ref": "#member",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "members"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "community": {
            "description": "The community account's DID.",
            "format": "did",
            "type": "string"
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "state": {
            "knownValues": [
              "member",
              "requested",
              "invited",
              "removed"
            ],
            "type": "string"
          }
        },
        "required": [
          "community"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "member": {
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "handle": {
          "format": "handle",
          "type": "string"
        },
        "role": {
          "knownValues": [
            "member",
            "moderator"
          ],
          "type": "string"
        },
        "since": {
          "format": "datetime",
          "type": "string"
        },
        "state": {
          "knownValues": [
            "member",
            "requested",
            "invited",
            "removed"
          ],
          "type": "string"
        }
      },
      "required": [
        "did",
        "role",
        "state",
        "since"
      ],
      "type": "object"
    }
  },
  "id": "tools.umbrae.community.listMembers",
  "lexicon": 1
}
