@ray-js/lock-sdk 1.2.0-beta.19 → 1.2.0-beta.20

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
@@ -1,4 +1,16 @@
1
- import { DpValue, LocalOperateRecordInfo, MediaInfo } from "../interface";
1
+ import { DpValue, LocalOperateRecordInfo } from "../interface";
2
+ interface MediaInfoRecord {
3
+ mediaPath: string;
4
+ fileKey: string;
5
+ fileUrl: string;
6
+ mediaBucket: string;
7
+ mediaKey: string;
8
+ positionWidth: number;
9
+ positionHeight: number;
10
+ positionAngle: number;
11
+ positionVr: 0 | 1;
12
+ position: number;
13
+ }
2
14
  interface UnionUnlockInfo {
3
15
  userId: string;
4
16
  userName: string;
@@ -37,7 +49,7 @@ interface LogInfo {
37
49
  dps: Record<number, any>[];
38
50
  gmtCreate: number;
39
51
  historyId: number;
40
- mediaInfoList?: MediaInfo[];
52
+ mediaInfoList?: MediaInfoRecord[];
41
53
  memberBindableFlag: 0 | 1;
42
54
  recordId: string;
43
55
  recordType: string;
@@ -77,7 +89,7 @@ export interface LockLogListItem {
77
89
  relateDevName?: string;
78
90
  relateOpMode?: string;
79
91
  unionUnlockInfo?: UnionUnlockInfo[];
80
- mediaInfoList?: MediaInfo[];
92
+ mediaInfoList?: MediaInfoRecord[];
81
93
  localOperateRecordInfo?: LocalOperateRecordInfo;
82
94
  data?: boolean | number | string;
83
95
  dpId: number;
@@ -115,7 +127,7 @@ interface AlarmData {
115
127
  unlockName: string;
116
128
  userId: string;
117
129
  userName: string;
118
- mediaInfoList?: MediaInfo[];
130
+ mediaInfoList?: MediaInfoRecord[];
119
131
  }
120
132
  interface GetAlarmListResult {
121
133
  datas: AlarmData[];
@@ -153,7 +153,20 @@ function handleLockLogs(list, cfg) {
153
153
  userId: item.userId,
154
154
  userName: userName || "",
155
155
  unlockName: unlockName || "",
156
- mediaInfo: item.mediaInfoList,
156
+ mediaInfo: item.mediaInfoList?.map?.(item => {
157
+ return {
158
+ mediaPath: item.mediaPath,
159
+ fileKey: item.fileKey,
160
+ fileUrl: item.fileUrl,
161
+ mediaBucket: item.mediaBucket,
162
+ mediaKey: item.mediaKey,
163
+ width: item.positionWidth,
164
+ height: item.positionHeight,
165
+ angle: item.positionAngle,
166
+ isVR: !!item.positionVr,
167
+ position: item.position,
168
+ };
169
+ }),
157
170
  localRecord: handleLocalOperation(item.localOperateRecordInfo, itemData),
158
171
  unionUnlockInfo: item.unionUnlockInfo?.map((item1) => {
159
172
  return {
@@ -286,7 +299,20 @@ export async function getLogsForRuntime(rt, params) {
286
299
  dpCode,
287
300
  userName,
288
301
  unlockName,
289
- mediaInfo: record.mediaInfoList,
302
+ mediaInfo: record.mediaInfoList?.map?.(item => {
303
+ return {
304
+ mediaPath: item.mediaPath,
305
+ fileKey: item.fileKey,
306
+ fileUrl: item.fileUrl,
307
+ mediaBucket: item.mediaBucket,
308
+ mediaKey: item.mediaKey,
309
+ width: item.positionWidth,
310
+ height: item.positionHeight,
311
+ angle: item.positionAngle,
312
+ isVR: !!item.positionVr,
313
+ position: item.position,
314
+ };
315
+ }),
290
316
  unionUnlockInfo: record.unionUnlockInfo?.map((item) => ({
291
317
  userId: item.userId,
292
318
  userName: item.userName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/lock-sdk",
3
- "version": "1.2.0-beta.19",
3
+ "version": "1.2.0-beta.20",
4
4
  "files": [
5
5
  "lib",
6
6
  "LICENSE.md"