@cpzxrobot/sdk 1.1.42 → 1.1.43
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/dist/index.js +2 -2
- package/index.ts +4 -4
- package/package.json +1 -1
- package/types.d.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -148,8 +148,8 @@ class Cpzxrobot {
|
|
|
148
148
|
this.scanQrcode = function () {
|
|
149
149
|
return platform.callHandler("app.scanQrcode");
|
|
150
150
|
};
|
|
151
|
-
this.getGeo = function () {
|
|
152
|
-
var result = platform.callHandler("app.getGeo");
|
|
151
|
+
this.getGeo = async function () {
|
|
152
|
+
var result = await platform.callHandler("app.getGeo");
|
|
153
153
|
if (result.error) {
|
|
154
154
|
throw result.error;
|
|
155
155
|
}
|
package/index.ts
CHANGED
|
@@ -46,10 +46,10 @@ export class Cpzxrobot {
|
|
|
46
46
|
saveBlob!: (blob: Blob, filename: string) => void;
|
|
47
47
|
scanQrcode!: () => Promise<string>;
|
|
48
48
|
vibrate!: (time?: number) => void;
|
|
49
|
-
getGeo!: () => {
|
|
49
|
+
getGeo!: () => Promise<{
|
|
50
50
|
lat: number;
|
|
51
51
|
lng: number;
|
|
52
|
-
}
|
|
52
|
+
}>;
|
|
53
53
|
assistant: AssistantGateway;
|
|
54
54
|
energy: EnergyGateway;
|
|
55
55
|
camera: CameraGateway;
|
|
@@ -185,8 +185,8 @@ export class Cpzxrobot {
|
|
|
185
185
|
this.scanQrcode = function () {
|
|
186
186
|
return platform.callHandler("app.scanQrcode");
|
|
187
187
|
}
|
|
188
|
-
this.getGeo = function () {
|
|
189
|
-
var result = platform.callHandler("app.getGeo");
|
|
188
|
+
this.getGeo = async function () {
|
|
189
|
+
var result = await platform.callHandler("app.getGeo");
|
|
190
190
|
if (result.error) {
|
|
191
191
|
throw result.error;
|
|
192
192
|
}
|
package/package.json
CHANGED
package/types.d.ts
CHANGED