@ray-js/lock-sdk 1.2.0-beta.11 → 1.2.0-beta.12
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/log.d.ts
CHANGED
|
@@ -151,6 +151,11 @@ interface AlbumItem {
|
|
|
151
151
|
fileUrl: string;
|
|
152
152
|
mediaBucket: string;
|
|
153
153
|
mediaKey: string;
|
|
154
|
+
width: number;
|
|
155
|
+
height: number;
|
|
156
|
+
angle: number;
|
|
157
|
+
position: number;
|
|
158
|
+
vr: 0 | 1;
|
|
154
159
|
}
|
|
155
160
|
export declare const getAlbumMessages: (params: GetAlbumMessagesParams) => Promise<{
|
|
156
161
|
hasNext: boolean;
|
package/lib/constant.d.ts
CHANGED
package/lib/constant.js
CHANGED
|
@@ -87,3 +87,9 @@ export var RemotePermissionType;
|
|
|
87
87
|
RemotePermissionType["ADMINS_ONLY"] = "adminsOnly";
|
|
88
88
|
RemotePermissionType["NO_ONE"] = "noOne";
|
|
89
89
|
})(RemotePermissionType || (RemotePermissionType = {}));
|
|
90
|
+
export const cameraPositionMap = {
|
|
91
|
+
0: 4,
|
|
92
|
+
1: 3,
|
|
93
|
+
2: 5,
|
|
94
|
+
3: 6,
|
|
95
|
+
};
|
package/lib/feature/log/log.js
CHANGED
|
@@ -6,6 +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 "src/constant";
|
|
9
10
|
export function getLogsRefreshEvent(runtime) {
|
|
10
11
|
return `${LOGCHANGE}_${runtime.devId}`;
|
|
11
12
|
}
|
|
@@ -418,6 +419,11 @@ export async function getAlbumsForRuntime(rt, params) {
|
|
|
418
419
|
})),
|
|
419
420
|
type: item.eventType,
|
|
420
421
|
createTime: item.uploadMilTime,
|
|
422
|
+
width: item.width,
|
|
423
|
+
height: item.height,
|
|
424
|
+
angle: item.angle,
|
|
425
|
+
position: cameraPositionMap[item.position],
|
|
426
|
+
isVR: !!item.vr,
|
|
421
427
|
})),
|
|
422
428
|
allAitypes: data.allAitypes,
|
|
423
429
|
types: data.eventTypes,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getDeviceProperties } from "../../api/setting";
|
|
2
2
|
import { getDataWithPreFetchForRuntime } from "../utils";
|
|
3
|
-
import { RemotePermissionType } from "../../constant";
|
|
3
|
+
import { cameraPositionMap, RemotePermissionType } from "../../constant";
|
|
4
4
|
export const permissions = [
|
|
5
5
|
RemotePermissionType.ADMINS_ONLY,
|
|
6
6
|
RemotePermissionType.EVERY_ONE,
|
|
@@ -37,7 +37,7 @@ export async function fetchDeviceProperties(runtime, isForce) {
|
|
|
37
37
|
width: item.w,
|
|
38
38
|
height: item.h,
|
|
39
39
|
rotate: item.al,
|
|
40
|
-
localtion: item.p,
|
|
40
|
+
localtion: cameraPositionMap[item.p],
|
|
41
41
|
}));
|
|
42
42
|
}
|
|
43
43
|
catch (e) {
|
package/lib/interface.d.ts
CHANGED
|
@@ -255,6 +255,11 @@ export interface MediaInfo {
|
|
|
255
255
|
fileUrl: string;
|
|
256
256
|
mediaBucket: string;
|
|
257
257
|
mediaKey: string;
|
|
258
|
+
width: number;
|
|
259
|
+
height: number;
|
|
260
|
+
angle: number;
|
|
261
|
+
position: number;
|
|
262
|
+
isVR: boolean;
|
|
258
263
|
}
|
|
259
264
|
export type LogType = "alarm_record" | "close_record" | "unlock_record" | "operation" | "local_operation";
|
|
260
265
|
export type CloseValue = "UNDEFINED" | "VOICE_REMOTE" | "APP_REMOTE" | "AUTO" | "LOCAL_MANUAL" | "FITTINGS" | "APP" | "GEO_FENCE";
|