export type CallbackMessage = { state: string; } & ({ type: "fail"; error: { code: number; message: string; }; } | { type: "success"; data: string | object; }); export declare class CommunicateHelper { private readonly pendingEvents; private readonly windowMonitorIntervals; private readonly origin; private readonly eventHandler; constructor(origin: string); private createEventHandler; private isValidCallbackMessage; private initializeEventListeners; handleResponse(message: CallbackMessage): void; private parseSuccessResponse; private monitorWindowClosing; private hasPendingRequest; sendRequest(action: (requestId: string) => Promise): Promise; cleanup(): void; }