import { Model, DataTypes, type Sequelize } from 'sequelize'; import { LRUCache } from 'lru-cache'; import IORedis, { type Redis } from 'ioredis'; import type { KythiaConfig } from '../types/KythiaConfig'; import type { CacheStats, KythiaModelDependencies, CacheEntry, KythiaModelStructure } from '../types/KythiaModel'; import type { KythiaLogger } from '@src/types'; import type { MetricsManager } from '@src/managers/MetricsManager'; export declare class KythiaModel, TCreationAttributes extends object = T> extends Model { static client: import('discord.js').Client; static redis: Redis | undefined; static isRedisConnected: boolean; static logger: KythiaLogger; static config: KythiaConfig | {}; static metrics: MetricsManager | undefined; static CACHE_VERSION: string; static localCache: LRUCache; static MAX_LOCAL_CACHE_SIZE: number; static DEFAULT_TTL: number; static NEGATIVE_CACHE_TTL?: number; static DRIFT_CHECK_ENABLED: boolean; static DRIFT_CHECK_RATE: number; static driftStats: { checked: number; drifted: number; healed: number; errors: number; }; static lastRedisOpts: string[] | null; static reconnectTimeout: NodeJS.Timeout | null; static lastAutoReconnectTs: number; static pendingQueries: Map>; static cacheStats: CacheStats; static redisErrorTimestamps: number[]; static isShardMode: boolean; static isShuttingDown: boolean; static _redisFallbackURLs: string[]; static _redisCurrentIndex: number; static _redisFailedIndexes: Set; static _justFailedOver: boolean; static fillable?: string[]; static guarded?: string[]; static structure?: KythiaModelStructure; static table?: string; static cacheKeys?: (string | string[])[]; static CACHE_KEYS?: string[]; static CACHE_TTL?: number; static customInvalidationTags?: string[]; static useRedis: boolean; static init(attributes: import('sequelize').ModelAttributes>, options: import('sequelize').InitOptions): unknown; static hasOne(target: import('sequelize').ModelStatic, options?: import('sequelize').HasOneOptions): import('sequelize').HasOne; static belongsTo(target: import('sequelize').ModelStatic, options?: import('sequelize').BelongsToOptions): import('sequelize').BelongsTo; static hasMany(target: import('sequelize').ModelStatic, options?: import('sequelize').HasManyOptions): import('sequelize').HasMany; static belongsToMany(target: import('sequelize').ModelStatic, options?: import('sequelize').BelongsToManyOptions): import('sequelize').BelongsToMany; static autoBoot(sequelize: Sequelize): Promise; static _mapDbTypeToSequelize(dbType: string): DataTypes.AbstractDataTypeConstructor; static _setupLaravelHooks(): void; static setDependencies({ logger, config, redis, redisOptions, }: KythiaModelDependencies): void; static _trackRedisError(err: unknown): void; static _tryRedisFailover(): boolean; static _closeCurrentRedis(): void; static initializeRedis(redisOptions?: Record): IORedis | null; static _makeRetryStrategy(): (times: number) => number | null; static _setupRedisEventHandlers(): void; static _scheduleReconnect(): void; static getCacheKey(queryIdentifier: unknown): string; static normalizeQueryOptions(data: unknown): unknown; static _generateSmartTags(instance: import('sequelize').Model): string[]; static setCacheEntry(cacheKeyOrQuery: unknown, data: unknown, ttl?: number, tags?: string[]): Promise; static getCachedEntry(cacheKeyOrQuery: unknown, includeOptions?: unknown): Promise; static clearCache(keys: unknown): Promise; static _redisSetCacheEntry(cacheKey: string, data: unknown, ttl: number, tags?: string[]): Promise; static _redisGetCachedEntry(cacheKey: string, includeOptions: unknown): Promise; static _redisClearCache(cacheKey: string): Promise; static invalidateByTags(tags: string[]): Promise; static _mapSetCacheEntry(cacheKey: string, data: unknown, ttl: number): void; static _mapGetCachedEntry(cacheKey: string, includeOptions: unknown): CacheEntry; static _mapClearCache(cacheKey: string): void; static _mapClearAllModelCache(): void; static _performDriftCheck(cacheKey: string, cachedData: unknown, query: unknown, ttl?: number): Promise; static getCacheDriftStats(): { rate: number; enabled: boolean; checked: number; drifted: number; healed: number; errors: number; }; static getGlobalCacheStats(sequelizeModels?: Record): CacheStats; static _normalizeFindOptions(options: unknown): unknown; static getCache(keys: unknown, options?: unknown): Promise; static getAllCache(options?: unknown): Promise; static scheduleAdd(keySuffix: string, score: number, value: string): Promise; static scheduleRemove(keySuffix: string, value: string): Promise; static scheduleGetExpired(keySuffix: string, scoreLimit?: number): Promise; static scheduleClear(keySuffix: string): Promise; static findOrCreateCache(options: unknown): Promise; static getOrCreateCache(where: unknown, defaults?: unknown, options?: unknown): Promise<[import('sequelize').Model, boolean]>; static firstOrCreateCache(where: unknown, defaults?: unknown, options?: unknown): Promise<[import('sequelize').Model, boolean]>; static firstOrNewCache(where: unknown, defaults?: unknown, options?: unknown): Promise<[import('sequelize').Model, boolean]>; static firstOrUpdateCache(where: unknown, values?: unknown, options?: unknown): Promise<[import('sequelize').Model, boolean]>; static updateOrCreateCache(where: unknown, values?: unknown, options?: unknown): Promise<[import('sequelize').Model, boolean]>; static countCache(options?: unknown, ttlParam?: number): Promise; static clearNegativeCache(keys: unknown): Promise; static aggregateCache(options?: unknown, cacheOptions?: unknown): Promise; static refreshCache(keys: unknown, options?: unknown): Promise | null>; static existsCache(where: unknown, options?: unknown): Promise; static bulkGetCache(ids: unknown[], options?: unknown): Promise; static destroyAndClearCache(options: unknown): Promise; static incrementCache(where: unknown, field: string, amount?: number): Promise; static paginateCache(options?: unknown): Promise<{ rows: unknown[]; count: number; totalPages: number; currentPage: number; }>; static initializeCacheHooks(): void; static attachHooksToAllModels(sequelizeInstance: Sequelize, client: unknown): void; static touchParent(childInstance: unknown, foreignKeyField: string, ParentModel: typeof KythiaModel, timestampField?: string): Promise; static setupParentTouch(foreignKeyField: string, ParentModel: typeof KythiaModel, timestampField?: string): void; } export default KythiaModel; //# sourceMappingURL=KythiaModel.d.ts.map