@ray-js/api 1.7.8 → 1.7.9

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.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * IPCKit
3
3
  *
4
- * @version 6.2.3
4
+ * @version 6.4.5
5
5
  */
6
6
  declare namespace ty.ipc {
7
7
  /**
@@ -1033,63 +1033,47 @@ declare namespace ty.ipc {
1033
1033
 
1034
1034
  /**
1035
1035
  *@description 播放完成回调*/
1036
- export function onPlayMessageVideoFinish(
1037
- listener: (params: MessageVideoFinishModel) => void
1038
- ): void;
1036
+ export function onPlayMessageVideoFinish(listener: (params: MessageVideoFinishModel) => void): void;
1039
1037
 
1040
1038
  /**
1041
1039
  *@description 移除监听:播放完成回调*/
1042
- export function offPlayMessageVideoFinish(
1043
- listener: (params: MessageVideoFinishModel) => void
1044
- ): void;
1040
+ export function offPlayMessageVideoFinish(listener: (params: MessageVideoFinishModel) => void): void;
1045
1041
 
1046
1042
  /**
1047
1043
  *@description 下载进度事件*/
1048
- export function onCloudPlayBackDownloadProgress(
1049
- listener: (params: cloudPlayBackDownloadProgressBody) => void
1050
- ): void;
1044
+ export function onCloudPlayBackDownloadProgress(listener: (params: cloudPlayBackDownloadProgressBody) => void): void;
1051
1045
 
1052
1046
  /**
1053
1047
  *@description 移除监听:下载进度事件*/
1054
- export function offCloudPlayBackDownloadProgress(
1055
- listener: (params: cloudPlayBackDownloadProgressBody) => void
1056
- ): void;
1048
+ export function offCloudPlayBackDownloadProgress(listener: (params: cloudPlayBackDownloadProgressBody) => void): void;
1057
1049
 
1058
1050
  /**
1059
1051
  *@description identifying bird view action trigger*/
1060
1052
  export function onIdentifyingBirdViewActionTrigger(
1061
- listener: (params: IdentifyBirdViewActionTriggerEvent) => void
1053
+ listener: (params: IdentifyBirdViewActionTriggerEvent) => void,
1062
1054
  ): void;
1063
1055
 
1064
1056
  /**
1065
1057
  *@description 移除监听:identifying bird view action trigger*/
1066
1058
  export function offIdentifyingBirdViewActionTrigger(
1067
- listener: (params: IdentifyBirdViewActionTriggerEvent) => void
1059
+ listener: (params: IdentifyBirdViewActionTriggerEvent) => void,
1068
1060
  ): void;
1069
1061
 
1070
1062
  /**
1071
1063
  *@description 视频下载结束*/
1072
- export function onDownloadMessageVideoFinished(
1073
- listener: (params: DownloadMessageVideoFinishedModel) => void
1074
- ): void;
1064
+ export function onDownloadMessageVideoFinished(listener: (params: DownloadMessageVideoFinishedModel) => void): void;
1075
1065
 
1076
1066
  /**
1077
1067
  *@description 移除监听:视频下载结束*/
1078
- export function offDownloadMessageVideoFinished(
1079
- listener: (params: DownloadMessageVideoFinishedModel) => void
1080
- ): void;
1068
+ export function offDownloadMessageVideoFinished(listener: (params: DownloadMessageVideoFinishedModel) => void): void;
1081
1069
 
1082
1070
  /**
1083
1071
  *@description 视频下载进度*/
1084
- export function onDownloadMessageVideoProgress(
1085
- listener: (params: DownloadMessageVideoProgressModel) => void
1086
- ): void;
1072
+ export function onDownloadMessageVideoProgress(listener: (params: DownloadMessageVideoProgressModel) => void): void;
1087
1073
 
1088
1074
  /**
1089
1075
  *@description 移除监听:视频下载进度*/
1090
- export function offDownloadMessageVideoProgress(
1091
- listener: (params: DownloadMessageVideoProgressModel) => void
1092
- ): void;
1076
+ export function offDownloadMessageVideoProgress(listener: (params: DownloadMessageVideoProgressModel) => void): void;
1093
1077
 
1094
1078
  /**
1095
1079
  *@description 面板调试日志事件*/
@@ -1105,21 +1089,15 @@ declare namespace ty.ipc {
1105
1089
 
1106
1090
  /**
1107
1091
  *@description 移除监听:门铃呼叫挂断事件*/
1108
- export function offDoorBellCallHangUp(
1109
- listener: (params: DoorbellCallEventResponse) => void
1110
- ): void;
1092
+ export function offDoorBellCallHangUp(listener: (params: DoorbellCallEventResponse) => void): void;
1111
1093
 
1112
1094
  /**
1113
1095
  *@description 其他终端挂断门铃呼叫事件*/
1114
- export function onDoorBellCallHangUpByOther(
1115
- listener: (params: DoorbellCallEventResponse) => void
1116
- ): void;
1096
+ export function onDoorBellCallHangUpByOther(listener: (params: DoorbellCallEventResponse) => void): void;
1117
1097
 
1118
1098
  /**
1119
1099
  *@description 移除监听:其他终端挂断门铃呼叫事件*/
1120
- export function offDoorBellCallHangUpByOther(
1121
- listener: (params: DoorbellCallEventResponse) => void
1122
- ): void;
1100
+ export function offDoorBellCallHangUpByOther(listener: (params: DoorbellCallEventResponse) => void): void;
1123
1101
 
1124
1102
  /**
1125
1103
  *@description 取消门铃呼叫事件*/
@@ -1127,9 +1105,7 @@ declare namespace ty.ipc {
1127
1105
 
1128
1106
  /**
1129
1107
  *@description 移除监听:取消门铃呼叫事件*/
1130
- export function offDoorBellCallCancel(
1131
- listener: (params: DoorbellCallEventResponse) => void
1132
- ): void;
1108
+ export function offDoorBellCallCancel(listener: (params: DoorbellCallEventResponse) => void): void;
1133
1109
 
1134
1110
  export type Object = {};
1135
1111
 
@@ -18,4 +18,5 @@ export declare const ai: {
18
18
  onVideoObjectDetectProgress: typeof ty.ai.onVideoObjectDetectProgress;
19
19
  offVideoObjectDetectProgress: typeof ty.ai.offVideoObjectDetectProgress;
20
20
  generateTranslateTask: typeof ty.ai.generateTranslateTask;
21
+ privacyProtectDetectForVideo: typeof ty.ai.privacyProtectDetectForVideo;
21
22
  };
@@ -61,5 +61,8 @@ export const ai = {
61
61
  }),
62
62
  generateTranslateTask: factory('generateTranslateTask', {
63
63
  "namespace": "ai"
64
+ }),
65
+ privacyProtectDetectForVideo: factory('privacyProtectDetectForVideo', {
66
+ "namespace": "ai"
64
67
  })
65
68
  };
@@ -71,4 +71,7 @@ export declare const ipc: {
71
71
  uploadAppLog: typeof ty.ipc.uploadAppLog;
72
72
  uploadDeviceLog: typeof ty.ipc.uploadDeviceLog;
73
73
  wakeUpDoorBell: typeof ty.ipc.wakeUpDoorBell;
74
+ startDownloadMessageVideoForComposition: typeof ty.ipc.startDownloadMessageVideoForComposition;
75
+ destroyMediaDevice: typeof ty.ipc.destroyMediaDevice;
76
+ isSupportWonderfulMoment: typeof ty.ipc.isSupportWonderfulMoment;
74
77
  };
@@ -220,5 +220,14 @@ export const ipc = {
220
220
  }),
221
221
  wakeUpDoorBell: factory('wakeUpDoorBell', {
222
222
  "namespace": "ipc"
223
+ }),
224
+ startDownloadMessageVideoForComposition: factory('startDownloadMessageVideoForComposition', {
225
+ "namespace": "ipc"
226
+ }),
227
+ destroyMediaDevice: factory('destroyMediaDevice', {
228
+ "namespace": "ipc"
229
+ }),
230
+ isSupportWonderfulMoment: factory('isSupportWonderfulMoment', {
231
+ "namespace": "ipc"
223
232
  })
224
233
  };
package/lib/all-kits.d.ts CHANGED
@@ -10,5 +10,5 @@ export * from './OutdoorKit-1.0.4';
10
10
  export * from './MediaKit-3.4.1';
11
11
  import * as device from './DeviceKit-4.13.1';
12
12
  export { device };
13
- export * from './AIKit-1.0.0';
14
- export * from './IPCKit-6.2.3';
13
+ export * from './AIKit-1.2.0';
14
+ export * from './IPCKit-6.4.5';
package/lib/all-kits.js CHANGED
@@ -10,5 +10,5 @@ export * from './OutdoorKit-1.0.4';
10
10
  export * from './MediaKit-3.4.1';
11
11
  import * as device from './DeviceKit-4.13.1';
12
12
  export { device };
13
- export * from './AIKit-1.0.0';
14
- export * from './IPCKit-6.2.3';
13
+ export * from './AIKit-1.2.0';
14
+ export * from './IPCKit-6.4.5';
@@ -0,0 +1,117 @@
1
+ import { AiVisualBox, AiVisualNeedCopyQueryParams, AiVisualNeedCopyQueryResult, AlbumSettingEditReq, AlbumSettingSaveReq, CustomEventCheckParams, CustomEventCheckResult, CustomVisionEventCheckParams, CustomVisionEventCheckRet, DeleteAiVisualMessageList, DeviceDetails, DeviceServiceConfigItemDto, GetAiVisualBoxInfoParams, GetAiVisualMessageKey, GetAiVisualMessageKeyRes, GetAiVisualPresetEventParams, GetAlbumSettingReq, GetDeviceConfigParams, GetDeviceConfigResult, GetMessageListRes, GetSmartEventSwitchStateParams, GetSmartEventSwitchStateResult, IAlbumFileDeleteReq, IAlbumFileDeleteRes, IAlbumVideoDateCountReq, IAlbumVideoDateCountRes, IAlbumVideoFileDetailReq, IAlbumVideoFileDetailRes, IAlbumVideoFileListReq, IAlbumVideoFileListRes, Options, PresetEvent, QueryBindDeviceDto, QueryCameraListDto, QueryGetAiVisualList, QueryGetAiVisualReportList, QueryGetDeviceDetailsById, QueryGetMessageList, QueryServiceDetailDto, ResBindDeviceDto, SaveAiVisualBoxInfoParams, ServiceDetailDto, TimeAlbumSettingDto, UpdateDeviceConfigParams, UpdateSwitchStateParams, VisionBoxDto, VisionBoxReport } from './interface';
2
+ /**
3
+ * 获取 App 面板内静态资源地址
4
+ */
5
+ declare function getMessageList(params: QueryGetMessageList): Promise<GetMessageListRes>;
6
+ /**
7
+ * 获取ipc业务数据密钥 获取消息图片的密钥
8
+ */
9
+ declare function getAiVisualMessageKey(params: GetAiVisualMessageKey[]): Promise<GetAiVisualMessageKeyRes[]>;
10
+ /**
11
+ * 查询智能视觉魔方报告列表
12
+ */
13
+ declare function getAiVisualReportList(params: QueryGetAiVisualReportList): Promise<VisionBoxReport[]>;
14
+ /**
15
+ * 刪除消息,用于批量删除分类消息,也可用于批量删除消息
16
+ */
17
+ declare function deleteAiVisualMessage(params: DeleteAiVisualMessageList): Promise<{
18
+ result: string;
19
+ success: boolean;
20
+ }>;
21
+ /**
22
+ * 查询视觉魔方信息
23
+ */
24
+ declare function getAiVisualBoxInfo(params: GetAiVisualBoxInfoParams): Promise<AiVisualBox>;
25
+ /**
26
+ * 保存视觉魔方信息
27
+ */
28
+ declare function saveAiVisualBoxInfo(params: SaveAiVisualBoxInfoParams, atopOptions?: Options): Promise<string | number>;
29
+ /**
30
+ * 查询其对应的视觉魔方是否有正在同步的配置
31
+ */
32
+ declare function aiVisualNeedCopyQuery(params: AiVisualNeedCopyQueryParams): Promise<AiVisualNeedCopyQueryResult>;
33
+ /**
34
+ * 以家庭维度获取文件解密密钥接口
35
+ */
36
+ declare function getStorageSecret(params: {
37
+ gid: string;
38
+ }): Promise<string>;
39
+ /**
40
+ * 查看单个设备设备详情
41
+ */
42
+ declare function getDeviceDetailsById(params: QueryGetDeviceDetailsById): Promise<DeviceDetails>;
43
+ /**
44
+ * 获取家庭摄像头设备列表
45
+ */
46
+ declare function getCameraList(params: QueryCameraListDto): Promise<ResBindDeviceDto>;
47
+ /**
48
+ * 绑定或解绑设备
49
+ */
50
+ declare function bindDevice(params: QueryBindDeviceDto): Promise<boolean>;
51
+ /**
52
+ * 自定义事件校验
53
+ */
54
+ declare function customEventCheck(params: CustomEventCheckParams): Promise<CustomEventCheckResult>;
55
+ /**
56
+ * 查询智能事件开关
57
+ */
58
+ declare function getSmartEventSwitchState(params: GetSmartEventSwitchStateParams): Promise<GetSmartEventSwitchStateResult>;
59
+ /**
60
+ * 查询智能事件开关
61
+ */
62
+ declare function updateSmartEventSwitchState(params: UpdateSwitchStateParams): Promise<boolean>;
63
+ /**
64
+ * 获取设备服务配置项
65
+ */
66
+ declare function getDeviceConfig(params: GetDeviceConfigParams): Promise<GetDeviceConfigResult & {
67
+ uuid: string;
68
+ }>;
69
+ /**
70
+ * 设备服务配置项修改
71
+ */
72
+ declare function updateDeviceConfig(params: UpdateDeviceConfigParams): Promise<DeviceServiceConfigItemDto['configId']>;
73
+ /**
74
+ * 服务详情信息
75
+ */
76
+ declare function getServiceDetail(params: QueryServiceDetailDto): Promise<ServiceDetailDto>;
77
+ /**
78
+ * 时光相册智能视频日期统计
79
+ */
80
+ declare function albumVideoDateCount(params: IAlbumVideoDateCountReq): Promise<IAlbumVideoDateCountRes[]>;
81
+ /**
82
+ * 时光相册录像文件列表
83
+ */
84
+ declare function albumVideoFileList(params: IAlbumVideoFileListReq): Promise<IAlbumVideoFileListRes>;
85
+ /**
86
+ * 时光相册录像文件详情
87
+ */
88
+ declare function albumVideoFileDetail(params: IAlbumVideoFileDetailReq): Promise<IAlbumVideoFileDetailRes>;
89
+ /**
90
+ * 删除时光相册相簿文件
91
+ */
92
+ declare function albumFileDelete(params: IAlbumFileDeleteReq): Promise<IAlbumFileDeleteRes>;
93
+ /**
94
+ * 时光相册配置保存
95
+ */
96
+ declare function albumSettingSave(params: AlbumSettingSaveReq): Promise<boolean>;
97
+ /**
98
+ * 时光相册配置修改
99
+ */
100
+ declare function albumSettingEdit(params: AlbumSettingEditReq): Promise<boolean>;
101
+ /**
102
+ * 时光相册配置查询
103
+ */
104
+ declare function getAlbumSetting(params: GetAlbumSettingReq): Promise<TimeAlbumSettingDto>;
105
+ /**
106
+ * 查询智能视觉魔方列表(关联服务)
107
+ */
108
+ declare function getVisualBoxList(params: QueryGetAiVisualList): Promise<VisionBoxDto[]>;
109
+ /**
110
+ * 查询智能视觉魔方列表预置事件
111
+ */
112
+ declare function getPresetEvent(params: GetAiVisualPresetEventParams): Promise<PresetEvent[]>;
113
+ /**
114
+ * 视觉魔方自定义语义校验
115
+ */
116
+ declare function visualBoxEventCheck(params: CustomVisionEventCheckParams): Promise<CustomVisionEventCheckRet>;
117
+ export { getMessageList, getAiVisualMessageKey, getAiVisualReportList, deleteAiVisualMessage, getAiVisualBoxInfo, saveAiVisualBoxInfo, aiVisualNeedCopyQuery, getStorageSecret, getDeviceDetailsById, getCameraList, bindDevice, customEventCheck, getSmartEventSwitchState, updateSmartEventSwitchState, getDeviceConfig, updateDeviceConfig, getServiceDetail, albumVideoDateCount, albumVideoFileList, albumVideoFileDetail, albumFileDelete, albumSettingSave, albumSettingEdit, getAlbumSetting, getVisualBoxList, getPresetEvent, visualBoxEventCheck, };
@@ -0,0 +1,265 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ // 通用核心接口
3
+
4
+ import { THING } from '../constants';
5
+ const JsonUtil = {
6
+ parseJSON(str) {
7
+ let rst;
8
+ if (str && {}.toString.call(str) === '[object String]') {
9
+ try {
10
+ rst = JSON.parse(str);
11
+ } catch (e) {
12
+ try {
13
+ // eslint-disable-next-line
14
+ rst = eval(`(${str})`);
15
+ } catch (e2) {
16
+ rst = str;
17
+ }
18
+ }
19
+ } else {
20
+ rst = typeof str === 'undefined' ? {} : str;
21
+ }
22
+ return rst;
23
+ }
24
+ };
25
+
26
+ /**
27
+ transError 为 true 的情况下走到
28
+ apiRequestByAtop 的 fail 回调时
29
+ 会 resolve false
30
+ 为 false 的情况下则 reject 错误信息
31
+ */
32
+ const requestFunc = function (a, postData) {
33
+ let v = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '1.0';
34
+ let options = arguments.length > 3 ? arguments[3] : undefined;
35
+ return new Promise((resolve, reject) => {
36
+ ty.apiRequestByAtop(_objectSpread(_objectSpread({}, {
37
+ api: a,
38
+ postData: postData,
39
+ version: v
40
+ }), {}, {
41
+ success: d => {
42
+ const data = typeof d === 'string' ? JsonUtil.parseJSON(d) : d;
43
+ resolve(data);
44
+ },
45
+ fail: err => {
46
+ const errObj = err.innerError || err;
47
+ const {
48
+ toastError = true,
49
+ transError = true
50
+ } = options || {};
51
+ console.log('api fail', errObj);
52
+ console.log(a);
53
+ if (transError) {
54
+ resolve(false);
55
+ } else {
56
+ reject(errObj);
57
+ }
58
+ if (toastError) {
59
+ ty.showToast({
60
+ title: errObj.errorMsg,
61
+ icon: 'error'
62
+ });
63
+ }
64
+ }
65
+ }));
66
+ });
67
+ };
68
+
69
+ /**
70
+ * 获取 App 面板内静态资源地址
71
+ */
72
+ function getMessageList(params) {
73
+ const _params = {
74
+ json: JSON.stringify(_objectSpread({
75
+ keepOrig: true,
76
+ msgType: 4
77
+ }, params))
78
+ };
79
+ return requestFunc(`${THING}.m.msg.list.by.json`, _params, '2.0');
80
+ }
81
+
82
+ /**
83
+ * 获取ipc业务数据密钥 获取消息图片的密钥
84
+ */
85
+ function getAiVisualMessageKey(params) {
86
+ return requestFunc(`${THING}.m.ipc.biz.key.get`, {
87
+ input: JSON.stringify(params)
88
+ }, '1.0');
89
+ }
90
+
91
+ /**
92
+ * 查询智能视觉魔方报告列表
93
+ */
94
+ function getAiVisualReportList(params) {
95
+ return requestFunc('m.ipc.smart.vision.box.report.list', params, '1.0');
96
+ }
97
+
98
+ /**
99
+ * 刪除消息,用于批量删除分类消息,也可用于批量删除消息
100
+ */
101
+ function deleteAiVisualMessage(params) {
102
+ return requestFunc(`${THING}.m.msg.remove`, params, '2.0');
103
+ }
104
+
105
+ /**
106
+ * 查询视觉魔方信息
107
+ */
108
+ function getAiVisualBoxInfo(params) {
109
+ return requestFunc('m.ipc.smart.vision.box.info.query', params, '1.0');
110
+ }
111
+
112
+ /**
113
+ * 保存视觉魔方信息
114
+ */
115
+ function saveAiVisualBoxInfo(params, atopOptions) {
116
+ return requestFunc('m.ipc.smart.vision.box.info.save', params, '1.0', atopOptions);
117
+ }
118
+
119
+ /**
120
+ * 查询其对应的视觉魔方是否有正在同步的配置
121
+ */
122
+ function aiVisualNeedCopyQuery(params) {
123
+ return requestFunc('m.ipc.smart.vision.box.record.query', params, '1.0');
124
+ }
125
+
126
+ /**
127
+ * 以家庭维度获取文件解密密钥接口
128
+ */
129
+ function getStorageSecret(params) {
130
+ return requestFunc('m.ipc.storage.secret.get', params, '1.0');
131
+ }
132
+
133
+ /**
134
+ * 查看单个设备设备详情
135
+ */
136
+ function getDeviceDetailsById(params) {
137
+ return requestFunc('m.ecm.cvas.camera.bind.detail', params, '2.0');
138
+ }
139
+
140
+ /**
141
+ * 获取家庭摄像头设备列表
142
+ */
143
+ function getCameraList(params) {
144
+ return requestFunc('m.ecm.cvas.h5.home.camera.list', params, '1.0');
145
+ }
146
+
147
+ /**
148
+ * 绑定或解绑设备
149
+ */
150
+ function bindDevice(params) {
151
+ return requestFunc('m.ecm.cvas.device.bind', params, '1.0');
152
+ }
153
+
154
+ /**
155
+ * 自定义事件校验
156
+ */
157
+ function customEventCheck(params) {
158
+ return requestFunc('m.ipc.smart.event.check', params, '1.0');
159
+ }
160
+
161
+ /**
162
+ * 查询智能事件开关
163
+ */
164
+ function getSmartEventSwitchState(params) {
165
+ return requestFunc('m.ipc.service.device.config.switch.query', params, '1.0');
166
+ }
167
+
168
+ /**
169
+ * 查询智能事件开关
170
+ */
171
+ function updateSmartEventSwitchState(params) {
172
+ return requestFunc('m.ipc.service.device.config.switch.update', params, '2.0');
173
+ }
174
+
175
+ /**
176
+ * 获取设备服务配置项
177
+ */
178
+ function getDeviceConfig(params) {
179
+ return requestFunc('m.ipc.service.device.config.query', params, '1.0');
180
+ }
181
+
182
+ /**
183
+ * 设备服务配置项修改
184
+ */
185
+ function updateDeviceConfig(params) {
186
+ return requestFunc('m.ipc.service.device.config.update', params, '2.0');
187
+ }
188
+
189
+ /**
190
+ * 服务详情信息
191
+ */
192
+ function getServiceDetail(params) {
193
+ return requestFunc('m.ecm.cvas.my.service.detail', params, '1.0');
194
+ }
195
+
196
+ /**
197
+ * 时光相册智能视频日期统计
198
+ */
199
+ function albumVideoDateCount(params) {
200
+ return requestFunc('m.ipc.time.album.video.date.count', params, '1.0');
201
+ }
202
+
203
+ /**
204
+ * 时光相册录像文件列表
205
+ */
206
+ function albumVideoFileList(params) {
207
+ return requestFunc('m.ipc.time.album.video.file.list', params, '1.0');
208
+ }
209
+
210
+ /**
211
+ * 时光相册录像文件详情
212
+ */
213
+ function albumVideoFileDetail(params) {
214
+ return requestFunc('m.ipc.time.album.video.file.detail', params, '1.0');
215
+ }
216
+
217
+ /**
218
+ * 删除时光相册相簿文件
219
+ */
220
+ function albumFileDelete(params) {
221
+ return requestFunc('m.ipc.time.album.file.delete', params, '1.0');
222
+ }
223
+
224
+ /**
225
+ * 时光相册配置保存
226
+ */
227
+ function albumSettingSave(params) {
228
+ return requestFunc('m.ipc.time.album.config.save', params, '1.0');
229
+ }
230
+
231
+ /**
232
+ * 时光相册配置修改
233
+ */
234
+ function albumSettingEdit(params) {
235
+ return requestFunc('m.ipc.time.album.config.edit', params, '1.0');
236
+ }
237
+
238
+ /**
239
+ * 时光相册配置查询
240
+ */
241
+ function getAlbumSetting(params) {
242
+ return requestFunc('m.ipc.time.album.config.get', params, '1.0');
243
+ }
244
+
245
+ /**
246
+ * 查询智能视觉魔方列表(关联服务)
247
+ */
248
+ function getVisualBoxList(params) {
249
+ return requestFunc('m.ipc.smart.vision.box.list', params, '1.0');
250
+ }
251
+
252
+ /**
253
+ * 查询智能视觉魔方列表预置事件
254
+ */
255
+ function getPresetEvent(params) {
256
+ return requestFunc('m.ipc.service.business.config.query', params, '1.0');
257
+ }
258
+
259
+ /**
260
+ * 视觉魔方自定义语义校验
261
+ */
262
+ function visualBoxEventCheck(params) {
263
+ return requestFunc('m.ipc.smart.vision.box.event.check', params, '1.0');
264
+ }
265
+ export { getMessageList, getAiVisualMessageKey, getAiVisualReportList, deleteAiVisualMessage, getAiVisualBoxInfo, saveAiVisualBoxInfo, aiVisualNeedCopyQuery, getStorageSecret, getDeviceDetailsById, getCameraList, bindDevice, customEventCheck, getSmartEventSwitchState, updateSmartEventSwitchState, getDeviceConfig, updateDeviceConfig, getServiceDetail, albumVideoDateCount, albumVideoFileList, albumVideoFileDetail, albumFileDelete, albumSettingSave, albumSettingEdit, getAlbumSetting, getVisualBoxList, getPresetEvent, visualBoxEventCheck };
@@ -4,6 +4,7 @@ export * from './alarm';
4
4
  export * from './statistic';
5
5
  export * from './device';
6
6
  export * from './linkage';
7
+ export * from './highlights';
7
8
  export * from './remoteGroup';
8
9
  export * from './outdoor';
9
10
  export * from './doorlock';
@@ -4,6 +4,7 @@ export * from './alarm';
4
4
  export * from './statistic';
5
5
  export * from './device';
6
6
  export * from './linkage';
7
+ export * from './highlights';
7
8
  export * from './remoteGroup';
8
9
 
9
10
  // 仅用于出行产品
@@ -1421,4 +1421,482 @@ export type IGetZigbeeLocalGroupDeviceListResponse = Array<{
1421
1421
  */
1422
1422
  gwOnline: boolean;
1423
1423
  }>;
1424
+ export type QueryGetMessageList = {
1425
+ sourceIds: string[];
1426
+ limit: number;
1427
+ offset: number;
1428
+ };
1429
+ export interface VisionBoxMessage {
1430
+ msgTypeContent: string;
1431
+ msgContent: string;
1432
+ time: number;
1433
+ msgTitle: string;
1434
+ dateTime: string;
1435
+ attachPics: string;
1436
+ id: number;
1437
+ idStr: string;
1438
+ homeId: number;
1439
+ msgSrcId: string;
1440
+ businessKey: string;
1441
+ }
1442
+ export type GetMessageListRes = {
1443
+ pageNo: number;
1444
+ datas: VisionBoxMessage[];
1445
+ totalCount: number;
1446
+ class: string;
1447
+ };
1448
+ export type Options = {
1449
+ toastError?: boolean;
1450
+ transError?: boolean;
1451
+ };
1452
+ export type GetAiVisualMessageKey = {
1453
+ businessNo: string;
1454
+ deviceId: string;
1455
+ time: number;
1456
+ homeId: string;
1457
+ };
1458
+ export type GetAiVisualMessageKeyRes = {
1459
+ businessNo: string;
1460
+ businessKey: string;
1461
+ };
1462
+ export type QueryGetAiVisualReportList = {
1463
+ gid: string;
1464
+ visionBoxId: string;
1465
+ offset: number;
1466
+ limit: number;
1467
+ };
1468
+ export declare const enum ReportType {
1469
+ DAILY = 1,
1470
+ WEEKLY = 2
1471
+ }
1472
+ export interface EventInfo {
1473
+ eventOrderValue: number;
1474
+ eventCode: string;
1475
+ eventName: string;
1476
+ eventNum: number;
1477
+ eventAverageNumPerDay?: number;
1478
+ }
1479
+ export interface relatedFileList {
1480
+ bucket: string;
1481
+ filePath: string;
1482
+ signUrl: string;
1483
+ uuid: string;
1484
+ }
1485
+ export interface VisionBoxReport {
1486
+ visionBoxId: string;
1487
+ modelName: string;
1488
+ reportId: string;
1489
+ reportType: ReportType;
1490
+ reportTitleName: string;
1491
+ reportContent?: {
1492
+ totalEventNum: number;
1493
+ eventInfoList: EventInfo[];
1494
+ };
1495
+ summaryAndSuggestion: string;
1496
+ detailTitle: string;
1497
+ totalNumTitle: string;
1498
+ reportState: number;
1499
+ reportStateName: string;
1500
+ relatedFileList?: relatedFileList[];
1501
+ reportKey?: string;
1502
+ }
1503
+ export type DeleteAiVisualMessageList = {
1504
+ msgType: number;
1505
+ ids?: string;
1506
+ msgSrcIds?: string;
1507
+ };
1508
+ export type GetAiVisualBoxInfoParams = {
1509
+ stockId: string;
1510
+ visionBoxId?: string;
1511
+ gid: string;
1512
+ };
1513
+ export declare const enum VisionEventType {
1514
+ PRESET = 0,
1515
+ CUSTOM = 1
1516
+ }
1517
+ export declare const enum SceneType {
1518
+ security = 0,
1519
+ album = 1
1520
+ }
1521
+ export interface VisionBoxEvent {
1522
+ eventCode: string;
1523
+ eventValue: string;
1524
+ eventType: VisionEventType;
1525
+ }
1526
+ export interface AiVisualBox {
1527
+ visionBoxId: string;
1528
+ visionBoxName: string;
1529
+ serviceStockId: string;
1530
+ visionBoxState: 0 | 1;
1531
+ generateDescState: 0 | 1;
1532
+ reportTypeList: ReportType[];
1533
+ reportLangType: string;
1534
+ visionBoxEventList: VisionBoxEvent[];
1535
+ sceneType: SceneType;
1536
+ }
1537
+ export interface SaveAiVisualBoxInfoParams {
1538
+ gid: string;
1539
+ stockId: string;
1540
+ visionBoxId?: string;
1541
+ visionBoxInfoContent: Omit<AiVisualBox, 'visionBoxId' | 'serviceStockId'>;
1542
+ }
1543
+ export type AiVisualNeedCopyQueryParams = {
1544
+ stockId: string;
1545
+ gid: string;
1546
+ };
1547
+ export type AiVisualNeedCopyQueryResult = {
1548
+ scenesType: SceneType;
1549
+ visionBoxId?: number;
1550
+ needCopyEvent: boolean;
1551
+ };
1552
+ export type QueryGetDeviceDetailsById = {
1553
+ homeId: string;
1554
+ uuid: string;
1555
+ categoryCode: string;
1556
+ };
1557
+ export declare const enum PlanStatus {
1558
+ USING = 1
1559
+ }
1560
+ export declare const enum DeviceBindStatus {
1561
+ BINDING = 1,// 已绑定
1562
+ NOT_SUPPORT = 2,// 不支持
1563
+ NOT_BIND = 3
1564
+ }
1565
+ export interface DeviceBaseInfo {
1566
+ icon: string;
1567
+ name: string;
1568
+ ownerId: string;
1569
+ uuid: string;
1570
+ roomName: string;
1571
+ deviceId: string;
1572
+ isBind: DeviceBindStatus;
1573
+ status: boolean;
1574
+ aiSmartFreeDev: boolean;
1575
+ }
1576
+ export interface PlanInfoDto {
1577
+ commodityCode: string;
1578
+ commodityName: string;
1579
+ env: number;
1580
+ instanceId: string;
1581
+ isSubscribe: 0 | 1;
1582
+ orderNo: number;
1583
+ planStatus: PlanStatus;
1584
+ serviceBeginTime: number;
1585
+ serviceEndTime: number;
1586
+ stockId: string;
1587
+ isCanceled: 0 | 1;
1588
+ isAdditional: 0 | 1;
1589
+ }
1590
+ export interface DeviceInfo extends DeviceBaseInfo {
1591
+ productId: string;
1592
+ planList?: PlanInfoDto[];
1593
+ isUseFreeService: 0 | 1;
1594
+ isUseCommonUserTrail: 0 | 1;
1595
+ isUseCommonDeviceTrail: 0 | 1;
1596
+ isTried?: 0 | 1;
1597
+ hasServiceOrder?: boolean;
1598
+ }
1599
+ export interface DeviceDetails extends DeviceInfo {
1600
+ haveAvailableService: 0 | 1;
1601
+ activeStockIdList: string[];
1602
+ }
1603
+ export type QueryCameraListDto = {
1604
+ homeId: string;
1605
+ stockId?: string;
1606
+ pids?: string;
1607
+ /** 0 设备级,1 账号级 */
1608
+ ownerType?: 1 | 0;
1609
+ serviceCode?: string;
1610
+ commodityCode?: string;
1611
+ categoryCode: string;
1612
+ };
1613
+ export type BindDeviceInfo = DeviceInfo & {
1614
+ isBindCurrentService: boolean;
1615
+ };
1616
+ export type ResBindDeviceDto = {
1617
+ totalDevices: number;
1618
+ bindDeviceNum: number;
1619
+ list: BindDeviceInfo[];
1620
+ };
1621
+ export type QueryBindDeviceDto = {
1622
+ homeId: string;
1623
+ stockId: string;
1624
+ bindUuidList?: string[];
1625
+ unBindUuidList?: string[];
1626
+ };
1627
+ export type ServiceBusinessType = 'aiSmartFreeEvent' | 'aiSmartFreeEventImage2Text';
1628
+ export type CustomEventCheckParams = {
1629
+ eventValue: string;
1630
+ devId: string;
1631
+ serviceBusinessType: ServiceBusinessType;
1632
+ };
1633
+ export type CustomEventCheckResult = {
1634
+ available: boolean;
1635
+ recommend?: string[];
1636
+ };
1637
+ export type GetSmartEventSwitchStateParams = {
1638
+ devId: string;
1639
+ serviceBusinessType: ServiceBusinessType;
1640
+ };
1641
+ export type GetSmartEventSwitchStateResult = {
1642
+ hadService: boolean;
1643
+ switchState: 0 | 1;
1644
+ extContent: string;
1645
+ };
1646
+ export type UpdateSwitchStateParams = {
1647
+ devId: string;
1648
+ switchState: 0 | 1;
1649
+ serviceBusinessType: ServiceBusinessType;
1650
+ extContent: string;
1651
+ };
1652
+ export type GetDeviceConfigParams = {
1653
+ devId: string;
1654
+ serviceBusinessType: ServiceBusinessType;
1655
+ };
1656
+ export declare const enum DeviceServiceConfigState {
1657
+ Delete = 0,
1658
+ Available = 1,
1659
+ Unavailable = 2
1660
+ }
1661
+ export interface DeviceServiceConfigItemDto {
1662
+ configId: number;
1663
+ configCode: string;
1664
+ configType: VisionEventType;
1665
+ configValue: string;
1666
+ configCodeIcon?: string;
1667
+ configState: DeviceServiceConfigState;
1668
+ }
1669
+ export type GetDeviceConfigResult = {
1670
+ hadService: boolean;
1671
+ switchState: 0 | 1;
1672
+ configItemList: DeviceServiceConfigItemDto[];
1673
+ };
1674
+ export type UpdateDeviceConfigParams = {
1675
+ devId: string;
1676
+ configId?: DeviceServiceConfigItemDto['configId'];
1677
+ configCode: DeviceServiceConfigItemDto['configCode'];
1678
+ configValue?: DeviceServiceConfigItemDto['configValue'];
1679
+ configType: DeviceServiceConfigItemDto['configType'];
1680
+ enableState: DeviceServiceConfigItemDto['configState'];
1681
+ serviceBusinessType: ServiceBusinessType;
1682
+ };
1683
+ export type QueryServiceDetailDto = {
1684
+ homeId: string;
1685
+ stockId: string;
1686
+ };
1687
+ export declare const enum StockStatus {
1688
+ NO_ENABLE = 1,// 未启用
1689
+ ENABLED = 2
1690
+ }
1691
+ export interface BaseServiceInfo {
1692
+ /**
1693
+ * 封面
1694
+ */
1695
+ cover: string;
1696
+ /**
1697
+ * 套餐名
1698
+ */
1699
+ commodityName: string;
1700
+ /**
1701
+ * 购买库存 ID
1702
+ */
1703
+ stockId: string;
1704
+ /**
1705
+ * 套餐编码
1706
+ */
1707
+ commodityCode: string;
1708
+ /**
1709
+ * 服务周期
1710
+ */
1711
+ duration: number;
1712
+ /**
1713
+ * 服务周期的字符串表示
1714
+ */
1715
+ durationDesc: string;
1716
+ /**
1717
+ * 服务开始时间
1718
+ */
1719
+ serviceBeginTime?: number;
1720
+ /**
1721
+ * 服务到期时间
1722
+ */
1723
+ serviceEndTime?: number;
1724
+ /**
1725
+ * 是否为订阅商品
1726
+ */
1727
+ isSubscribe: 0 | 1;
1728
+ /**
1729
+ * 是否未来支付
1730
+ */
1731
+ isFuturePayments: 0 | 1;
1732
+ /**
1733
+ * 是否已退订
1734
+ * 0 未退订; 1 已退订
1735
+ */
1736
+ isCanceled?: 0 | 1;
1737
+ /**
1738
+ * 启用状态
1739
+ * 1 未启用 2 启用中
1740
+ */
1741
+ stockStatus: StockStatus;
1742
+ /**
1743
+ * 是否随机服务
1744
+ */
1745
+ isAdditional?: 1 | 0;
1746
+ }
1747
+ export interface ServiceDetailDto extends BaseServiceInfo {
1748
+ /**
1749
+ * 订阅 ID
1750
+ */
1751
+ subscribeId?: string;
1752
+ /**
1753
+ * 未来支付计划 ID
1754
+ */
1755
+ planId?: string;
1756
+ /**
1757
+ * 云存储已绑定设备列表
1758
+ */
1759
+ instanceList?: DeviceInfo[];
1760
+ /**
1761
+ * 是否支持退订
1762
+ * 0 不支持; 1 支持
1763
+ */
1764
+ supportCancel?: 0 | 1;
1765
+ /**
1766
+ * 服务对应的商品的上架状态
1767
+ */
1768
+ isPublish: 0 | 1;
1769
+ /**
1770
+ * 根机服务绑定的 uuid
1771
+ */
1772
+ additionalUuid: string;
1773
+ /**
1774
+ * 是否允许智能魔方能力的服务
1775
+ */
1776
+ hasAigcProtectService?: boolean;
1777
+ /**
1778
+ * 服务大类
1779
+ */
1780
+ categoryCode: string;
1781
+ cloudService?: {
1782
+ /**
1783
+ * 绑定设备数量
1784
+ */
1785
+ bindDeviceNum: number;
1786
+ /**
1787
+ * 总数量
1788
+ */
1789
+ totalDevices: number;
1790
+ };
1791
+ }
1792
+ export interface IAlbumVideoDateCountReq {
1793
+ stockId: number;
1794
+ gid: string;
1795
+ timeAlbumId: number;
1796
+ type?: string;
1797
+ }
1798
+ interface IFileUrl {
1799
+ fileUrl: string;
1800
+ fileName?: string;
1801
+ }
1802
+ export interface IAlbumVideoDateCountRes {
1803
+ type: string;
1804
+ description: string;
1805
+ startTime: number;
1806
+ endTime: number;
1807
+ coverInfo: IFileUrl;
1808
+ }
1809
+ export interface IAlbumVideoFileListRes {
1810
+ total: number;
1811
+ list: IAlbumVideoFileList[];
1812
+ }
1813
+ export interface IAlbumVideoFileList {
1814
+ id: number;
1815
+ captureTime?: number;
1816
+ type?: 0 | 1 | 2;
1817
+ coverInfo?: IFileUrl;
1818
+ mediaInfo?: IFileUrl;
1819
+ }
1820
+ export interface IAlbumVideoFileListReq {
1821
+ stockId: number;
1822
+ gid: string;
1823
+ timeAlbumId: number;
1824
+ beginTime?: number;
1825
+ endTime?: number;
1826
+ pageNum?: number;
1827
+ pageSize?: number;
1828
+ queryIdFlag?: boolean;
1829
+ }
1830
+ export interface IAlbumFileDeleteReq {
1831
+ stockId: number;
1832
+ gid: string;
1833
+ timeAlbumId: number;
1834
+ albumRecordIds: string;
1835
+ }
1836
+ export interface IAlbumFileDeleteRes {
1837
+ result: boolean;
1838
+ }
1839
+ export interface TimeAlbumSettingDto {
1840
+ id: string;
1841
+ albumName: string;
1842
+ enableStatus: 0 | 1;
1843
+ timedCaptureConfig: string[];
1844
+ smartCaptureConfig: VisionBoxEvent[];
1845
+ }
1846
+ export type AlbumSettingSaveReq = {
1847
+ stockId: string;
1848
+ gid: string;
1849
+ } & Omit<TimeAlbumSettingDto, 'id'>;
1850
+ export type AlbumSettingEditReq = {
1851
+ albumId: TimeAlbumSettingDto['id'];
1852
+ stockId: string;
1853
+ gid: string;
1854
+ } & Omit<TimeAlbumSettingDto, 'id'>;
1855
+ export type GetAlbumSettingReq = {
1856
+ stockId: string;
1857
+ gid: string;
1858
+ };
1859
+ export type QueryGetAiVisualList = {
1860
+ gid: string;
1861
+ };
1862
+ export interface VisionBoxDto {
1863
+ visionBoxId: string;
1864
+ visionBoxName: string;
1865
+ gmtCreate: string;
1866
+ serviceStockId: string;
1867
+ serviceName: string;
1868
+ enableState: number;
1869
+ expiredTime: number;
1870
+ scenesType: SceneType;
1871
+ }
1872
+ export declare const enum BusinessType {
1873
+ aigcProtect = "aigcProtect",
1874
+ aiTimePhotoAlbumDetect = "aiTimePhotoAlbumDetect",
1875
+ aiSmartFreeEvent = "aiSmartFreeEvent"
1876
+ }
1877
+ export type GetAiVisualPresetEventParams = {
1878
+ gid: string;
1879
+ businessType: BusinessType;
1880
+ };
1881
+ export interface PresetEvent {
1882
+ configCode: string;
1883
+ configCodeIcon: string;
1884
+ configCodeDesc: string;
1885
+ }
1886
+ export type CustomVisionEventCheckParams = {
1887
+ eventValue: string;
1888
+ gid: string;
1889
+ stockId: string;
1890
+ };
1891
+ export type CustomVisionEventCheckRet = {
1892
+ available: boolean;
1893
+ recommend?: string[];
1894
+ };
1895
+ export interface IAlbumVideoFileDetailReq {
1896
+ stockId: number;
1897
+ gid: string;
1898
+ timeAlbumId: number;
1899
+ timeAlbumRecordId: number;
1900
+ }
1901
+ export type IAlbumVideoFileDetailRes = IAlbumVideoFileList;
1424
1902
  export {};
@@ -20,4 +20,50 @@ var EntityType = /*#__PURE__*/function (EntityType) {
20
20
  EntityType[EntityType["RULE"] = 2] = "RULE"; // 关联实体为联动规则
21
21
  return EntityType;
22
22
  }(EntityType || {});
23
- export {};
23
+ export let ReportType = /*#__PURE__*/function (ReportType) {
24
+ ReportType[ReportType["DAILY"] = 1] = "DAILY";
25
+ ReportType[ReportType["WEEKLY"] = 2] = "WEEKLY";
26
+ return ReportType;
27
+ }({});
28
+ export let VisionEventType = /*#__PURE__*/function (VisionEventType) {
29
+ VisionEventType[VisionEventType["PRESET"] = 0] = "PRESET";
30
+ VisionEventType[VisionEventType["CUSTOM"] = 1] = "CUSTOM";
31
+ return VisionEventType;
32
+ }({});
33
+ export let SceneType = /*#__PURE__*/function (SceneType) {
34
+ SceneType[SceneType["security"] = 0] = "security";
35
+ SceneType[SceneType["album"] = 1] = "album";
36
+ return SceneType;
37
+ }({});
38
+ export let PlanStatus = /*#__PURE__*/function (PlanStatus) {
39
+ PlanStatus[PlanStatus["USING"] = 1] = "USING"; // 使用中
40
+ return PlanStatus;
41
+ }({});
42
+ export let DeviceBindStatus = /*#__PURE__*/function (DeviceBindStatus) {
43
+ DeviceBindStatus[DeviceBindStatus["BINDING"] = 1] = "BINDING";
44
+ // 已绑定
45
+ DeviceBindStatus[DeviceBindStatus["NOT_SUPPORT"] = 2] = "NOT_SUPPORT";
46
+ // 不支持
47
+ DeviceBindStatus[DeviceBindStatus["NOT_BIND"] = 3] = "NOT_BIND"; // 未绑定
48
+ return DeviceBindStatus;
49
+ }({});
50
+ export let DeviceServiceConfigState = /*#__PURE__*/function (DeviceServiceConfigState) {
51
+ DeviceServiceConfigState[DeviceServiceConfigState["Delete"] = 0] = "Delete";
52
+ DeviceServiceConfigState[DeviceServiceConfigState["Available"] = 1] = "Available";
53
+ DeviceServiceConfigState[DeviceServiceConfigState["Unavailable"] = 2] = "Unavailable";
54
+ return DeviceServiceConfigState;
55
+ }({});
56
+ export let StockStatus = /*#__PURE__*/function (StockStatus) {
57
+ StockStatus[StockStatus["NO_ENABLE"] = 1] = "NO_ENABLE";
58
+ // 未启用
59
+ StockStatus[StockStatus["ENABLED"] = 2] = "ENABLED"; // 已启用
60
+ return StockStatus;
61
+ }({});
62
+ export let BusinessType = /*#__PURE__*/function (BusinessType) {
63
+ BusinessType["aigcProtect"] = "aigcProtect";
64
+ BusinessType["aiTimePhotoAlbumDetect"] = "aiTimePhotoAlbumDetect";
65
+ BusinessType["aiSmartFreeEvent"] = "aiSmartFreeEvent";
66
+ return BusinessType;
67
+ }({});
68
+
69
+ // 预制检测事件
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/api",
3
- "version": "1.7.8",
3
+ "version": "1.7.9",
4
4
  "description": "Ray universal api",
5
5
  "keywords": [
6
6
  "ray"
@@ -29,14 +29,14 @@
29
29
  "watch": "ray start --type=component"
30
30
  },
31
31
  "dependencies": {
32
- "@ray-js/framework": "1.7.8",
33
- "@ray-js/router": "1.7.8",
32
+ "@ray-js/framework": "1.7.9",
33
+ "@ray-js/router": "1.7.9",
34
34
  "@ray-js/wechat": "^0.3.8",
35
35
  "base64-browser": "^1.0.1",
36
36
  "query-string": "^7.1.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@ray-js/cli": "1.7.8",
39
+ "@ray-js/cli": "1.7.9",
40
40
  "art-template": "^4.13.4",
41
41
  "fs-extra": "^10.1.0",
42
42
  "miniprogram-api-typings": "^3.12.3",
@@ -46,5 +46,5 @@
46
46
  "access": "public",
47
47
  "registry": "https://registry.npmjs.com"
48
48
  },
49
- "gitHead": "f7f80dd1c06952139dc3799744a89dceeaf70b77"
49
+ "gitHead": "d39e56928dfec12ff41e0f9d81c3987334c2d650"
50
50
  }