{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A pending/answered group invite, written into the shared moderation account's (studynext.app) repo by the group-invites ingest endpoint. The invitee's client polls this to show incoming invite notifications. rkey is a deterministic hash of (groupUri, inviteeDid), so re-inviting after a decline overwrites the old response with a fresh pending one instead of accumulating duplicates.",
      "key": "any",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "groupUri": {
            "format": "at-uri",
            "type": "string"
          },
          "inviteeDid": {
            "format": "did",
            "type": "string"
          },
          "inviterDid": {
            "format": "did",
            "type": "string"
          },
          "respondedAt": {
            "format": "datetime",
            "type": "string"
          },
          "role": {
            "knownValues": [
              "supervisor",
              "member"
            ],
            "type": "string"
          },
          "status": {
            "knownValues": [
              "pending",
              "accepted",
              "rejected"
            ],
            "type": "string"
          }
        },
        "required": [
          "groupUri",
          "inviterDid",
          "inviteeDid",
          "role",
          "status",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "app.studynext.groupInvite",
  "lexicon": 1
}
