| | |
| | | import { Store } from './store' |
| | | import { QoS } from 'mqtt-packet' |
| | | |
| | | export declare type StorePutCallback = () => void |
| | | |
| | | export interface IClientOptions extends ISecureClientOptions { |
| | | port?: number // port is made into a number subsequently |
| | | host?: string // host does NOT include port |
| | |
| | | /** |
| | | * the retain flag |
| | | */ |
| | | retain: boolean |
| | | retain: boolean, |
| | | /* |
| | | * properies object of will |
| | | * */ |
| | | properties?: { |
| | | willDelayInterval?: number, |
| | | payloadFormatIndicator?: number, |
| | | messageExpiryInterval?: number, |
| | | contentType?: string, |
| | | responseTopic?: string, |
| | | correlationData?: Buffer, |
| | | userProperties?: Object |
| | | } |
| | | transformWsUrl?: (url: string, options: IClientOptions, client: MqttClient) => string |
| | | } |
| | | transformWsUrl?: (url: string, options: IClientOptions, client: MqttClient) => string, |
| | | properties?: { |
| | | sessionExpiryInterval?: number, |
| | | receiveMaximum?: number, |
| | | maximumPacketSize?: number, |
| | | topicAliasMaximum?: number, |
| | | requestResponseInformation?: boolean, |
| | | requestProblemInformation?: boolean, |
| | | userProperties?: Object, |
| | | authenticationMethod?: string, |
| | | authenticationData?: Buffer |
| | | } |
| | | } |
| | | export interface ISecureClientOptions { |
| | | /** |
| | |
| | | * whether or not mark a message as duplicate |
| | | */ |
| | | dup?: boolean |
| | | /** |
| | | * callback called when message is put into `outgoingStore` |
| | | */ |
| | | cbStorePut?: StorePutCallback |
| | | } |
| | | export interface IClientSubscribeOptions { |
| | | /** |
| | | * the QoS |
| | | */ |
| | | qos: QoS |
| | | qos: QoS, |
| | | /* |
| | | * no local flag |
| | | * */ |
| | | nl?: boolean, |
| | | /* |
| | | * Retain As Published flag |
| | | * */ |
| | | rap?: boolean, |
| | | /* |
| | | * Retain Handling option |
| | | * */ |
| | | rh?: number |
| | | } |
| | | export interface IClientReconnectOptions { |
| | | /** |