@mysetup/mqtt 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +18 -2
- package/dist/index.js +113 -1
- package/package.json +6 -5
- package/dist/index.d.ts.map +0 -1
- package/dist/mqttClient.d.ts +0 -17
- package/dist/mqttClient.d.ts.map +0 -1
- package/dist/mqttClient.js +0 -133
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { MqttClient } from 'mqtt';
|
|
2
|
+
export { MqttClient } from 'mqtt';
|
|
3
|
+
|
|
4
|
+
type MQttOptionProps = "web" | "server";
|
|
5
|
+
interface ConnectionProps {
|
|
6
|
+
value: string;
|
|
7
|
+
option: MQttOptionProps;
|
|
8
|
+
topicList: string[];
|
|
9
|
+
messageCallback?: (topic: string, message: string) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const mqttSub: (topicList: string[], messageCallback?: (topic: string, message: string) => void, client?: MqttClient) => void;
|
|
12
|
+
declare const mqttUnSub: (topicList: string[], client?: MqttClient) => void;
|
|
13
|
+
declare const mqttDisconnect: (props: ConnectionProps, reinit: boolean, client?: MqttClient) => void;
|
|
14
|
+
declare const mqttOnMessage: (messageCallback: (topic: string, message: string) => void, client?: MqttClient) => void;
|
|
15
|
+
declare const mqttCreateConnection: (props: ConnectionProps) => MqttClient;
|
|
16
|
+
declare const getMqttClient: () => string;
|
|
17
|
+
|
|
18
|
+
export { getMqttClient, mqttCreateConnection, mqttDisconnect, mqttOnMessage, mqttSub, mqttUnSub };
|