import type { Redis } from 'ioredis'; import type { IPreferenceStore, NotificationPreferences, NotificationPayload } from './notifications.types.js'; export interface ExtendedNotificationPreferences extends NotificationPreferences { categories?: Record; frequency?: FrequencyLimits; digest?: DigestConfig; quietHours?: QuietHoursConfig; allowUrgent?: boolean; } export interface CategoryPreference { enabled: boolean; channels?: string[]; frequency?: FrequencyLimits; } export interface FrequencyLimits { maxPerMinute?: number; maxPerHour?: number; maxPerDay?: number; } export interface DigestConfig { enabled: boolean; frequency: 'daily' | 'weekly' | 'monthly'; sendAt?: string; dayOfWeek?: number; dayOfMonth?: number; categories?: string[]; } export interface QuietHoursConfig { enabled: boolean; start: string; end: string; timezone?: string; exceptions?: string[]; } export interface RedisPreferenceStoreOptions { keyPrefix?: string; defaultPreferences?: Partial; counterTTL?: number; } export declare class RedisPreferenceStore implements IPreferenceStore { private readonly redis?; private readonly keyPrefix; private readonly defaultPreferences; private readonly counterTTL; private static readonly MAX_MEMORY_PREFERENCES; private static readonly MAX_MEMORY_COUNTERS; private readonly memoryStore; private readonly counterStore; constructor(redis?: Redis | undefined, options?: RedisPreferenceStoreOptions); getPreferences(recipientId: string): Promise; setPreferences(recipientId: string, preferences: Partial): Promise; updatePreferences(recipientId: string, updates: Partial): Promise; deletePreferences(recipientId: string): Promise; shouldSend(recipientId: string, payload: NotificationPayload, channel: string): Promise<{ allowed: boolean; reason?: string; }>; recordSent(recipientId: string, category?: string): Promise; getDefaultPreferences(): ExtendedNotificationPreferences; private buildKey; private mergePreferences; private checkQuietHours; private isInQuietHours; private getCurrentMinutesInTimezone; private parseTimeToMinutes; private checkFrequencyLimits; } //# sourceMappingURL=redis-preference-store.d.ts.map