Hierarchy

  • BaseGetter
    • Find

Constructors

  • Creates an instance of a Storage getter.

    Parameters

    • storage: Storage

      The implementation of Storage.

    Returns Find

Properties

storage: Storage

Methods

  • Finds a match in a given group. The match must have the given number in a round of which the number in group is given.

    Example: In group of id 1, give me the 4th match in the 3rd round.

    Parameters

    • groupId: Id

      ID of the group.

    • roundNumber: number

      Number of the round in its parent group.

    • matchNumber: number

      Number of the match in its parent round.

    Returns Promise<Match>

  • Finds a match game based on its id or based on the combination of its parent_id and number.

    Parameters

    • game: {
          id?: Id;
          number?: number;
          opponent1?: null | ({ id?: Id | null | undefined; position?: number | undefined; forfeit?: boolean | undefined; score?: number | undefined; result?: Result | undefined; });
          opponent2?: null | ({ id?: Id | null | undefined; position?: number | undefined; forfeit?: boolean | undefined; score?: number | undefined; result?: Result | undefined; });
          parent_id?: Id;
          stage_id?: Id;
          status?: Status;
      }

      Values to change in a match game.

      • Optional id?: Id

        ID of the match game.

      • Optional number?: number

        The number of the match game in its parent match.

      • Optional opponent1?: null | ({ id?: Id | null | undefined; position?: number | undefined; forfeit?: boolean | undefined; score?: number | undefined; result?: Result | undefined; })

        First opponent of the match.

      • Optional opponent2?: null | ({ id?: Id | null | undefined; position?: number | undefined; forfeit?: boolean | undefined; score?: number | undefined; result?: Result | undefined; })

        Second opponent of the match.

      • Optional parent_id?: Id

        ID of the parent match.

      • Optional stage_id?: Id

        ID of the parent stage.

      • Optional status?: Status

        Status of the match.

    Returns Promise<MatchGame>

  • Gets the loser bracket.

    Parameters

    • stageId: Id

      ID of the stage.

    Returns Promise<null | Group>

  • Returns an object with 1 match per group type. Only supports double elimination.

    Parameters

    • matches: Match[]

      A list of matches.

    • fetchedGroups: Map<Id, Group>

      A map of groups which were already fetched.

    Returns Promise<{
        finalGroupMatch?: Match;
        loserBracketMatch?: Match;
        winnerBracketMatch?: Match;
    }>

  • Gets the match(es) where the opponents of the current match will go just after.

    Parameters

    • match: Match

      The current match.

    • matchLocation: GroupType

      Location of the current match.

    • stage: Stage

      The parent stage.

    • roundNumber: number

      The number of the current round.

    • roundCount: number

      Count of rounds.

    Returns Promise<(null | Match)[]>

  • Gets all the rounds that contain ordered participants.

    Parameters

    • stage: Stage

      The stage to get rounds from.

    Returns Promise<Round[]>

  • Gets the matches leading to the given match.

    Parameters

    • match: Match

      The current match.

    • matchLocation: GroupType

      Location of the current match.

    • stage: Stage

      The parent stage.

    • roundNumber: number

      Number of the round.

    Returns Promise<Match[]>

  • Gets the positional information (number in group and total number of rounds in group) of a round based on its id.

    Parameters

    • roundId: Id

      ID of the round.

    Returns Promise<RoundPositionalInfo>

  • Returns the matches which contain the seeding of a stage based on its type.

    Parameters

    • stageId: Id

      ID of the stage.

    • stageType: StageType

      The type of the stage.

    Returns Promise<null | Match[]>

  • Gets the upper bracket (the only bracket if single elimination or the winner bracket in double elimination).

    Parameters

    • stageId: Id

      ID of the stage.

    Returns Promise<Group>

  • Gets the loser bracket.

    Parameters

    • stageId: Id

      ID of the stage.

    Returns Promise<Group>

  • Finds a match in a given group. The match must have the given number in a round of which the number in group is given.

    Example: In group of id 1, give me the 4th match in the 3rd round.

    Parameters

    • groupId: Id

      ID of the group.

    • roundNumber: number

      Number of the round in its parent group.

    • matchNumber: number

      Number of the match in its parent round.

    Returns Promise<Match>

  • Finds a match game based on its id or based on the combination of its parent_id and number.

    Parameters

    • game: Partial<MatchGame>

      Values to change in a match game.

    Returns Promise<MatchGame>

  • Returns the matches following the given match.

    If a participantId is given:

    • If the participant won, the next match from their point of view is returned.
    • If the participant is eliminated, no match is returned.

    Parameters

    • matchId: Id

      ID of the target match.

    • Optional participantId: number

      Optional ID of the participant.

    Returns Promise<Match[]>

  • Returns the matches leading to the given match.

    If a participantId is given, the previous match from their point of view is returned.

    Parameters

    • matchId: Id

      ID of the target match.

    • Optional participantId: number

      Optional ID of the participant.

    Returns Promise<Match[]>

  • Gets the upper bracket (the only bracket if single elimination or the winner bracket in double elimination).

    Parameters

    • stageId: Id

      ID of the stage.

    Returns Promise<Group>

  • Returns the good seeding ordering based on the stage's type.

    Parameters

    • stageType: StageType

      The type of the stage.

    • create: StageCreator

      A reference to a Create instance.

    Returns SeedOrdering

Generated using TypeDoc