import type { Observable, Subscription } from 'rxjs'; import type { Maybe } from 'maybe-not'; import type { ResponseCallback, TectonMessageSuccessResponse } from './response'; /** * Message protocol types for inter-window communication. * REQUEST expects a response, RESPONSE answers a request, * MESSAGE is one-way, and BROADCAST reaches all listeners. */ export type Protocol = 'REQUEST' | 'RESPONSE' | 'MESSAGE' | 'BROADCAST'; /** * Interface for the message bus communication system. * Provides methods for sending and receiving messages between windows. * * @typeParam T - The expected type of the message value (for onMessage) * @typeParam R - The expected type of the response value (for sendRequest/sendResponse) * * @see MessageBus - Implementation in q2-tecton-common/utility */ export interface TectonMessageBus { onMessage(type: string, protocol?: Protocol, guid?: number | null): Observable>; sendRequest(type: string, message: Maybe): Promise>; sendResponse(type: string, generateResponse: ResponseCallback): Subscription; } //# sourceMappingURL=message-bus.d.ts.map