Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

db

db: Firestore

matchesCollection

matchesCollection: CollectionReference<MatchCollectionData>

name

name: string = "FireStore"

tournamentConfigsCollection

tournamentConfigsCollection: CollectionReference<TournamentConfigsCollectionData>

type

type: Type = Plugin.Type.DATABASE

userCollection

userCollection: CollectionReference<User>

Methods

connect

  • connect(): Promise<Firestore>

deleteUser

  • deleteUser(usernameOrID: string): Promise<void>

getMatch

  • getMatch(id: NanoID): Promise<any>

getPlayerMatches

  • getPlayerMatches(playerID: nanoid, governID: nanoid, offset?: number, limit?: number, order?: number): Promise<Array<Match>>

getTournamentConfigs

getTournamentConfigsModificationDate

  • getTournamentConfigsModificationDate(tournamentID: nanoid): Promise<Date>

getUser

  • getUser(usernameOrID: string, publicView?: boolean): Promise<User>

Private getUserDoc

  • getUserDoc(usernameOrID: string): Promise<QueryDocumentSnapshot<User>>

getUsersInTournament

  • getUsersInTournament(tournamentKey: string, offset?: number, limit?: number): Promise<Array<User>>

initialize

  • initialize(): Promise<void>

isAdmin

loginUser

  • loginUser(username: string, password: string): Promise<string>

manipulate

  • manipulate(dimension: Dimension): Promise<void>

registerUser

  • registerUser(username: string, password: string, userData?: any): Promise<any>

storeMatch

  • storeMatch(match: Match, governID: nanoid): Promise<any>

storeTournamentConfigs

updateUser

  • updateUser(usernameOrID: string, update: Partial<User>): Promise<User>

verifyToken

  • verifyToken(jwt: string): Promise<string>

Object literals

configs

configs: object

Default configs

saveMatches

saveMatches: true = true

saveTournamentMatches

saveTournamentMatches: true = true

Generated using TypeDoc