Source code for sidequest_common.schemas.role_resets

 1"""Discord role-reset outbox, reported to the bot so it can strip a deleted account's Discord roles.
 2
 3The bot polls ``GET /api/guilds/{guild_id}/role-resets`` for members whose site account was deleted and still
 4need every manageable Discord role stripped (gate role excepted, since ``link_roles`` re-grants it once the
 5member is unlinked). ``POST .../role-resets/{id}/ack`` tells the API the bot has acted (or that the member is no
 6longer in the guild, in which case it's acked without any role changes).
 7"""
 8
 9from datetime import datetime
10from uuid import UUID
11
12from pydantic import BaseModel
13
14
[docs] 15class RoleResetCandidate(BaseModel): 16 """One pending role reset, oldest first.""" 17 18 id: UUID 19 discord_id: int 20 requested_at: datetime