import { DSR_MESSAGE_TYPES, DsrMessagePayloads } from './types.dsr'; /** * Subscribe to a given event type by its key. * * @param type The event type/key to subscribe to. * @param handler The handler function to call when the event is emitted. * @returns A Promise resolving to a cleanup function to unsubscribe from the event. */ declare function on(type: (typeof DSR_MESSAGE_TYPES)[keyof typeof DSR_MESSAGE_TYPES], handler: (data: DsrMessagePayloads[typeof type]) => Promise): Promise<() => void>; declare const _default: { close(): Promise; getFile(payload: { id: import('../../../../main.lib').File["id"]; }): Promise; getAppConfig(payload?: { app_name?: string; }): Promise>; embeddableReady(): Promise; getEnv(): Promise; on: typeof on; }; export default _default;