@cpzxrobot/sdk 1.3.44 → 1.3.46

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
@@ -985,6 +985,10 @@ export class DeviceGateway extends Object {
985
985
  var axios = await this.context.ready;
986
986
  return axios.post(`/api/v2/disinfect/${deviceId}`, { door, open })
987
987
  },
988
+ action: async (deviceId: number,action: "start"|"end") => {
989
+ var axios = await this.context.ready;
990
+ return axios.post(`/api/v2/disinfect/${deviceId}`, { action })
991
+ },
988
992
  config: async (deviceId: number, config: {
989
993
  mode?: number; // 0:没有消毒 1:高温消毒 2:臭氧消毒 3:高温+臭氧
990
994
  disinfectTime?: number; // 洗消时间(s)
@@ -753,6 +753,10 @@ class DeviceGateway extends Object {
753
753
  var axios = await this.context.ready;
754
754
  return axios.post(`/api/v2/disinfect/${deviceId}`, { door, open });
755
755
  },
756
+ action: async (deviceId, action) => {
757
+ var axios = await this.context.ready;
758
+ return axios.post(`/api/v2/disinfect/${deviceId}`, { action });
759
+ },
756
760
  config: async (deviceId, config) => {
757
761
  let axios = await this.context.ready;
758
762
  return axios.post(`/api/v2/disinfect/${deviceId}`, config).then((res) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.3.44",
3
+ "version": "1.3.46",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {