All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.src.internal.leaderboard-data-client.d.ts Maven / Gradle / Ivy

The newest version!
import { LeaderboardDelete, LeaderboardFetch, LeaderboardLength, LeaderboardRemoveElements, LeaderboardUpsert, LeaderboardOrder } from '@gomomento/sdk-core';
import { leaderboard } from '@gomomento/generated-types/dist/leaderboard';
import { ILeaderboardDataClient } from '@gomomento/sdk-core/dist/src/internal/clients/leaderboard/ILeaderboardDataClient';
import { LeaderboardClientAllProps } from './leaderboard-client-all-props';
export declare const CONNECTION_ID_KEY: unique symbol;
export declare class LeaderboardDataClient implements ILeaderboardDataClient {
    private readonly configuration;
    private readonly credentialProvider;
    private readonly logger;
    private readonly cacheServiceErrorMapper;
    private readonly requestTimeoutMs;
    private readonly clientWrappers;
    protected nextDataClientIndex: number;
    private readonly interceptors;
    /**
     * @param {LeaderboardClientAllProps} props
     * @param dataClientID
     */
    constructor(props: LeaderboardClientAllProps, dataClientID: string);
    close(): void;
    private validateRequestTimeout;
    private initializeInterceptors;
    private createMetadata;
    private convertMapOrRecordToElementsList;
    upsert(cacheName: string, leaderboardName: string, elements: Record | Map): Promise;
    private sendUpsert;
    fetchByScore(cacheName: string, leaderboardName: string, minScore?: number, maxScore?: number, order?: LeaderboardOrder, offset?: number, count?: number): Promise;
    private sendFetchByScore;
    fetchByRank(cacheName: string, leaderboardName: string, startRank: number, endRank: number, order?: LeaderboardOrder): Promise;
    private sendFetchByRank;
    getRank(cacheName: string, leaderboardName: string, ids: Array, order?: LeaderboardOrder): Promise;
    private sendGetRank;
    length(cacheName: string, leaderboardName: string): Promise;
    private sendLength;
    removeElements(cacheName: string, leaderboardName: string, ids: Array): Promise;
    private sendRemoveElements;
    delete(cacheName: string, leaderboardName: string): Promise;
    private sendDelete;
    protected getNextDataClient(): leaderboard.LeaderboardClient;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy