@ray-js/lock-sdk 1.2.0-beta.12 → 1.2.0-beta.13
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/lib/api/gesture.d.ts +11 -0
- package/lib/api/gesture.js +18 -0
- package/lib/entries/main/exports/gesture.d.ts +6 -0
- package/lib/entries/main/exports/gesture.js +8 -0
- package/lib/entries/main/exports/index.d.ts +1 -0
- package/lib/entries/main/exports/index.js +1 -0
- package/lib/feature/gesture/gesture.d.ts +6 -0
- package/lib/feature/gesture/gesture.js +3 -0
- package/lib/feature/log/log.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface GestureStatus {
|
|
2
|
+
status: boolean;
|
|
3
|
+
password: string;
|
|
4
|
+
[k: string]: any;
|
|
5
|
+
}
|
|
6
|
+
export declare const getGestureStatusApi: (devId: string) => Promise<GestureStatus>;
|
|
7
|
+
export declare const setGestureStatusApi: (params: {
|
|
8
|
+
devId: string;
|
|
9
|
+
password: string;
|
|
10
|
+
open: boolean;
|
|
11
|
+
}) => Promise<boolean>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { THING } from "../utils/constant";
|
|
2
|
+
import { requestApi } from "./request";
|
|
3
|
+
export const getGestureStatusApi = (devId) => {
|
|
4
|
+
return requestApi({
|
|
5
|
+
logName: "getGestureStatus",
|
|
6
|
+
api: `${THING}.m.device.lock.gesturepwd.check`,
|
|
7
|
+
version: "1.0",
|
|
8
|
+
data: { devId },
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
export const setGestureStatusApi = (params) => {
|
|
12
|
+
return requestApi({
|
|
13
|
+
logName: "setGestureStatus",
|
|
14
|
+
api: `${THING}.m.device.lock.gesturepwd.set`,
|
|
15
|
+
version: "1.0",
|
|
16
|
+
data: params,
|
|
17
|
+
});
|
|
18
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { GestureStatus } from "../../../api/gesture";
|
|
2
|
+
export declare function getGestureStatus(): Promise<import("../../../api/gesture").GestureStatus>;
|
|
3
|
+
export declare function updateGestureStatus(params: {
|
|
4
|
+
password: string;
|
|
5
|
+
open: boolean;
|
|
6
|
+
}): Promise<boolean>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { resolveRuntimeFromExportThis } from "../bootstrap/resolve-runtime-from-export-this";
|
|
2
|
+
import { getGestureStatusForRuntime, updateGestureStatusForRuntime, } from "../../../feature/gesture/gesture";
|
|
3
|
+
export async function getGestureStatus() {
|
|
4
|
+
return getGestureStatusForRuntime(resolveRuntimeFromExportThis(this));
|
|
5
|
+
}
|
|
6
|
+
export async function updateGestureStatus(params) {
|
|
7
|
+
return updateGestureStatusForRuntime(resolveRuntimeFromExportThis(this), params);
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { LockDeviceRuntime } from "../../runtime/LockDeviceRuntime";
|
|
2
|
+
export declare const getGestureStatusForRuntime: (rt: LockDeviceRuntime) => Promise<import("../../api/gesture").GestureStatus>;
|
|
3
|
+
export declare const updateGestureStatusForRuntime: (rt: LockDeviceRuntime, params: {
|
|
4
|
+
password: string;
|
|
5
|
+
open: boolean;
|
|
6
|
+
}) => Promise<boolean>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { getGestureStatusApi, setGestureStatusApi } from "../../api/gesture";
|
|
2
|
+
export const getGestureStatusForRuntime = (rt) => getGestureStatusApi(rt.config.devInfo.devId);
|
|
3
|
+
export const updateGestureStatusForRuntime = (rt, params) => setGestureStatusApi({ devId: rt.config.devInfo.devId, ...params });
|
package/lib/feature/log/log.js
CHANGED
|
@@ -6,7 +6,7 @@ import { LOGCHANGE } from "../../utils/constant";
|
|
|
6
6
|
import emitter from "../../utils/event";
|
|
7
7
|
import { handleLocalOperation } from "../../utils/log";
|
|
8
8
|
import { parseWeek } from "../../utils";
|
|
9
|
-
import { cameraPositionMap } from "
|
|
9
|
+
import { cameraPositionMap } from "../../constant";
|
|
10
10
|
export function getLogsRefreshEvent(runtime) {
|
|
11
11
|
return `${LOGCHANGE}_${runtime.devId}`;
|
|
12
12
|
}
|