recruitment#
Recruitment drive schemas: constants, enums, the addon export/import additions, and the site HTTP API.
local://recruitment-contract.md is the source of truth. A drive is a GuildEvent of kind recruitment
(sidequest_common.schemas.events.EventKind.RECRUITMENT) running 14 days by default; the inviter with the most
recruits who stay RECRUIT_STAY_DAYS days and reach RECRUIT_MIN_LEVEL wins DRIVE_PRIZE_COPPER, ties each
win it, settled DRIVE_SETTLE_DAYS after the drive ends. Who invited whom comes from
the in-game guild log (ExportGuildLogEntry), not the addon.
- sidequest_common.schemas.recruitment.DRIVE_PRIZE_COPPER = 100000#
10g, paid to the inviter(s) with the most qualifying recruits in a drive. Ties each win it.
- sidequest_common.schemas.recruitment.RECRUIT_MIN_LEVEL = 10#
- sidequest_common.schemas.recruitment.RECRUIT_STAY_DAYS = 7#
- sidequest_common.schemas.recruitment.DRIVE_SETTLE_DAYS = 7#
Payouts settle this many days after the drive’s
ends_at.
- sidequest_common.schemas.recruitment.DRIVE_DEFAULT_DAYS = 14#
The site form’s default drive length.
- sidequest_common.schemas.recruitment.RECRUIT_JOIN_WINDOW#
A join must follow its invite within this window, else the recruit is
never_joined.
- sidequest_common.schemas.recruitment.MAX_GUILD_LOG_ENTRIES = 500#
- sidequest_common.schemas.recruitment.MAX_RECRUIT_PAYOUTS_PAID = 200#
- sidequest_common.schemas.recruitment.MAX_RECRUITMENT_LEADERS = 15#
Cap on
RecruitmentTally.leaders, the most relevant inviters for the forum starter post.
- sidequest_common.schemas.recruitment.GUILD_LOG_DEDUPE_WINDOW#
A re-uploaded guild log row with the same kind/actor/target within this window of a stored row is the same entry.
- sidequest_common.schemas.recruitment.RECRUIT_NAME_MAX_LENGTH = 64#
Matches the addon’s character name format (
roster.members[].character).
- class sidequest_common.schemas.recruitment.GuildLogKind[source]#
Bases:
enum.StrEnumOne kind of in-game guild event log entry (
QueryGuildEventLog/GetGuildEventInfo).- INVITE = 'invite'#
- JOIN = 'join'#
- QUIT = 'quit'#
- REMOVE = 'remove'#
- class sidequest_common.schemas.recruitment.DriveRecruitStatus[source]#
Bases:
enum.StrEnumWhere one recruit is in a drive’s 7-day qualification clock.
- INVITED = 'invited'#
- COUNTING = 'counting'#
- QUALIFIED = 'qualified'#
- DISQUALIFIED = 'disqualified'#
- class sidequest_common.schemas.recruitment.DriveRecruitReason[source]#
Bases:
enum.StrEnumWhy a recruit is
disqualified. Only set alongsideDriveRecruitStatus.DISQUALIFIED.- RETURNING = 'returning'#
- OWN_ALT = 'own_alt'#
- LEFT = 'left'#
- LOW_LEVEL = 'low_level'#
- NEVER_JOINED = 'never_joined'#
- class sidequest_common.schemas.recruitment.PaidVia[source]#
Bases:
enum.StrEnumHow a recruit’s payout was marked paid: the site’s “Mark paid” button, or the addon’s mail-send button.
- SITE = 'site'#
- ADDON = 'addon'#
- class sidequest_common.schemas.recruitment.ExportGuildLogEntry[source]#
Bases:
pydantic.BaseModelOne
SQX1:guild event log row (maxMAX_GUILD_LOG_ENTRIES).atis rounded down to the hour.actoris the inviter forinvite, the member forjoin/quit, or the removing officer forremove;targetis the invitee forinviteor the removed member forremove, and omitted forjoin/quit.promote/demoteentries are never exported.- kind: GuildLogKind#
- actor: str#
- target: str | None#
- at: int#
- class sidequest_common.schemas.recruitment.ExportRecruitPayoutPaid[source]#
Bases:
pydantic.BaseModelOne
SQX1:row for a payout the addon’s mail button already sent (maxMAX_RECRUIT_PAYOUTS_PAID).- event_id: uuid.UUID#
- inviter: str#
- copper: int#
- at: int#
- officer: str#
- class sidequest_common.schemas.recruitment.GuildLogImportCounts[source]#
Bases:
pydantic.BaseModelCounts for the
guild_logsection of one import.mergedmatches a stored row within the dedupe window.- new: int = 0#
- merged: int = 0#
- class sidequest_common.schemas.recruitment.RecruitPayoutImportCounts[source]#
Bases:
pydantic.BaseModelCounts for the
recruit_payouts_paidsection of one import.already_paidis the idempotent no-op case.- new: int = 0#
- already_paid: int = 0#
- class sidequest_common.schemas.recruitment.GameImportRecruitPayout[source]#
Bases:
pydantic.BaseModelOne
SQI1:officer payout row: a drive’s winning inviter (most qualifying recruits, ties each win).- event_id: uuid.UUID#
- title: str#
- inviter: str#
- copper: int#
- recruits: list[str]#
- settles_at: int#
- sidequest_common.schemas.recruitment.MAX_IMPORT_DRIVE_RECRUITS = 50#
Cap on
GameImportDrive.recruits, the most relevant recruit rows for the addon’s Events tab.
- class sidequest_common.schemas.recruitment.GameImportDriveLeader[source]#
Bases:
pydantic.BaseModelOne inviter on a drive’s leaderboard in the
SQI1:import.- inviter: str#
- invited: int#
- counting: int#
- qualified: int#
- class sidequest_common.schemas.recruitment.GameImportDriveRecruit[source]#
Bases:
pydantic.BaseModelOne recruit’s state in the
SQI1:import.- recruit: str#
- inviter: str#
- status: DriveRecruitStatus#
- reason: DriveRecruitReason | None = None#
- qualifies_at: int | None#
- class sidequest_common.schemas.recruitment.GameImportDrive[source]#
Bases:
pydantic.BaseModelGameImportEvent.recruitment: a drive’s leaderboard and recruits for the addon’s Events tab.recruitsis ordered counting first (soonestqualifies_atfirst), then invited (newest invite first), then qualified (newest first), then disqualified (newest first), truncated toMAX_IMPORT_DRIVE_RECRUITS.- leaders: list[GameImportDriveLeader]#
- recruits: list[GameImportDriveRecruit]#
- class sidequest_common.schemas.recruitment.RecruitmentDriveTotals[source]#
Bases:
pydantic.BaseModelHeadcounts across a drive’s recruits, by
DriveRecruitStatusplus how many are paid.- invited: int#
- joined: int#
- counting: int#
- qualified: int#
- disqualified: int#
- paid: int#
- class sidequest_common.schemas.recruitment.RecruitLeader[source]#
Bases:
pydantic.BaseModelOne inviter’s standing in a drive’s leaderboard.
- inviter: str#
- member_name: str | None#
- discord_id: str | None#
- invited: int#
- joined: int#
- counting: int#
- qualified: int#
- class sidequest_common.schemas.recruitment.DriveRecruit[source]#
Bases:
pydantic.BaseModelOne recruit’s row in a drive’s detail, including their qualification clock and pay state.
- recruit: str#
- inviter: str#
- invited_at: datetime.datetime#
- joined_at: datetime.datetime | None#
- qualifies_at: datetime.datetime | None#
- status: DriveRecruitStatus#
- reason: DriveRecruitReason | None#
- paid_at: datetime.datetime | None#
- class sidequest_common.schemas.recruitment.RecruitmentDrive[source]#
Bases:
pydantic.BaseModelGET /api/events/{event_id}/recruitment: one drive’s full detail, leaderboard, and recruit rows.- event_id: uuid.UUID#
- title: str#
- starts_at: datetime.datetime#
- ends_at: datetime.datetime#
- settles_at: datetime.datetime#
- reward_copper: int#
- min_level: int#
- stay_days: int#
- totals: RecruitmentDriveTotals#
- leaders: list[RecruitLeader]#
- recruits: list[DriveRecruit]#
- class sidequest_common.schemas.recruitment.RecruitPayout[source]#
Bases:
pydantic.BaseModelGET /api/recruitment/payouts: one winning inviter’s owed (or already-paid) prize for one settled drive.- event_id: uuid.UUID#
- title: str#
- settles_at: datetime.datetime#
- inviter: str#
- member_name: str | None#
- recruits: list[str]#
- copper: int#
- paid_at: datetime.datetime | None#
- paid_by: str | None#
- class sidequest_common.schemas.recruitment.RecruitPayoutMarkPaid[source]#
Bases:
pydantic.BaseModelBody for
POST /api/recruitment/payouts/paid(officer). Idempotent.- event_id: uuid.UUID#
- inviter: str#
- class sidequest_common.schemas.recruitment.RecruitmentTally[source]#
Bases:
pydantic.BaseModelDiscordEventPush.recruitment: a drive’s live leaderboard, for the forum starter post.- reward_copper: int#
- settles_at: datetime.datetime#
- invited: int#
- joined: int#
- qualified: int#
- leaders: list[RecruitLeader]#
- class sidequest_common.schemas.recruitment.RecruitShoutout[source]#
Bases:
pydantic.BaseModelOne qualified recruit’s shout-out, queued to post as a comment on the drive’s forum thread.
- id: uuid.UUID#
- thread_id: int#
- event_id: uuid.UUID#
- inviter: str#
- inviter_discord_id: int | None#
- recruit: str#
- reward_copper: int#