@cpzxrobot/sdk 1.3.43 → 1.3.45
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/device_gateway.ts +7 -3
- package/dist/device_gateway.js +7 -3
- package/package.json +1 -1
package/device_gateway.ts
CHANGED
|
@@ -983,7 +983,11 @@ export class DeviceGateway extends Object {
|
|
|
983
983
|
return {
|
|
984
984
|
openDoor: async (deviceId: number,door: "doora" | "doorb", open: boolean) => {
|
|
985
985
|
var axios = await this.context.ready;
|
|
986
|
-
return axios.post(`/api/v2/
|
|
986
|
+
return axios.post(`/api/v2/disinfect/${deviceId}`, { door, open })
|
|
987
|
+
},
|
|
988
|
+
start: async (deviceId: number) => {
|
|
989
|
+
var axios = await this.context.ready;
|
|
990
|
+
return axios.post(`/api/v2/disinfect/${deviceId}`, { end:true })
|
|
987
991
|
},
|
|
988
992
|
config: async (deviceId: number, config: {
|
|
989
993
|
mode?: number; // 0:没有消毒 1:高温消毒 2:臭氧消毒 3:高温+臭氧
|
|
@@ -992,13 +996,13 @@ export class DeviceGateway extends Object {
|
|
|
992
996
|
targetOzone?: number; // 目标臭氧浓度
|
|
993
997
|
}) => {
|
|
994
998
|
let axios = await this.context.ready;
|
|
995
|
-
return axios.post(`/api/v2/
|
|
999
|
+
return axios.post(`/api/v2/disinfect/${deviceId}`, config).then((res) => {
|
|
996
1000
|
return res.data;
|
|
997
1001
|
});
|
|
998
1002
|
},
|
|
999
1003
|
history: async (deviceId: number, pageNum:number,pageSize:number) => {
|
|
1000
1004
|
let axios = await this.context.ready;
|
|
1001
|
-
return axios.get(`/api/v2/
|
|
1005
|
+
return axios.get(`/api/v2/disinfect/${deviceId}`, { params: { pageNum, pageSize } }).then((res) => {
|
|
1002
1006
|
return res.data;
|
|
1003
1007
|
});
|
|
1004
1008
|
}
|
package/dist/device_gateway.js
CHANGED
|
@@ -751,17 +751,21 @@ class DeviceGateway extends Object {
|
|
|
751
751
|
return {
|
|
752
752
|
openDoor: async (deviceId, door, open) => {
|
|
753
753
|
var axios = await this.context.ready;
|
|
754
|
-
return axios.post(`/api/v2/
|
|
754
|
+
return axios.post(`/api/v2/disinfect/${deviceId}`, { door, open });
|
|
755
|
+
},
|
|
756
|
+
start: async (deviceId) => {
|
|
757
|
+
var axios = await this.context.ready;
|
|
758
|
+
return axios.post(`/api/v2/disinfect/${deviceId}`, { end: true });
|
|
755
759
|
},
|
|
756
760
|
config: async (deviceId, config) => {
|
|
757
761
|
let axios = await this.context.ready;
|
|
758
|
-
return axios.post(`/api/v2/
|
|
762
|
+
return axios.post(`/api/v2/disinfect/${deviceId}`, config).then((res) => {
|
|
759
763
|
return res.data;
|
|
760
764
|
});
|
|
761
765
|
},
|
|
762
766
|
history: async (deviceId, pageNum, pageSize) => {
|
|
763
767
|
let axios = await this.context.ready;
|
|
764
|
-
return axios.get(`/api/v2/
|
|
768
|
+
return axios.get(`/api/v2/disinfect/${deviceId}`, { params: { pageNum, pageSize } }).then((res) => {
|
|
765
769
|
return res.data;
|
|
766
770
|
});
|
|
767
771
|
}
|