import type { Redis } from 'ioredis'; import type { NotificationPublisher, PublisherErrorHandler } from '../notifications/NotificationPublisher'; import type { Logger } from '../util/Logger'; export type RedisPublisherConfig = { serverUuid: string; channel: string; errorHandler?: PublisherErrorHandler; logger?: Logger; }; export type NotificationCommand = { actionId: typeof CLEAR_COMMAND | typeof DELETE_COMMAND | typeof DELETE_MANY_COMMAND | typeof SET_COMMAND; originUuid: string; }; export type DeleteNotificationCommand = NotificationCommand & { key: string; }; export type SetNotificationCommand = NotificationCommand & { key: string; value: T | null; }; export type DeleteManyNotificationCommand = NotificationCommand & { keys: string[]; }; export declare const CLEAR_COMMAND = "CLEAR"; export declare const DELETE_COMMAND = "DELETE"; export declare const DELETE_MANY_COMMAND = "DELETE_MANY"; export declare const SET_COMMAND = "SET"; export declare class RedisNotificationPublisher implements NotificationPublisher { readonly channel: string; readonly errorHandler: PublisherErrorHandler; private readonly redis; private readonly serverUuid; constructor(redis: Redis, config: RedisPublisherConfig); clear(): Promise; delete(key: string): Promise; set(key: string, value: LoadedValue | null): Promise; deleteMany(keys: string[]): Promise; close(): Promise; subscribe(): Promise; }