@cpzxrobot/sdk 1.0.18 → 1.0.19

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/package.json +1 -1
  2. package/types.d.ts +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/types.d.ts CHANGED
@@ -3,6 +3,7 @@ import { FactoryGateway } from "@cpzxrobot/sdk/factory_gateway";
3
3
  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
+ import { PigfarmGateway } from "@cpzxrobot/sdk/pigfarm_gateway";
6
7
 
7
8
  type Device = {
8
9
  id: number;
@@ -132,8 +133,11 @@ export class Cpzxrobot {
132
133
  mode: string;
133
134
  axios: MyAxiosInstance;
134
135
  camera: CameraGateway;
136
+ pigfarm: PigfarmGateway;
135
137
  _getSelectedFarmFromMiniApp: () => Promise<Factory>;
136
138
  _getSelectedUnitFromMiniApp: () => Promise<Unit>;
139
+ openMiniApp: (url: string) => void;
140
+ on: (event: string, callback: (data: any) => void) => void;
137
141
  setTitle: (title: string) => void;
138
142
  saveBase64: (base64: string, filename: string) => void;
139
143
  saveBlob: (blob: Blob, filename: string) => void;