import { EventEmitter } from "node:events"; import { RedisAdapter } from "@myunisoft/redis"; import { type Logger } from "pino"; import type { Result } from "@openally/result"; import type { EventSubscribe, CallBackEventMessage, GenericEvent } from "../types/index.js"; import { type StandardLog } from "../utils/index.js"; import { Externals } from "./externals.class.js"; import { customValidationCbFn, eventsValidationFn } from "./events.class.js"; export declare const RESOLVED: unique symbol; export declare const UNRESOLVED: unique symbol; export type Resolved = "RESOLVED"; export type Unresolved = "UNRESOLVED"; export type EventCallbackResponse = Result; export type IncomerOptions = { name: string; redis: RedisAdapter; subscriber: RedisAdapter; logger?: Logger; standardLog?: StandardLog; eventsCast: string[]; eventsSubscribe: EventSubscribe[]; eventsValidation?: { eventsValidationFn?: eventsValidationFn; customValidationCbFn?: customValidationCbFn; }; eventCallback: (message: CallBackEventMessage) => Promise; dispatcherInactivityOptions?: { maxPingInterval?: number; publishInterval?: number; idleTime?: number; }; isDispatcherInstance?: boolean; externalsInitialized?: boolean; }; export declare class Incomer extends EventEmitter { #private; readonly name: string; readonly eventCallback: (message: CallBackEventMessage) => Promise; dispatcherConnectionState: boolean; baseUUID: `${string}-${string}-${string}-${string}-${string}`; providedUUID: string; private incomerChannel; private incomerChannelName; private subscriber; private defaultIncomerTransactionStore; private incomerStore; private newTransactionStore; private logger; private dispatcherChannelName; private lastActivity; externals: Externals | undefined; constructor(options: IncomerOptions); private checkDispatcherState; private lazyRetryPublish; private retryPublish; private registrationAttempt; private registrationIntervalCb; initialize(): Promise; close(): Promise; private cleanupTransactions; publish(event: KCastedEvents): Promise; private handleMessages; private handleDispatcherMessages; private handleIncomerMessages; private handlePing; private customEvent; private handleApprovement; } //# sourceMappingURL=incomer.class.d.ts.map