@cpzxrobot/sdk 1.0.97 → 1.0.99
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/chickenfarm_gateway.ts +5 -0
- package/device_gateway.ts +15 -3
- package/dist/chickenfarm_gateway.js +5 -0
- package/dist/device_gateway.js +2 -2
- package/package.json +1 -1
package/chickenfarm_gateway.ts
CHANGED
|
@@ -35,6 +35,11 @@ export class ChickenFarmGateway extends Object {
|
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
37
|
},
|
|
38
|
+
preview: (picture_id: number) => {
|
|
39
|
+
return this.context.ready.then((axios) => {
|
|
40
|
+
return axios.get(`api/v2/diedchicken/picture_id/${picture_id}/raw/read`);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
38
43
|
};
|
|
39
44
|
}
|
|
40
45
|
}
|
package/device_gateway.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { DeviceTypeGateway } from "./device_type_gateway";
|
|
2
2
|
import { DeviceFilter } from "./device_filter";
|
|
3
|
-
import type {
|
|
3
|
+
import type {
|
|
4
|
+
ElectricMeter,
|
|
5
|
+
Cpzxrobot,
|
|
6
|
+
DataQueryArgs,
|
|
7
|
+
DeviceV2,
|
|
8
|
+
Unit,
|
|
9
|
+
} from ".";
|
|
4
10
|
import { FeedTowerGateway } from "./device_types/feedtower";
|
|
5
11
|
import { ElectricMeterGateway } from "./device_types/electricmeter";
|
|
6
12
|
import { NormalGateway } from "./device_types/normal_type";
|
|
@@ -42,10 +48,16 @@ export class DeviceGateway extends Object {
|
|
|
42
48
|
});
|
|
43
49
|
},
|
|
44
50
|
|
|
45
|
-
list: async (
|
|
51
|
+
list: async (condition: {
|
|
52
|
+
id?: number;
|
|
53
|
+
type?: string;
|
|
54
|
+
location?: string;
|
|
55
|
+
workshopId?: number;
|
|
56
|
+
factoryId?: number;
|
|
57
|
+
}) => {
|
|
46
58
|
let axios = await this.context.ready;
|
|
47
59
|
|
|
48
|
-
return axios.
|
|
60
|
+
return axios.post(`/api/v2/device/list`,condition).then((res) => {
|
|
49
61
|
return res.data;
|
|
50
62
|
});
|
|
51
63
|
},
|
package/dist/device_gateway.js
CHANGED
|
@@ -30,9 +30,9 @@ class DeviceGateway extends Object {
|
|
|
30
30
|
return res.data;
|
|
31
31
|
});
|
|
32
32
|
},
|
|
33
|
-
list: async (
|
|
33
|
+
list: async (condition) => {
|
|
34
34
|
let axios = await this.context.ready;
|
|
35
|
-
return axios.
|
|
35
|
+
return axios.post(`/api/v2/device/list`, condition).then((res) => {
|
|
36
36
|
return res.data;
|
|
37
37
|
});
|
|
38
38
|
},
|