- Tables
- AllTeamAllTeamMemberArtArtUserMetadataAssociationMemberAvailabilityWeekBadgeBuildBuildWeaponCalendarEventCalendarEventDateCalendarEventResultPlayerCalendarEventResultTeamFriendshipGroupMatchGroupMemberIngestedMatchLFGPostLobbyLobbyResultLobbySetMapResultPendingTrophyPlayerResultPlusSuggestionPlusTierReportedWeaponSavedCalendarEventScrimMapScrimPostScrimPostRequestScrimPostRequestUserScrimPostUserSkillSplatoonPlayerTeamEventTeamEventMemberTeamMemberWithSecondaryTournamentTournamentBadgeOwnerTournamentMatchTournamentMatchGameResultTournamentMatchGameResultParticipantTournamentMatchVodTournamentOrganizationTournamentOrganizationSeriesTournamentResultTournamentStaffTournamentStageTournamentTeamTournamentTeamMemberTrophyTrophyOwnerUnvalidatedUserSubmittedImageUserUserSubmittedImageUserWeaponPoolVideoVideoMatchVideoMatchPlayerXRankPlacement
- Calls
- no other repositories
- Imports
- no other modules
- Used by
- 1 loader3 modules2 scripts
Types
The LFG post types the feed matches against each other
export type FeedLFGPostType = "PLAYER_FOR_TEAM" | "TEAM_FOR_PLAYER";
typeOrganizationTournament
no JSDoc:537 export type OrganizationTournament = NonNullable<
Awaited<ReturnType<typeof findLatestOrganizationTournamentStartingBetween>>
>;
typeFeedScrimPost
no JSDoc:1384 export type FeedScrimPost = Unwrapped<
ReturnType<typeof scrimPostFeedQuery>["execute"]
>;
typeSiteTotal
no JSDoc:1994 export type SiteTotal = keyof typeof SITE_TOTAL_TIMES;
Functions & values
functionfindUsersByIds
no JSDoc:28 export function findUsersByIds(userIds: number[])
functionfindTournamentsByIds
no JSDoc:38 export function findTournamentsByIds(tournamentIds: number[])
functionfindTournamentTeamsByIds
no JSDoc:61 export function findTournamentTeamsByIds(tournamentTeamIds: number[])
functionfindTeamsByIds
no JSDoc:100 export function findTeamsByIds(teamIds: number[])
Users as chat message authors, for the comments of a post.
export function findCommentAuthorsByIds(
userIds: number[],
): Promise<ChatMessageAuthor[]>
functionfindLatestGroupMatchCreatedAt
:146 Latest moment anything was played in SendouQ, the "now" of the feed test page so old database snapshots look alive.
export async function findLatestGroupMatchCreatedAt()
functionfindLatestSkillCreatedAt
:158 When the user's SendouQ rating of the season last changed, i.e. their latest set
export async function findLatestSkillCreatedAt({
userId,
season,
}: {
userId: number;
season: number;
})functionfindMatchTimesByUserId
:177 Start times of the user's SendouQ matches and tournament games since after
export async function findMatchTimesByUserId({
userId,
after,
}: {
userId: number;
after: number;
})functionfindMapResultsByUserId
no JSDoc:214 export function findMapResultsByUserId({
userId,
season,
}: {
userId: number;
season: number;
})functionfindTopCloseRivalryOfUsers
:235 The users' most played opponent this season among the ones where neither side has a clear lead in sets
export function findTopCloseRivalryOfUsers({
userIds,
season,
}: {
userIds: number[];
season: number;
})functionfindTopTeammatesByUserId
:278 The SendouQ teammates of the user by sets played together, most first.
export function findTopTeammatesByUserId(userId: number)
functionfindWeaponPicksByUser
:304 How many maps each player played on each weapon in SendouQ matches created in [from, to)
export function findWeaponPicksByUser({
from,
to,
}: {
from: number;
to: number;
})functionfindAllLobbiesEndedAfter
:326 Lobbies that ended after after with who played in them and their top three, latest first.
export function findAllLobbiesEndedAfter(after: number)
functionfindTournamentMatchesByTeamId
:373 Bracket matches of a tournament team, in bracket order.
export function findTournamentMatchesByTeamId({
tournamentId,
tournamentTeamId,
}: {
tournamentId: number;
tournamentTeamId: number;
})functionfindFinishedMatchesByTournamentIds
no JSDoc:412 export function findFinishedMatchesByTournamentIds(tournamentIds: number[])
functionfindSeedsByTournamentTeamIds
no JSDoc:433 export function findSeedsByTournamentTeamIds(tournamentTeamIds: number[])
functionfindAllUpcomingRegistrations
:444 Everyone registered to a tournament starting after after, soonest first.
export function findAllUpcomingRegistrations(after: number)
functionfindAllLookingTournamentTeams
:477 Teams of two or more on the LFG of a tournament starting after after, with when their roster last changed.
export function findAllLookingTournamentTeams(after: number)
functionfindLatestOrganizationTournamentStartingBetween
:542 The organization tournament announced last that starts in the range.
export function findLatestOrganizationTournamentStartingBetween({
from,
to,
}: {
from: number;
to: number;
})functionfindAllOrganizationTournamentsAddedAfter
:557 Organization tournaments added to the calendar after after, latest first.
export function findAllOrganizationTournamentsAddedAfter(after: number)
functionfindOrganizationIdsPlayedByUserId
:603 Organizations whose tournaments that started after after the user has a result in.
export async function findOrganizationIdsPlayedByUserId({
userId,
after,
}: {
userId: number;
after: number;
})functionfindSeriesWithLeaderboard
no JSDoc:628 export function findSeriesWithLeaderboard()
functionfindSeriesEventsWithResults
:642 An organization's visible events with results matching any of the series name substrings, started between from and to.
export function findSeriesEventsWithResults({
organizationId,
substringMatches,
from,
to,
}: {
organizationId: number;
substringMatches: string[];
from: number;
to: number;
})functionfindResultUserIds
:692 Everyone with a result in any of the tournaments or in any of the hand-reported calendar events
export async function findResultUserIds({
tournamentIds,
calendarEventIds,
}: {
tournamentIds: number[];
calendarEventIds: number[];
})functionfindOrganizationById
no JSDoc:727 export function findOrganizationById(organizationId: number)
functionfindLatestTournamentMatchVods
:750 The latest tournament match VoDs, latest first.
export function findLatestTournamentMatchVods()
Owners of the badges of tournaments that started after after, latest tournament first.
export function findAllTournamentBadgeOwnersStartedAfter(after: number)
functionfindLatestTrophyOwners
:810 The owners of the trophies of the latest tournaments, latest first.
export function findLatestTrophyOwners()
functionfindAllNewTrophiesAcceptedAfter
:829 Trophies added (not edits of existing ones) after after with who made them, latest first.
export function findAllNewTrophiesAcceptedAfter(after: number)
functionfindAllUpcomingTournamentSaves
:857 Who saved which upcoming tournaments and when, of userIds or of everyone when left out.
export function findAllUpcomingTournamentSaves({
after,
userIds,
}: {
after: number;
userIds?: number[];
})functionfindAllUpcomingStaff
:890 Staff of the tournaments starting after after, soonest first.
export function findAllUpcomingStaff(after: number)
functionfindBiggestFinalizedTournaments
:913 Finalized public tournaments that started in the range (optionally on a day of the year, MM-DD in UTC), best tier and most teams first.
export function findBiggestFinalizedTournaments({
from,
to,
monthDay,
limit,
}: {
from: number;
to: number;
monthDay?: string;
limit: number;
})functionfindPodiumTeamIdsByTournamentId
:954 The best placed team of each of the top three placements of a tournament.
export function findPodiumTeamIdsByTournamentId(tournamentId: number)
functionfindTournamentsWithRegistrationClosedBetween
:969 Public tournaments whose registration closed in the range, before they started.
export function findTournamentsWithRegistrationClosedBetween({
from,
to,
}: {
from: number;
to: number;
})functionfindRegisteredTeamsByTournamentId
:993 Registered teams of a tournament with their members, placeholder and dropped out teams left out.
export async function findRegisteredTeamsByTournamentId(tournamentId: number)
functionfindSeriesByOrganizationId
no JSDoc:1005 export function findSeriesByOrganizationId(organizationId: number)
functioncountSeriesWinsOfUser
:1017 How many of an organization's events matching any of the name substrings the user has won, up to before.
export async function countSeriesWinsOfUser({
userId,
organizationId,
substringMatches,
before,
}: {
userId: number;
organizationId: number;
substringMatches: string[];
before: number;
})functionfindAllTeamJoinsAfter
:1104 Joins to teams that still have the member, after after, latest first.
export function findAllTeamJoinsAfter(after: number)
functionfindAllCreatedTeamsAfter
:1122 Teams created after after that still exist, latest first.
export function findAllCreatedTeamsAfter(after: number)
functionfindLatestTeamAvailabilityWeek
:1139 The latest week where at least minMembers of one team filled their availability.
export function findLatestTeamAvailabilityWeek({
before,
minMembers,
teamIds,
}: {
before: number;
minMembers: number;
/** Only these teams, any team when not given */
teamIds?: number[];
})functionfindLatestAddedUpcomingTeamEvent
:1184 The latest added team event that hasn't started by now, with who it's for, not authored by excludeAuthorId.
export function findLatestAddedUpcomingTeamEvent({
now,
excludeAuthorId,
teamIds,
}: {
now: number;
excludeAuthorId: number;
/** Only these teams, any team when not given */
teamIds?: number[];
})functionfindOpenScrimPostsForViewer
:1235 Team scrim posts still open for requests at now that the viewer can see or has requested: not canceled, nothing accepted, not started yet ("looking now" posts until lookingNowFrom). Posts the viewer is in or of excludedTeamIds are left out, as are ones created before createdAfter unless the viewer requested them after it.
export function findOpenScrimPostsForViewer({
viewerId,
excludedTeamIds,
now,
lookingNowFrom,
createdAfter,
}: {
viewerId: number;
excludedTeamIds: number[];
now: number;
lookingNowFrom: number;
createdAfter: number;
})functionfindLatestUpcomingScrimPost
:1315 The latest team scrim post starting between from and to of anyone, for the feed test page.
export function findLatestUpcomingScrimPost({
from,
to,
}: {
from: number;
to: number;
})functionfindAcceptedScrimsOfTeams
:1331 Accepted, non-canceled scrims of the teams booked to start between from and to, with the team ids of both sides.
export function findAcceptedScrimsOfTeams({
teamIds,
from,
to,
}: {
teamIds: number[];
from: number;
to: number;
})functionfindMemberLutiDivsByTeamIds
:1370 The LUTI divs of the current members of the teams who have one.
export function findMemberLutiDivsByTeamIds(teamIds: number[])
functionfindLatestReportedScrim
:1432 The latest scrim with at least minMaps reported maps, with its maps and both teams.
export function findLatestReportedScrim({
before,
minMaps,
teamIds,
}: {
before: number;
minMaps: number;
/** Only scrims these teams played in, any scrim when not given */
teamIds?: number[];
})functionfindLFGPostsUpdatedBetween
:1511 Posts of the type bumped in [from, to) that the viewer can see on the LFG page: not their own and not limited to a Plus tier above theirs. Newest first, with the ids of the post's team members.
export function findLFGPostsUpdatedBetween({
type,
viewerId,
from,
to,
}: {
type: FeedLFGPostType;
viewerId: number;
from: number;
to: number;
})functionfindLFGPostsByAuthorId
:1549 The user's LFG posts bumped at or after after, with the ids of each post's team members.
export function findLFGPostsByAuthorId({
authorId,
after,
}: {
authorId: number;
after: number;
})functionfindWeaponPoolByUserId
no JSDoc:1583 export function findWeaponPoolByUserId(userId: number)
functionfindAllTeamMemberships
:1594 Every current team membership with when the team was created.
export function findAllTeamMemberships()
functioncountTournamentsByTeamId
no JSDoc:1608 export async function countTournamentsByTeamId(teamId: number)
functionfindAllArtistsActiveBetween
:1623 Everyone who posted art in the range with how much, most first.
export function findAllArtistsActiveBetween({
from,
to,
}: {
from: number;
to: number;
})functionfindArtPiecesOfAuthorBetween
:1647 The artist's latest pieces posted in the range.
export function findArtPiecesOfAuthorBetween({
authorId,
from,
to,
}: {
authorId: number;
from: number;
to: number;
})functionfindAllTaggedArtAfter
:1676 Art with users tagged in it posted after after, one row per tagged user, latest first.
export function findAllTaggedArtAfter(after: number)
functionfindAllOpenedCommissionsAfter
:1698 Artists who opened commissions after after and have art to show, latest first.
export function findAllOpenedCommissionsAfter(after: number)
functionfindAllPublicBuildIdsUpdatedAfter
:1742 Public builds updated after after, latest first.
export function findAllPublicBuildIdsUpdatedAfter(after: number)
functionfindBuildById
no JSDoc:1752 export function findBuildById(buildId: number)
functionfindLatestBuildIdsOfHighXpOwners
:1757 For every weapon, the public build of it updated last by someone whose peak X Power is above minPeakXp.
export function findLatestBuildIdsOfHighXpOwners(minPeakXp: number)
functionfindLatestVideo
no JSDoc:1782 export async function findLatestVideo(before: number)
functionfindAllUserPlacementsOfLatestMonth
:1824 The X Rank placements of sendou.ink users from the latest month there are any, best first.
export async function findAllUserPlacementsOfLatestMonth()
functionfindAllScannedMatchIdsWithReplayCode
:1856 Scanned matches with a replay code created before before, latest first.
export function findAllScannedMatchIdsWithReplayCode(before: number)
functionfindScannedMatchById
no JSDoc:1869 export function findScannedMatchById(id: number)
functionfindAllFriendshipsCreatedAfter
:1880 Friendships formed after after, latest first.
export function findAllFriendshipsCreatedAfter(after: number)
functionfindPlusTierByUserId
:1894 The Plus Server tier the user is a member of, null when they aren't.
export async function findPlusTierByUserId(userId: number)
functionfindAllFirstPlusSuggestionsOfMonth
:1905 First suggestion of each player suggested in the voting month, leaving out players already in the tier or above, latest first.
export function findAllFirstPlusSuggestionsOfMonth({
month,
year,
}: {
month: number;
year: number;
})functionfindFirstTournamentResultByUserId
no JSDoc:1939 export function findFirstTournamentResultByUserId(userId: number)
functionfindLatestAddedUpcomingCalendarEvent
no JSDoc:1960 export function findLatestAddedUpcomingCalendarEvent(after: number)
functioncountSiteTotal
:1997 Users, SendouQ sets, tournaments or art pieces there were at before.
export async function countSiteTotal({
total,
before,
}: {
total: SiteTotal;
before: number;
})functionfindNthOfSiteTotal
:2014 When the nth user, SendouQ set, tournament or art piece was created, 0 if unknown.
export async function findNthOfSiteTotal({
total,
nth,
}: {
total: SiteTotal;
nth: number;
})