/** * @memberof RedisCacheKeysUtils * Redis cache key constants and helper functions */ import type { MarketType } from "@prisma/client"; import type { Redis } from "ioredis"; export declare const levrGamesHashKey = "levr:games:"; export declare const levrMarketsHashKey = "levr:markets:"; export declare const levrOddsListKey = "levr:odds:list:"; export declare const market_index_name = "levr:markets_idx"; export declare const game_index_name = "levr:games_idx"; export declare const LEAGUES_MAP_KEY = "levr:leagues:map"; export declare const cacheLeagueField: (leagueObjectId: string) => string; /** * Get the keyPrefix from a Redis client instance. * This is used to construct full key/index names for FT.* commands which don't auto-prefix. */ export declare const getRedisKeyPrefix: (redis: Redis) => string; /** * Get the fully prefixed index name for games index */ export declare const getGameIndexName: (redis: Redis) => string; /** * Get the fully prefixed index name for markets index */ export declare const getMarketIndexName: (redis: Redis) => string; /** * Get the fully prefixed hash key prefix for games (for FT.CREATE PREFIX) */ export declare const getGameHashKeyPrefix: (redis: Redis) => string; /** * Get the fully prefixed hash key prefix for markets (for FT.CREATE PREFIX) */ export declare const getMarketHashKeyPrefix: (redis: Redis) => string; export declare enum RedisNumStates { success = 1, failure = 0 } /** * Get the Redis key for a game score by gameObjectId * @param gameObjectId - The game object ID * @returns Redis key for the score */ export declare const getScoreHashKey: (gameObjectId: string) => string; /** * Get the Redis hash key for a game by gameObjectId */ export declare const getGameHashKey: (gameObjectId: string) => string; /** * Get the Redis LIST key for odds by gameMarketId * @param gameMarketId - The game market identifier * @returns Redis key for the odds list */ export declare const getOddsListKey: (gameMarketId: string) => string; /** * Get the Redis hash key for market by gameUniqueId and marketType */ export declare const getMarketKeyWithGameUniqueIdMarketType: (gameUniqueId: string, marketType: MarketType) => string; /** @deprecated Not used after game.cache.service removal */ export declare const providerFixtureIdToLevrId = "provider_fixture_id_to_levrId"; /** @deprecated Not used after game.cache.service removal */ export declare const levrIdToProviderIds = "levr_id_to_provider_ids"; /** @deprecated Not used after game.cache.service removal */ export declare const queueBlockHashKey = "queue_block_key"; /** @deprecated Not used after game.cache.service removal */ export declare enum GameCollectionKeys { activeGamesHash = "active_games_hash", postGamesHash = "post_games_hash" } /** @deprecated Not used after game.cache.service removal */ export declare const gameIdsToLevrFixtureIdsMap = "game_ids_to_levr_ids"; /** @deprecated Not used after game.cache.service removal */ export declare const gameIdsToFixtureIds = "game_ids_to_fixture_ids"; /** @deprecated Not used after game.cache.service removal - replaced by getScoreHashKey */ export declare const getGameScoreByFixtureIdHash = "game_scores_by_fixture_id_hash"; /** @deprecated Not used after game.cache.service removal */ export declare const gameToMarketOfOddsInCache = "game_to_market_ids_of_odds_in_cache_"; /** @deprecated Not used after game.cache.service removal */ export declare const marketOddsKey = "market_odds"; /** @deprecated Not used after game.cache.service removal */ export declare const getCachedLevrByFixtureIdKey: (fixtureId: string, chainId: number) => string; /** @deprecated Not used after game.cache.service removal */ export declare const getMarketOddsField: (gameUniqueId: string, marketType: MarketType) => string; /** @deprecated Not used after game.cache.service removal */ export declare const getMarketOddsListHashKey: (marketObjectId: string) => string; /** @deprecated Not used after game.cache.service removal */ export declare const getGamesKeyByChainId: (gameCollectionKey: GameCollectionKeys, chainId: number) => string;