/** * Internal pending command invocation callbacks and timeout handle. * * @group Event bridge */ export type PendingInvocation = { /** Resolve the caller with a command result payload. */ resolve: (value: T) => void; /** Reject the caller with a PURISTA or provider error. */ reject: (reason?: unknown) => void; /** Timeout that rejects the invocation when no response arrives. */ timeout: ReturnType; }; /** * Registry for command invocations awaiting correlated responses. * * The registry rejects timed-out invocations and retains timed-out correlation * ids briefly so late responses can be classified and logged without resolving * stale callers. * * @group Event bridge */ export declare class PendingInvocationRegistry { private readonly options; private readonly pending; private readonly timedOut; constructor(options?: { retentionMs?: number; onLateResponse?: (correlationId: string) => void; }); /** Number of invocations currently awaiting a response. */ get size(): number; /** Exposes the pending map for low-level bridge diagnostics. */ getPendingMap(): Map>; /** Register one invocation and reject it automatically after `timeoutMs`. */ register(correlationId: string, timeoutMs: number, traceId: string | undefined): Promise; /** Resolve a pending invocation or classify the response as late/missing. */ resolve(correlationId: string, payload: T): "late" | "missing" | "resolved"; /** Reject a pending invocation or classify the response as late/missing. */ reject(correlationId: string, error: unknown): "late" | "missing" | "rejected"; /** Reject all pending invocations, typically during bridge shutdown. */ rejectAll(error: unknown): void; /** Clear pending and timed-out entries without resolving callers. */ clear(): void; private handleMissing; private cleanupTimedOut; } //# sourceMappingURL=PendingInvocationRegistry.impl.d.ts.map