@cpzxrobot/sdk 1.0.65 → 1.0.66

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.
Files changed (2) hide show
  1. package/camera_gateway.ts +19 -4
  2. package/package.json +1 -1
package/camera_gateway.ts CHANGED
@@ -27,8 +27,8 @@ export class CameraGateway extends Object {
27
27
  factory_id?: number;
28
28
  unit_id?: number;
29
29
  };
30
- }else{
31
- params = {unit_id:data.id}
30
+ } else {
31
+ params = { unit_id: data.id };
32
32
  }
33
33
 
34
34
  const response = await axios.post("/api/v1/camera/search", params);
@@ -48,9 +48,24 @@ export class CameraGateway extends Object {
48
48
  return response.data;
49
49
  }
50
50
 
51
- async control(data: Camera, action: "left" | "right" | "up" | "down" | "zoom_in" | "zoom_out"): Promise<any> {
51
+ async control(
52
+ data: Camera,
53
+ action:
54
+ | "left"
55
+ | "left_up"
56
+ | "left_down"
57
+ | "right"
58
+ | "right_up"
59
+ | "right_down"
60
+ | "up"
61
+ | "down"
62
+ | "zoom_in"
63
+ | "zoom_out"
64
+ ): Promise<any> {
52
65
  var axios = await this.context.ready;
53
- const response = await axios.get(`/api/v1/camera/${data.id}/control/${action}`);
66
+ const response = await axios.get(
67
+ `/api/v1/camera/${data.id}/control/${action}`
68
+ );
54
69
  return response.data;
55
70
  }
56
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.0.65",
3
+ "version": "1.0.66",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {