import { MongoClient, TransactionOptions } from "mongodb"; import { Repository } from "../Repository"; import { IRankManagerOptions } from "../types"; import { RankDocument } from "./RankDocument"; type IGetScoreByRankOptions = { useHighest?: boolean; }; export declare class RankManager { readonly mongoClient: MongoClient; readonly dbName: string; readonly collectionName: string; readonly maxScore: number; readonly minScore: number; readonly branchFactor: number; readonly skipTransaction: boolean; readonly transaction: { maxRetry: number; transactionOptions: TransactionOptions; }; hasInit: boolean; constructor(options: IRankManagerOptions); init(): Promise; addScore(score: number): Promise; removeScore(score: number): Promise; countByScore(score: number): Promise; getRankByScore(score: number): Promise; getScoreByRank(rank: number, options?: IGetScoreByRankOptions): Promise; count(): Promise; getRepository(): Repository; private _getSaveDocumentMetaList; private _getRankDocumentMetaList; private _validate; private _getScoreByRankInternal; private _getMetaRepository; private _getRankMetaListInternal; private _getRankMeta; private _runWithTransaction; } export {};