import { ConversationQueueType, MqttSensorQueue, QueueCallback, QueueHeader, QueueOptions } from "@leftshiftone/gaia-sdk/dist"; import { IListener, IRenderer } from "../api"; import { Subscription } from "./Subscription"; import { InteractionSubscription } from "./InteractionSubscription"; import { InteractionInterceptor } from "./interceptor/InteractionInterceptor"; export declare class Connection { mqttSensorQueue: MqttSensorQueue; private readonly listener; private subscriptions; constructor(options: QueueOptions, listener: IListener); /** * Subscribes to the selected queue. * * @param type the queue type * @param header the destination header * @param callback the callback function * @param renderer the renderer which is only used when the type is set to interaction */ subscribe(type: ConversationQueueType, header: QueueHeader, callback: QueueCallback, renderer?: IRenderer): Subscription; /** * Subscribes to the context queue. * * @param header the destination header * @param callback the callback function */ subscribeContext(header: QueueHeader, callback: QueueCallback): Subscription; /** * Subscribes to the notification queue. * * @param header the destination header * @param callback the callback function */ subscribeNotification(header: QueueHeader, callback: QueueCallback): Subscription; /** * Subscribes to the logging queue. * * @param header the destination header * @param callback the callback function */ subscribeLogging(header: QueueHeader, callback: QueueCallback): Subscription; /** * Subscribes to the interaction queue. * * @param header the destination header * @param callback the callback function * @param renderer the renderer * @param interactionInterceptor intercepts the interaction */ subscribeInteraction(header: QueueHeader, callback: QueueCallback, renderer: IRenderer, interactionInterceptor?: InteractionInterceptor): InteractionSubscription; private setSubscription; /** * disconnect the mqtt connection */ disconnect(): void; private initMqttSensorQueue; private onMessage; }