import type { BrowserTypes, EventHandler, Listener, PrivateChannel as FDC3PrivateChannel, PrivateChannelEventTypes } from '@finos/fdc3'; import { FullyQualifiedAppIdentifier, IProxyMessagingProvider } from '../contracts.js'; import { ContextListener } from './channel.contracts.js'; import { PublicChannel } from './channel.public.js'; /** * Object representing a private context channel, which is intended to support * secure communication between applications, and extends the Channel interface * with event handlers which provide information on the connection state of both * parties, ensuring that desktop agents do not need to queue or retain messages * that are broadcast before a context listener is added and that applications * are able to stop broadcasting messages when the other party has disconnected. */ export declare class PrivateChannel extends PublicChannel implements FDC3PrivateChannel { constructor(channelDetails: BrowserTypes.Channel, appIdentifier: FullyQualifiedAppIdentifier, messagingProvider: IProxyMessagingProvider, contextListener: ContextListener); onAddContextListener(handler: (contextType?: string) => void): Listener; onUnsubscribe(handler: (contextType?: string) => void): Listener; onDisconnect(handler: () => void): Listener; /** * Called to indicate an app will no longer interact with this Private Channel */ disconnect(): Promise; /** * Registers a handler for PrivateChannelEvents on this Private Channel * @param type is the type of PrivateChannelEvent the listener is listening for * @param handler is the handler the events received will be passed to * @returns a listener for the specified PrivateChannelEventTypes */ addEventListener(type: PrivateChannelEventTypes | null, handler: EventHandler): Promise; private convertEventPayload; }