@cpzxrobot/sdk 1.3.41 → 1.3.42

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 CHANGED
@@ -137,6 +137,7 @@ export class DeviceGateway extends Object {
137
137
  return res.data;
138
138
  });
139
139
  },
140
+
140
141
  };
141
142
  }
142
143
 
@@ -930,7 +931,7 @@ export class DeviceGateway extends Object {
930
931
  public maintenanceStatus = this.generateFunctionsForDict('maintenance-status');
931
932
 
932
933
  //外委中状态列表
933
- public maintenanceOutsourceStatus =this.generateFunctionsForDict('maintenance-outsource-status');
934
+ public maintenanceOutsourceStatus = this.generateFunctionsForDict('maintenance-outsource-status');
934
935
 
935
936
  //故障来源
936
937
  public troubleDetectSource = this.generateFunctionsForDict('trouble-detect-source');
@@ -972,4 +973,30 @@ export class DeviceGateway extends Object {
972
973
  };
973
974
  }
974
975
 
976
+ get disinfect() {
977
+ return {
978
+ openDoor: async (deviceId: number,door: "doora" | "doorb", open: boolean) => {
979
+ var axios = await this.context.ready;
980
+ return axios.post(`/api/v2/device/disinfect/${deviceId}`, { door, open })
981
+ },
982
+ config: async (deviceId: number, config: {
983
+ mode?: number; // 0:没有消毒 1:高温消毒 2:臭氧消毒 3:高温+臭氧
984
+ disinfectTime?: number; // 洗消时间(s)
985
+ targetTemp?: number; // 目标温度
986
+ targetOzone?: number; // 目标臭氧浓度
987
+ }) => {
988
+ let axios = await this.context.ready;
989
+ return axios.post(`/api/v2/device/disinfect/${deviceId}`, config).then((res) => {
990
+ return res.data;
991
+ });
992
+ },
993
+ history: async (deviceId: number, pageNum:number,pageSize:number) => {
994
+ let axios = await this.context.ready;
995
+ return axios.get(`/api/v2/device/disinfect/${deviceId}`, { params: { pageNum, pageSize } }).then((res) => {
996
+ return res.data;
997
+ });
998
+ }
999
+ }
1000
+ }
1001
+
975
1002
  }
@@ -740,5 +740,25 @@ class DeviceGateway extends Object {
740
740
  }
741
741
  };
742
742
  }
743
+ get disinfect() {
744
+ return {
745
+ openDoor: async (deviceId, door, open) => {
746
+ var axios = await this.context.ready;
747
+ return axios.post(`/api/v2/device/disinfect/${deviceId}`, { door, open });
748
+ },
749
+ config: async (deviceId, config) => {
750
+ let axios = await this.context.ready;
751
+ return axios.post(`/api/v2/device/disinfect/${deviceId}`, config).then((res) => {
752
+ return res.data;
753
+ });
754
+ },
755
+ history: async (deviceId, pageNum, pageSize) => {
756
+ let axios = await this.context.ready;
757
+ return axios.get(`/api/v2/device/disinfect/${deviceId}`, { params: { pageNum, pageSize } }).then((res) => {
758
+ return res.data;
759
+ });
760
+ }
761
+ };
762
+ }
743
763
  }
744
764
  exports.DeviceGateway = DeviceGateway;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.3.41",
3
+ "version": "1.3.42",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {