@cpzxrobot/sdk 1.0.52 → 1.0.54

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.
@@ -71,12 +71,12 @@ class PigfarmGateway extends Object {
71
71
  },
72
72
  add: (unit, data) => {
73
73
  return this.context.ready.then((axios) => {
74
- return axios.post(`/api/v2/pigfarm/relay/config/add/${unit.id}`, data);
74
+ return axios.post(`/api/v2/pigfarm/relay/config/add`, data);
75
75
  });
76
76
  },
77
77
  update: (unit, data) => {
78
78
  return this.context.ready.then((axios) => {
79
- return axios.post(`/api/v2/pigfarm/relay/config/update/${unit.id}`, data);
79
+ return axios.post(`/api/v2/pigfarm/relay/config/update`, data);
80
80
  });
81
81
  },
82
82
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.0.52",
3
+ "version": "1.0.54",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -81,12 +81,12 @@ export class PigfarmGateway extends Object {
81
81
  },
82
82
  add: (unit: Unit, data: DeviceConfig) => {
83
83
  return this.context.ready.then((axios) => {
84
- return axios.post(`/api/v2/pigfarm/relay/config/add/${unit.id}`, data);
84
+ return axios.post(`/api/v2/pigfarm/relay/config/add`, data);
85
85
  });
86
86
  },
87
87
  update: (unit: Unit, data: DeviceConfig) => {
88
88
  return this.context.ready.then((axios) => {
89
- return axios.post(`/api/v2/pigfarm/relay/config/update/${unit.id}`, data);
89
+ return axios.post(`/api/v2/pigfarm/relay/config/update`, data);
90
90
  });
91
91
  },
92
92
  };
package/types.d.ts CHANGED
@@ -104,7 +104,7 @@ type HeatLamp = {
104
104
  //针对具有SN码的设备的统一配置
105
105
  type DeviceConfig = {
106
106
  id?: "";
107
- unitId?: string;
107
+ unitId?: number;
108
108
  serialNumber: string;
109
109
  address?: string;
110
110
  type?: string;