@ray-js/api 1.8.0-beta.1 → 1.8.0-beta.10
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/@types/IPCKit.d.ts +15 -39
- package/@types/WearKit.d.ts +607 -0
- package/@types/all-kits.d.ts +1 -0
- package/@types/api-cloud.d.ts +48 -44
- package/@types/api-extend.d.ts +1 -0
- package/lib/{AIKit-1.0.0.d.ts → AIKit-1.2.0.d.ts} +2 -0
- package/lib/{AIKit-1.0.0.js → AIKit-1.2.0.js} +3 -0
- package/lib/BaseKit-3.17.7.d.ts +1 -0
- package/lib/BizKit-4.10.4.d.ts +1 -0
- package/lib/DeviceKit-4.13.1.d.ts +1 -0
- package/lib/HealthKit-6.5.0.d.ts +1 -0
- package/lib/HomeKit-3.1.4.d.ts +1 -0
- package/lib/{IPCKit-6.2.3.d.ts → IPCKit-6.4.5.d.ts} +4 -0
- package/lib/{IPCKit-6.2.3.js → IPCKit-6.4.5.js} +9 -0
- package/lib/MapKit-3.4.13.d.ts +1 -0
- package/lib/MediaKit-3.4.1.d.ts +1 -0
- package/lib/MiniKit-3.14.1.d.ts +1 -0
- package/lib/OutdoorKit-1.0.4.d.ts +1 -0
- package/lib/P2PKit-2.0.3.d.ts +1 -0
- package/lib/PlayNetKit-1.3.30.d.ts +1 -0
- package/lib/WearKit-1.1.6.d.ts +28 -0
- package/lib/WearKit-1.1.6.js +81 -0
- package/lib/all-kits.d.ts +3 -2
- package/lib/all-kits.js +3 -2
- package/lib/cloud/deviceFile.d.ts +40 -0
- package/lib/cloud/deviceFile.js +99 -0
- package/lib/cloud/doorlock/offline-pwd.d.ts +1 -1
- package/lib/cloud/electrician/index.d.ts +1 -0
- package/lib/cloud/electrician/index.js +2 -0
- package/lib/cloud/electrician/tariffService.d.ts +35 -0
- package/lib/cloud/electrician/tariffService.js +34 -0
- package/lib/cloud/energy.d.ts +1 -0
- package/lib/cloud/gateway.d.ts +1 -0
- package/lib/cloud/highlights.d.ts +152 -0
- package/lib/cloud/highlights.js +304 -0
- package/lib/cloud/index.d.ts +3 -0
- package/lib/cloud/index.js +4 -0
- package/lib/cloud/interface.d.ts +575 -0
- package/lib/cloud/interface.js +47 -1
- package/lib/cloud/laser-clean/index.d.ts +1 -1
- package/lib/cloud/laser-clean/map.d.ts +1 -0
- package/lib/cloud/laser-clean/record.d.ts +1 -0
- package/lib/cloud/laser-clean/voice.d.ts +1 -0
- package/lib/hideTabBar/index.d.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/lifecycles/offAppEvent/index.d.ts +1 -0
- package/lib/lifecycles/offAppHide/index.d.ts +1 -0
- package/lib/lifecycles/offAppShow/index.d.ts +1 -0
- package/lib/lifecycles/offError/index.d.ts +1 -0
- package/lib/lifecycles/offThemeChange/index.d.ts +1 -0
- package/lib/lifecycles/offWindowResize/index.d.ts +1 -0
- package/lib/lifecycles/onAppEvent/index.d.ts +1 -0
- package/lib/lifecycles/onAppHide/index.d.ts +1 -0
- package/lib/lifecycles/onAppShow/index.d.ts +1 -0
- package/lib/lifecycles/onError/index.d.ts +1 -0
- package/lib/lifecycles/onPageNotFound/index.d.ts +1 -0
- package/lib/lifecycles/onThemeChange/index.d.ts +1 -0
- package/lib/lifecycles/onWindowResize/index.d.ts +1 -0
- package/lib/navigateBack/index.d.ts +1 -0
- package/lib/navigateTo/index.d.ts +1 -0
- package/lib/reLaunch/index.d.ts +1 -0
- package/lib/redirectTo/index.d.ts +1 -0
- package/lib/requestCloud/index.d.ts +1 -0
- package/lib/setNavigationBarColor/index.d.ts +1 -0
- package/lib/setNavigationBarTitle/index.d.ts +1 -0
- package/lib/showTabBar/index.d.ts +1 -0
- package/lib/switchTab/index.d.ts +1 -0
- package/lib/viewAPI.d.ts +1 -0
- package/package.json +6 -6
package/@types/api-cloud.d.ts
CHANGED
@@ -12,9 +12,7 @@ declare namespace ty {
|
|
12
12
|
* 删除历史地图
|
13
13
|
* @returns 删除历史地图结果的 Promise
|
14
14
|
*/
|
15
|
-
function deleteMultipleMapFiles(
|
16
|
-
params: DeleteMultipleMapFilesParams
|
17
|
-
): Promise<DeleteMultipleMapFilesResponse>;
|
15
|
+
export function deleteMultipleMapFiles(params: DeleteMultipleMapFilesParams): Promise<DeleteMultipleMapFilesResponse>;
|
18
16
|
|
19
17
|
// #region 获取云存储配置
|
20
18
|
type GetSweeperStorageConfigParams = {
|
@@ -48,8 +46,8 @@ declare namespace ty {
|
|
48
46
|
* 获取云存储配置
|
49
47
|
* @returns 获取云存储配置结果的 Promise
|
50
48
|
*/
|
51
|
-
function getSweeperStorageConfig(
|
52
|
-
params: GetSweeperStorageConfigParams
|
49
|
+
export function getSweeperStorageConfig(
|
50
|
+
params: GetSweeperStorageConfigParams,
|
53
51
|
): Promise<GetSweeperStorageConfigResponse>;
|
54
52
|
|
55
53
|
// #region 获取扫地机的历史地图
|
@@ -75,9 +73,7 @@ declare namespace ty {
|
|
75
73
|
* 获取扫地机的历史地图
|
76
74
|
* @returns 获取扫地机的历史地图结果的 Promise
|
77
75
|
*/
|
78
|
-
export function getMultipleMapFiles(
|
79
|
-
params: GetMultipleMapFilesParams
|
80
|
-
): Promise<GetMultipleMapFilesResponse>;
|
76
|
+
export function getMultipleMapFiles(params: GetMultipleMapFilesParams): Promise<GetMultipleMapFilesResponse>;
|
81
77
|
|
82
78
|
// #region 获取清扫记录列表
|
83
79
|
type GetCleaningRecordsParams = {
|
@@ -102,9 +98,7 @@ declare namespace ty {
|
|
102
98
|
totalCount: number; // 清扫记录总长度
|
103
99
|
};
|
104
100
|
|
105
|
-
export function getCleaningRecords(
|
106
|
-
params: GetCleaningRecordsParams
|
107
|
-
): Promise<GetCleaningRecordsResponse>;
|
101
|
+
export function getCleaningRecords(params: GetCleaningRecordsParams): Promise<GetCleaningRecordsResponse>;
|
108
102
|
|
109
103
|
// #region 删除清扫记录
|
110
104
|
type DeleteCleaningRecordParams = {
|
@@ -118,11 +112,9 @@ declare namespace ty {
|
|
118
112
|
* 删除清扫记录
|
119
113
|
* @returns 删除清扫记录结果的 Promise
|
120
114
|
*/
|
121
|
-
function deleteCleaningRecord(
|
122
|
-
params: DeleteCleaningRecordParams
|
123
|
-
): Promise<DeleteCleaningRecordResponse>;
|
115
|
+
export function deleteCleaningRecord(params: DeleteCleaningRecordParams): Promise<DeleteCleaningRecordResponse>;
|
124
116
|
|
125
|
-
// #region 获取扫地机的语音包列表
|
117
|
+
// # region 获取扫地机的语音包列表
|
126
118
|
type GetVoiceListParams = {
|
127
119
|
//设备id
|
128
120
|
devId: string;
|
@@ -157,7 +149,7 @@ declare namespace ty {
|
|
157
149
|
* 获取扫地机的语音包列表
|
158
150
|
* @returns 获取扫地机的语音包列表结果的 Promise
|
159
151
|
*/
|
160
|
-
function getVoiceList(params: GetVoiceListParams): Promise<GetVoiceListResponse>;
|
152
|
+
export function getVoiceList(params: GetVoiceListParams): Promise<GetVoiceListResponse>;
|
161
153
|
|
162
154
|
// #region 获取陀螺仪扫地机的清扫记录
|
163
155
|
type GetGyroCleanRecordsParams = {
|
@@ -169,19 +161,15 @@ declare namespace ty {
|
|
169
161
|
};
|
170
162
|
|
171
163
|
type GetGyroCleanRecordsResponse = {
|
172
|
-
datas: {
|
173
|
-
|
174
|
-
dps: any[];
|
175
|
-
}[];
|
164
|
+
datas: { dpId: number; gid: number; gmtCreate: number; recordId: string; uuid: string; value: string }[];
|
165
|
+
totalCount: number;
|
176
166
|
};
|
177
167
|
|
178
168
|
/**
|
179
169
|
* 获取陀螺仪扫地机的清扫记录
|
180
170
|
* @returns 获取陀螺仪扫地机的清扫记录结果的 Promise
|
181
171
|
*/
|
182
|
-
function getGyroCleanRecords(
|
183
|
-
params: GetGyroCleanRecordsParams
|
184
|
-
): Promise<GetGyroCleanRecordsResponse>;
|
172
|
+
export function getGyroCleanRecords(params: GetGyroCleanRecordsParams): Promise<GetGyroCleanRecordsResponse>;
|
185
173
|
|
186
174
|
// #endregion
|
187
175
|
|
@@ -194,24 +182,41 @@ declare namespace ty {
|
|
194
182
|
};
|
195
183
|
|
196
184
|
type GetGyroCleanRecordDetailResponse = {
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
185
|
+
dataList: string[];
|
186
|
+
startRow: string;
|
187
|
+
devId: string;
|
188
|
+
mapId: number;
|
189
|
+
startTime: number;
|
190
|
+
endTime: number;
|
191
|
+
subRecordId: number; // 记录id
|
192
|
+
hasNext: boolean; // 是否有下一页
|
204
193
|
};
|
205
194
|
|
206
195
|
/**
|
207
196
|
* 获取陀螺仪扫地机的清扫记录详情
|
208
197
|
* @returns 获取陀螺仪扫地机的清扫记录详情结果的 Promise
|
209
198
|
*/
|
210
|
-
function getGyroCleanRecordDetail(
|
211
|
-
params: GetGyroCleanRecordDetailParams
|
199
|
+
export function getGyroCleanRecordDetail(
|
200
|
+
params: GetGyroCleanRecordDetailParams,
|
212
201
|
): Promise<GetGyroCleanRecordDetailResponse>;
|
202
|
+
// #endregion
|
213
203
|
|
214
|
-
// #region
|
204
|
+
// #region 删除陀螺仪扫地机的清扫记录
|
205
|
+
type DeleteGyroCleanRecordParams = {
|
206
|
+
devId: string; // 设备id
|
207
|
+
uuid: string; // 清扫记录的recordId,多条记录用逗号隔开
|
208
|
+
};
|
209
|
+
|
210
|
+
type DeleteGyroCleanRecordResponse = boolean;
|
211
|
+
|
212
|
+
/**
|
213
|
+
* 删除陀螺仪扫地机的清扫记录
|
214
|
+
* @returns 删除陀螺仪扫地机的清扫记录结果的 Promise
|
215
|
+
*/
|
216
|
+
export function deleteGyroCleanRecord(params: DeleteGyroCleanRecordParams): Promise<DeleteGyroCleanRecordResponse>;
|
217
|
+
// #endregion
|
218
|
+
|
219
|
+
// #region 获取陀螺仪扫地机的最新清扫地图
|
215
220
|
type GetGyroLatestCleanMapParams = {
|
216
221
|
start: number; // startRow
|
217
222
|
size: number; // 分页
|
@@ -219,13 +224,14 @@ declare namespace ty {
|
|
219
224
|
};
|
220
225
|
|
221
226
|
type GetGyroLatestCleanMapResponse = {
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
227
|
+
dataList: string[];
|
228
|
+
startRow: string;
|
229
|
+
devId: string;
|
230
|
+
mapId: number;
|
231
|
+
startTime: number;
|
232
|
+
endTime: number;
|
233
|
+
subRecordId: number; // 记录id
|
234
|
+
hasNext: boolean; // 是否有下一页
|
229
235
|
};
|
230
236
|
|
231
237
|
/**
|
@@ -233,9 +239,7 @@ declare namespace ty {
|
|
233
239
|
* 获取陀螺仪扫地机的最新清扫地图
|
234
240
|
* @returns 获取陀螺仪扫地机的最新清扫地图结果的 Promise
|
235
241
|
*/
|
236
|
-
function getGyroLatestCleanMap(
|
237
|
-
params: GetGyroLatestCleanMapParams
|
238
|
-
): Promise<GetGyroLatestCleanMapResponse>;
|
242
|
+
export function getGyroLatestCleanMap(params: GetGyroLatestCleanMapParams): Promise<GetGyroLatestCleanMapResponse>;
|
239
243
|
|
240
244
|
// #endregion
|
241
245
|
|
@@ -252,7 +256,7 @@ declare namespace ty {
|
|
252
256
|
* 修改扫地机历史地图名称
|
253
257
|
* @returns 修改扫地机历史地图名称结果的 Promise
|
254
258
|
*/
|
255
|
-
function renameHistoryMap(params: RenameHistoryMapParams): Promise<RenameHistoryMapResponse>;
|
259
|
+
export function renameHistoryMap(params: RenameHistoryMapParams): Promise<RenameHistoryMapResponse>;
|
256
260
|
|
257
261
|
// #endregion
|
258
262
|
}
|
package/@types/api-extend.d.ts
CHANGED
@@ -210,6 +210,7 @@ interface IpcContext {
|
|
210
210
|
setTrackingStatus(res?: Callback & { status?: boolean }): void
|
211
211
|
getVideoInfo(res?: Callback): void
|
212
212
|
isMuted(res: Callback & { success: (r: { isMuted: boolean }) => void }): void
|
213
|
+
setConfig(res: Callback & { config?: string }): void
|
213
214
|
}
|
214
215
|
|
215
216
|
interface CameraContext {
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference path="../@types/AIKit.d.ts" />
|
1
2
|
export declare const ai: {
|
2
3
|
getTranslateRecords: typeof ty.ai.getTranslateRecords;
|
3
4
|
getTranslateRecord: typeof ty.ai.getTranslateRecord;
|
@@ -18,4 +19,5 @@ export declare const ai: {
|
|
18
19
|
onVideoObjectDetectProgress: typeof ty.ai.onVideoObjectDetectProgress;
|
19
20
|
offVideoObjectDetectProgress: typeof ty.ai.offVideoObjectDetectProgress;
|
20
21
|
generateTranslateTask: typeof ty.ai.generateTranslateTask;
|
22
|
+
privacyProtectDetectForVideo: typeof ty.ai.privacyProtectDetectForVideo;
|
21
23
|
};
|
package/lib/BaseKit-3.17.7.d.ts
CHANGED
package/lib/BizKit-4.10.4.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference path="../@types/DeviceKit.d.ts" />
|
1
2
|
export declare const unregisterLeaveBeaconFenceEvent: typeof ty.device.unregisterLeaveBeaconFenceEvent;
|
2
3
|
export declare const registerLeaveBeaconFenceEvent: typeof ty.device.registerLeaveBeaconFenceEvent;
|
3
4
|
export declare const writeBeaconFenceConfig: typeof ty.device.writeBeaconFenceConfig;
|
package/lib/HealthKit-6.5.0.d.ts
CHANGED
package/lib/HomeKit-3.1.4.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference path="../@types/IPCKit.d.ts" />
|
1
2
|
export declare const ipc: {
|
2
3
|
acceptDoorbellCall: typeof ty.ipc.acceptDoorbellCall;
|
3
4
|
cancelDownloadCloudPlayBack: typeof ty.ipc.cancelDownloadCloudPlayBack;
|
@@ -71,4 +72,7 @@ export declare const ipc: {
|
|
71
72
|
uploadAppLog: typeof ty.ipc.uploadAppLog;
|
72
73
|
uploadDeviceLog: typeof ty.ipc.uploadDeviceLog;
|
73
74
|
wakeUpDoorBell: typeof ty.ipc.wakeUpDoorBell;
|
75
|
+
startDownloadMessageVideoForComposition: typeof ty.ipc.startDownloadMessageVideoForComposition;
|
76
|
+
destroyMediaDevice: typeof ty.ipc.destroyMediaDevice;
|
77
|
+
isSupportWonderfulMoment: typeof ty.ipc.isSupportWonderfulMoment;
|
74
78
|
};
|
@@ -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/MapKit-3.4.13.d.ts
CHANGED
package/lib/MediaKit-3.4.1.d.ts
CHANGED
package/lib/MiniKit-3.14.1.d.ts
CHANGED
package/lib/P2PKit-2.0.3.d.ts
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
/// <reference path="../@types/WearKit.d.ts" />
|
2
|
+
export declare const wear: {
|
3
|
+
startRecordTransfer: typeof ty.wear.startRecordTransfer;
|
4
|
+
pauseRecordTransfer: typeof ty.wear.pauseRecordTransfer;
|
5
|
+
resumeRecordTransfer: typeof ty.wear.resumeRecordTransfer;
|
6
|
+
stopRecordTransfer: typeof ty.wear.stopRecordTransfer;
|
7
|
+
recordTransferTask: typeof ty.wear.recordTransferTask;
|
8
|
+
getRecordTransferRealTimeResult: typeof ty.wear.getRecordTransferRealTimeResult;
|
9
|
+
getRecordTransferResultList: typeof ty.wear.getRecordTransferResultList;
|
10
|
+
getRecordTransferResultDetail: typeof ty.wear.getRecordTransferResultDetail;
|
11
|
+
updateRecordTransferResult: typeof ty.wear.updateRecordTransferResult;
|
12
|
+
removeFileList: typeof ty.wear.removeFileList;
|
13
|
+
saveRecordTransferRecognizeResult: typeof ty.wear.saveRecordTransferRecognizeResult;
|
14
|
+
saveRecordTransferSummaryResult: typeof ty.wear.saveRecordTransferSummaryResult;
|
15
|
+
saveRecordTransferRealTimeRecognizeResult: typeof ty.wear.saveRecordTransferRealTimeRecognizeResult;
|
16
|
+
getRecordTransferProcessStatus: typeof ty.wear.getRecordTransferProcessStatus;
|
17
|
+
getRecordTransferRecognizeResult: typeof ty.wear.getRecordTransferRecognizeResult;
|
18
|
+
processRecordTransferResult: typeof ty.wear.processRecordTransferResult;
|
19
|
+
getRecordTransferSummaryResult: typeof ty.wear.getRecordTransferSummaryResult;
|
20
|
+
onRecordTransferRealTimeRecognizeStatusUpdateEvent: typeof ty.wear.onRecordTransferRealTimeRecognizeStatusUpdateEvent;
|
21
|
+
onRecordTransferAmplitudeUpdateEvent: typeof ty.wear.onRecordTransferAmplitudeUpdateEvent;
|
22
|
+
onRecordTransferStatusUpdateEvent: typeof ty.wear.onRecordTransferStatusUpdateEvent;
|
23
|
+
onRecordTransferFinishEvent: typeof ty.wear.onRecordTransferFinishEvent;
|
24
|
+
offRecordTransferRealTimeRecognizeStatusUpdateEvent: typeof ty.wear.offRecordTransferRealTimeRecognizeStatusUpdateEvent;
|
25
|
+
offRecordTransferAmplitudeUpdateEvent: typeof ty.wear.offRecordTransferAmplitudeUpdateEvent;
|
26
|
+
offRecordTransferStatusUpdateEvent: typeof ty.wear.offRecordTransferStatusUpdateEvent;
|
27
|
+
offRecordTransferFinishEvent: typeof ty.wear.offRecordTransferFinishEvent;
|
28
|
+
};
|
@@ -0,0 +1,81 @@
|
|
1
|
+
/// <reference path="../@types/WearKit.d.ts" />
|
2
|
+
|
3
|
+
import { createFactory } from './utils';
|
4
|
+
const factory = createFactory('WearKit');
|
5
|
+
export const wear = {
|
6
|
+
startRecordTransfer: factory('startRecordTransfer', {
|
7
|
+
"namespace": "wear"
|
8
|
+
}),
|
9
|
+
pauseRecordTransfer: factory('pauseRecordTransfer', {
|
10
|
+
"namespace": "wear"
|
11
|
+
}),
|
12
|
+
resumeRecordTransfer: factory('resumeRecordTransfer', {
|
13
|
+
"namespace": "wear"
|
14
|
+
}),
|
15
|
+
stopRecordTransfer: factory('stopRecordTransfer', {
|
16
|
+
"namespace": "wear"
|
17
|
+
}),
|
18
|
+
recordTransferTask: factory('recordTransferTask', {
|
19
|
+
"namespace": "wear"
|
20
|
+
}),
|
21
|
+
getRecordTransferRealTimeResult: factory('getRecordTransferRealTimeResult', {
|
22
|
+
"namespace": "wear"
|
23
|
+
}),
|
24
|
+
getRecordTransferResultList: factory('getRecordTransferResultList', {
|
25
|
+
"namespace": "wear"
|
26
|
+
}),
|
27
|
+
getRecordTransferResultDetail: factory('getRecordTransferResultDetail', {
|
28
|
+
"namespace": "wear"
|
29
|
+
}),
|
30
|
+
updateRecordTransferResult: factory('updateRecordTransferResult', {
|
31
|
+
"namespace": "wear"
|
32
|
+
}),
|
33
|
+
removeFileList: factory('removeFileList', {
|
34
|
+
"namespace": "wear"
|
35
|
+
}),
|
36
|
+
saveRecordTransferRecognizeResult: factory('saveRecordTransferRecognizeResult', {
|
37
|
+
"namespace": "wear"
|
38
|
+
}),
|
39
|
+
saveRecordTransferSummaryResult: factory('saveRecordTransferSummaryResult', {
|
40
|
+
"namespace": "wear"
|
41
|
+
}),
|
42
|
+
saveRecordTransferRealTimeRecognizeResult: factory('saveRecordTransferRealTimeRecognizeResult', {
|
43
|
+
"namespace": "wear"
|
44
|
+
}),
|
45
|
+
getRecordTransferProcessStatus: factory('getRecordTransferProcessStatus', {
|
46
|
+
"namespace": "wear"
|
47
|
+
}),
|
48
|
+
getRecordTransferRecognizeResult: factory('getRecordTransferRecognizeResult', {
|
49
|
+
"namespace": "wear"
|
50
|
+
}),
|
51
|
+
processRecordTransferResult: factory('processRecordTransferResult', {
|
52
|
+
"namespace": "wear"
|
53
|
+
}),
|
54
|
+
getRecordTransferSummaryResult: factory('getRecordTransferSummaryResult', {
|
55
|
+
"namespace": "wear"
|
56
|
+
}),
|
57
|
+
onRecordTransferRealTimeRecognizeStatusUpdateEvent: factory('onRecordTransferRealTimeRecognizeStatusUpdateEvent', {
|
58
|
+
"namespace": "wear"
|
59
|
+
}),
|
60
|
+
onRecordTransferAmplitudeUpdateEvent: factory('onRecordTransferAmplitudeUpdateEvent', {
|
61
|
+
"namespace": "wear"
|
62
|
+
}),
|
63
|
+
onRecordTransferStatusUpdateEvent: factory('onRecordTransferStatusUpdateEvent', {
|
64
|
+
"namespace": "wear"
|
65
|
+
}),
|
66
|
+
onRecordTransferFinishEvent: factory('onRecordTransferFinishEvent', {
|
67
|
+
"namespace": "wear"
|
68
|
+
}),
|
69
|
+
offRecordTransferRealTimeRecognizeStatusUpdateEvent: factory('offRecordTransferRealTimeRecognizeStatusUpdateEvent', {
|
70
|
+
"namespace": "wear"
|
71
|
+
}),
|
72
|
+
offRecordTransferAmplitudeUpdateEvent: factory('offRecordTransferAmplitudeUpdateEvent', {
|
73
|
+
"namespace": "wear"
|
74
|
+
}),
|
75
|
+
offRecordTransferStatusUpdateEvent: factory('offRecordTransferStatusUpdateEvent', {
|
76
|
+
"namespace": "wear"
|
77
|
+
}),
|
78
|
+
offRecordTransferFinishEvent: factory('offRecordTransferFinishEvent', {
|
79
|
+
"namespace": "wear"
|
80
|
+
})
|
81
|
+
};
|
package/lib/all-kits.d.ts
CHANGED
@@ -10,5 +10,6 @@ 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.
|
14
|
-
export * from './IPCKit-6.
|
13
|
+
export * from './AIKit-1.2.0';
|
14
|
+
export * from './IPCKit-6.4.5';
|
15
|
+
export * from './WearKit-1.1.6';
|
package/lib/all-kits.js
CHANGED
@@ -10,5 +10,6 @@ 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.
|
14
|
-
export * from './IPCKit-6.
|
13
|
+
export * from './AIKit-1.2.0';
|
14
|
+
export * from './IPCKit-6.4.5';
|
15
|
+
export * from './WearKit-1.1.6';
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { Audio, FileInfo, FileSign, UploadState } from './interface';
|
2
|
+
/**
|
3
|
+
* 删除文件
|
4
|
+
*/
|
5
|
+
declare const deleteDeviceFile: (fileNos: string[], devId: string) => Promise<boolean>;
|
6
|
+
/**
|
7
|
+
* 获取文件详情
|
8
|
+
*/
|
9
|
+
declare const fetchDeviceFileDetail: (fileNo: string, devId: string) => Promise<Audio>;
|
10
|
+
/**
|
11
|
+
* 获取临时地址上传签名
|
12
|
+
*/
|
13
|
+
declare const fetchDeviceFileSign: (bizType: string, fileName: string, contentType: string) => Promise<FileSign>;
|
14
|
+
/**
|
15
|
+
* 获取上传状态
|
16
|
+
*/
|
17
|
+
declare const fetchDeviceFileUploadState: (uploadToken: string) => Promise<UploadState>;
|
18
|
+
/**
|
19
|
+
* 轮训大文件上传状态
|
20
|
+
*/
|
21
|
+
declare const fetchBigPublicFileUploadState: (pollingToken: string) => Promise<UploadState>;
|
22
|
+
/**
|
23
|
+
* 获取宠物媒体文件
|
24
|
+
*/
|
25
|
+
declare const fetchPetAudios: (devId: string) => Promise<{
|
26
|
+
data: Audio[];
|
27
|
+
}>;
|
28
|
+
/**
|
29
|
+
* 宠物媒体文件下载
|
30
|
+
*/
|
31
|
+
declare const notifyDownload: (fileNo: string, devId: string) => Promise<boolean>;
|
32
|
+
/**
|
33
|
+
* 宠物媒体文件保存
|
34
|
+
*/
|
35
|
+
declare const fileRelationSave: (fileInfo: FileInfo, devId: any) => Promise<{
|
36
|
+
headers: any;
|
37
|
+
token: string;
|
38
|
+
action: string;
|
39
|
+
}>;
|
40
|
+
export { deleteDeviceFile, fetchDeviceFileDetail, fetchPetAudios, notifyDownload, fileRelationSave, fetchDeviceFileSign, fetchDeviceFileUploadState, fetchBigPublicFileUploadState, };
|
@@ -0,0 +1,99 @@
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import { THING } from '../constants';
|
3
|
+
import { requestFunc } from './highlights';
|
4
|
+
|
5
|
+
/**
|
6
|
+
* 删除文件
|
7
|
+
*/
|
8
|
+
const deleteDeviceFile = (fileNos, devId) => {
|
9
|
+
return requestFunc(`m.ha.storage.device.file.delete.notify`, {
|
10
|
+
devId,
|
11
|
+
fileInfo: {
|
12
|
+
fileNos,
|
13
|
+
sceneCode: 'pet_media-device'
|
14
|
+
}
|
15
|
+
}, '1.0');
|
16
|
+
};
|
17
|
+
|
18
|
+
/**
|
19
|
+
* 获取文件详情
|
20
|
+
*/
|
21
|
+
const fetchDeviceFileDetail = (fileNo, devId) => {
|
22
|
+
return requestFunc(`m.ha.storage.device.file.upload.get`, {
|
23
|
+
devId,
|
24
|
+
fileInfo: {
|
25
|
+
fileNo
|
26
|
+
}
|
27
|
+
}, '1.0');
|
28
|
+
};
|
29
|
+
|
30
|
+
/**
|
31
|
+
* 获取临时地址上传签名
|
32
|
+
*/
|
33
|
+
const fetchDeviceFileSign = (bizType, fileName, contentType) => {
|
34
|
+
return requestFunc(`${THING}.open.iot.upload.sign.get`, {
|
35
|
+
biz: bizType,
|
36
|
+
uploadFileName: fileName,
|
37
|
+
contentType
|
38
|
+
}, '3.0');
|
39
|
+
};
|
40
|
+
|
41
|
+
/**
|
42
|
+
* 获取上传状态
|
43
|
+
*/
|
44
|
+
const fetchDeviceFileUploadState = uploadToken => {
|
45
|
+
return requestFunc(`${THING}.open.iot.upload.file.check`, {
|
46
|
+
uploadToken
|
47
|
+
}, '1.0');
|
48
|
+
};
|
49
|
+
|
50
|
+
/**
|
51
|
+
* 轮训大文件上传状态
|
52
|
+
*/
|
53
|
+
const fetchBigPublicFileUploadState = pollingToken => {
|
54
|
+
return requestFunc(`${THING}.open.iot.upload.file.big.public.get`, {
|
55
|
+
pollingToken
|
56
|
+
}, '1.0');
|
57
|
+
};
|
58
|
+
|
59
|
+
/**
|
60
|
+
* 获取宠物媒体文件
|
61
|
+
*/
|
62
|
+
const fetchPetAudios = devId => {
|
63
|
+
return requestFunc('m.ha.storage.device.file.upload.list', {
|
64
|
+
devId,
|
65
|
+
fileInfo: {
|
66
|
+
sceneCode: 'pet_media-device',
|
67
|
+
pageNo: 1,
|
68
|
+
pageSize: 10
|
69
|
+
}
|
70
|
+
}, '1.0');
|
71
|
+
};
|
72
|
+
|
73
|
+
/**
|
74
|
+
* 宠物媒体文件下载
|
75
|
+
*/
|
76
|
+
const notifyDownload = (fileNo, devId) => {
|
77
|
+
return requestFunc('m.ha.storage.device.file.download.submit', {
|
78
|
+
devId,
|
79
|
+
fileInfo: {
|
80
|
+
fileNos: fileNo,
|
81
|
+
sceneCode: 'pet_media-device'
|
82
|
+
}
|
83
|
+
}, '1.0');
|
84
|
+
};
|
85
|
+
|
86
|
+
/**
|
87
|
+
* 宠物媒体文件保存
|
88
|
+
*/
|
89
|
+
const fileRelationSave = (fileInfo, devId) => {
|
90
|
+
return requestFunc('m.ha.storage.device.file.relation.save', {
|
91
|
+
devId,
|
92
|
+
fileInfo: _objectSpread({
|
93
|
+
encryptType: 0,
|
94
|
+
fileType: 'wav',
|
95
|
+
sceneCode: 'pet_media-device'
|
96
|
+
}, fileInfo)
|
97
|
+
}, '1.0');
|
98
|
+
};
|
99
|
+
export { deleteDeviceFile, fetchDeviceFileDetail, fetchPetAudios, notifyDownload, fileRelationSave, fetchDeviceFileSign, fetchDeviceFileUploadState, fetchBigPublicFileUploadState };
|
@@ -58,4 +58,4 @@ type RevocablePwdResult = RevocablePwdResultEntry[];
|
|
58
58
|
* @returns {Promise<RevocablePwdResult>} - 响应结果的 Promise
|
59
59
|
*/
|
60
60
|
declare const getRevocableOfflinePasswords: (params: RevocablePwdParams) => Promise<RevocablePwdResult>;
|
61
|
-
export { getOfflinePassword, revokeOfflinePassword, updateOfflinePasswordName, getRevocableOfflinePasswords
|
61
|
+
export { getOfflinePassword, revokeOfflinePassword, updateOfflinePasswordName, getRevocableOfflinePasswords };
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './tariffService';
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/**
|
2
|
+
* 查询设备电价
|
3
|
+
* @param params
|
4
|
+
* @returns
|
5
|
+
*/
|
6
|
+
export declare const getDeviceElectricityPrice: (params: {
|
7
|
+
devId: string;
|
8
|
+
queryParam: {
|
9
|
+
energyType: "electricity";
|
10
|
+
tariffTag: string;
|
11
|
+
};
|
12
|
+
}) => Promise<{
|
13
|
+
id: number;
|
14
|
+
entityId: string;
|
15
|
+
energyType: string;
|
16
|
+
tariffTag: string;
|
17
|
+
tariffName: string;
|
18
|
+
tariffType: string;
|
19
|
+
priceType: 0 | 2;
|
20
|
+
config: string;
|
21
|
+
}[]>;
|
22
|
+
/**
|
23
|
+
* 设置设备电价
|
24
|
+
* @param params
|
25
|
+
* @returns
|
26
|
+
*/
|
27
|
+
export declare const setDeviceElectricityPrice: (params: {
|
28
|
+
devId: string;
|
29
|
+
tariffInfo: {
|
30
|
+
energyType: "electricity";
|
31
|
+
tariffTag: string;
|
32
|
+
priceType: 0 | 2;
|
33
|
+
config: Record<string, any>;
|
34
|
+
};
|
35
|
+
}) => Promise<boolean>;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import requestCloud from '../../requestCloud';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* 查询设备电价
|
6
|
+
* @param params
|
7
|
+
* @returns
|
8
|
+
*/
|
9
|
+
export const getDeviceElectricityPrice = params => {
|
10
|
+
return requestCloud({
|
11
|
+
api: `m.energy.device.tariff.info.get`,
|
12
|
+
version: '1.0',
|
13
|
+
data: params
|
14
|
+
});
|
15
|
+
};
|
16
|
+
|
17
|
+
/**
|
18
|
+
* 设置设备电价
|
19
|
+
* @param params
|
20
|
+
* @returns
|
21
|
+
*/
|
22
|
+
export const setDeviceElectricityPrice = params => {
|
23
|
+
return requestCloud({
|
24
|
+
api: `m.energy.device.tariff.info.save`,
|
25
|
+
version: '1.0',
|
26
|
+
data: {
|
27
|
+
devId: params.devId,
|
28
|
+
tariffInfo: _objectSpread({
|
29
|
+
isEnable: 0,
|
30
|
+
tariffSource: 'manual'
|
31
|
+
}, params.tariffInfo)
|
32
|
+
}
|
33
|
+
});
|
34
|
+
};
|