{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A confirmed group membership, written into the shared moderation account's (studynext.app) repo by the server when an invite is accepted (or an admin force-adds a member). All clients read this to determine group membership. rkey is a deterministic hash of (groupUri, memberDid), so at most one membership record exists per pair.",
      "key": "any",
      "record": {
        "properties": {
          "groupUri": {
            "format": "at-uri",
            "type": "string"
          },
          "inviteUri": {
            "description": "AT-URI of the groupInvite this membership originated from. Empty string when force-added by an admin without a preceding invite.",
            "type": "string"
          },
          "joinedAt": {
            "format": "datetime",
            "type": "string"
          },
          "memberDid": {
            "format": "did",
            "type": "string"
          },
          "role": {
            "knownValues": [
              "supervisor",
              "member"
            ],
            "type": "string"
          }
        },
        "required": [
          "groupUri",
          "memberDid",
          "role",
          "inviteUri",
          "joinedAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "app.studynext.groupMember",
  "lexicon": 1
}
