@cpzxrobot/sdk 1.0.95 → 1.0.96

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.
@@ -25,6 +25,17 @@ export class ChickenFarmGateway extends Object {
25
25
  );
26
26
  });
27
27
  },
28
- }
28
+ };
29
+ }
30
+
31
+ detail(taskId: number, offset = 0, size = 10) {
32
+ return this.context.ready.then((axios) => {
33
+ return axios.get(`api/v2/diedchicken/task/${taskId}`, {
34
+ params: {
35
+ offset,
36
+ size,
37
+ },
38
+ });
39
+ });
29
40
  }
30
41
  }
@@ -16,5 +16,15 @@ class ChickenFarmGateway extends Object {
16
16
  },
17
17
  };
18
18
  }
19
+ detail(taskId, offset = 0, size = 10) {
20
+ return this.context.ready.then((axios) => {
21
+ return axios.get(`api/v2/diedchicken/task/${taskId}`, {
22
+ params: {
23
+ offset,
24
+ size,
25
+ },
26
+ });
27
+ });
28
+ }
19
29
  }
20
30
  exports.ChickenFarmGateway = ChickenFarmGateway;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.0.95",
3
+ "version": "1.0.96",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/types.d.ts CHANGED
@@ -4,6 +4,7 @@ import { TransportGateway } from "@cpzxrobot/sdk/transport_gateway";
4
4
  import { UserGateway } from "@cpzxrobot/sdk/user_gateway";
5
5
  import { CameraGateway } from "@cpzxrobot/sdk/camera_gateway";
6
6
  import { PigfarmGateway } from "@cpzxrobot/sdk/pigfarm_gateway";
7
+ import { ChickenFarmGateway } from "@cpzxrobot/sdk/chickenfarm_gateway";
7
8
  import { UnitGateway } from "@cpzxrobot/sdk//unit_gateway";
8
9
  import { FieldDatas } from "./sensor_datas";
9
10
 
@@ -300,6 +301,7 @@ class Cpzxrobot {
300
301
  axios: MyAxiosInstance;
301
302
  camera: CameraGateway;
302
303
  pigfarm: PigfarmGateway;
304
+ chickenfarm: ChickenfarmGateway;
303
305
  dict: (key: string) => any;
304
306
  _getSelectedFarmFromMiniApp: () => Promise<Factory>;
305
307
  _getSelectedUnitFromMiniApp: () => Promise<Unit>;