@ray-js/api 1.7.70 → 1.7.71
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/AIKit.d.ts +5509 -610
- package/@types/AIStreamKit.d.ts +2641 -0
- package/@types/AVideoKit.d.ts +1827 -0
- package/@types/BaseKit.d.ts +8682 -1893
- package/@types/BizKit.d.ts +6639 -1038
- package/@types/CategoryCommonBizKit.d.ts +1459 -0
- package/@types/CommunityKit.d.ts +154 -0
- package/@types/DeviceKit.d.ts +18475 -5662
- package/@types/GroupCITestKit.d.ts +651 -0
- package/@types/HealthKit.d.ts +2290 -357
- package/@types/HomeKit.d.ts +4068 -182
- package/@types/IPCKit.d.ts +4327 -1227
- package/@types/LightKit.d.ts +125 -0
- package/@types/MapKit.d.ts +1560 -204
- package/@types/MediaKit.d.ts +136 -16
- package/@types/MediaPlayerKit.d.ts +47 -0
- package/@types/MiniKit.d.ts +2976 -628
- package/@types/OutdoorKit.d.ts +1337 -24
- package/@types/P2PKit.d.ts +622 -103
- package/@types/PayKit.d.ts +115 -0
- package/@types/PlayNetKit.d.ts +3454 -1309
- package/@types/SweeperKit.d.ts +154 -0
- package/@types/ThirdAuthKit.d.ts +324 -0
- package/@types/ThirdPartyDeviceKit.d.ts +410 -0
- package/@types/WearKit.d.ts +10177 -375
- package/@types/gateway.d.ts +349 -61
- package/@types/health.d.ts +486 -304
- package/lib/AIKit-1.6.0.d.ts +265 -41
- package/lib/AIKit-1.6.0.js +374 -120
- package/lib/BaseKit-3.17.7.d.ts +704 -0
- package/lib/BaseKit-3.17.7.js +720 -1
- package/lib/BizKit-4.10.4.d.ts +336 -0
- package/lib/BizKit-4.10.4.js +342 -5
- package/lib/DeviceKit-4.13.1.d.ts +996 -0
- package/lib/DeviceKit-4.13.1.js +1247 -249
- package/lib/HealthKit-6.5.0.d.ts +210 -44
- package/lib/HealthKit-6.5.0.js +295 -128
- package/lib/HomeKit-3.1.4.d.ts +20 -6
- package/lib/HomeKit-3.1.4.js +29 -14
- package/lib/IPCKit-6.4.5.d.ts +375 -77
- package/lib/IPCKit-6.4.5.js +525 -228
- package/lib/MapKit-3.4.13.d.ts +70 -16
- package/lib/MapKit-3.4.13.js +98 -47
- package/lib/MediaKit-3.4.1.d.ts +5 -3
- package/lib/MediaKit-3.4.1.js +7 -6
- package/lib/MiniKit-3.14.1.d.ts +300 -0
- package/lib/MiniKit-3.14.1.js +302 -0
- package/lib/OutdoorKit-1.0.4.d.ts +55 -13
- package/lib/OutdoorKit-1.0.4.js +78 -35
- package/lib/P2PKit-2.0.3.d.ts +125 -27
- package/lib/P2PKit-2.0.3.js +175 -78
- package/lib/PlayNetKit-1.3.30.d.ts +290 -60
- package/lib/PlayNetKit-1.3.30.js +407 -176
- package/lib/WearKit-1.1.6.d.ts +125 -27
- package/lib/WearKit-1.1.6.js +176 -77
- package/lib/all-kits.d.ts +10 -10
- package/lib/all-kits.js +10 -10
- package/lib/cloud/core.d.ts +31 -1
- package/lib/cloud/core.js +31 -1
- package/lib/cloud/device.d.ts +155 -24
- package/lib/cloud/device.js +153 -22
- package/lib/cloud/gateway.d.ts +254 -0
- package/lib/cloud/gateway.js +269 -9
- package/lib/cloud/health.d.ts +1 -0
- package/lib/cloud/health.js +121 -0
- package/lib/cloud/interface.d.ts +222 -44
- package/lib/cloud/interface.js +15 -2
- package/lib/cloud/laser-clean/deleteCleaningRecord/index.d.ts +27 -0
- package/lib/cloud/laser-clean/deleteCleaningRecord/index.js +28 -0
- package/lib/cloud/laser-clean/deleteCleaningRecord/type.d.ts +7 -0
- package/lib/cloud/laser-clean/deleteCleaningRecord/type.js +1 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/index.d.ts +27 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/index.js +28 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/type.d.ts +7 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/type.js +1 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/index.d.ts +27 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/index.js +28 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/type.d.ts +7 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/type.js +1 -0
- package/lib/cloud/laser-clean/getCleaningRecords/index.d.ts +30 -0
- package/lib/cloud/laser-clean/getCleaningRecords/index.js +31 -0
- package/lib/cloud/laser-clean/getCleaningRecords/type.d.ts +39 -0
- package/lib/cloud/laser-clean/getCleaningRecords/type.js +1 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/index.d.ts +29 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/index.js +30 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/type.d.ts +30 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/type.js +1 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/index.d.ts +29 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/index.js +30 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/type.d.ts +35 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/type.js +1 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/index.d.ts +28 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/index.js +29 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/type.d.ts +28 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/type.js +1 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/index.d.ts +24 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/index.js +25 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/type.d.ts +29 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/type.js +1 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/index.d.ts +24 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/index.js +25 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/type.d.ts +26 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/type.js +1 -0
- package/lib/cloud/laser-clean/getVoiceList/index.d.ts +28 -0
- package/lib/cloud/laser-clean/getVoiceList/index.js +29 -0
- package/lib/cloud/laser-clean/getVoiceList/type.d.ts +48 -0
- package/lib/cloud/laser-clean/getVoiceList/type.js +1 -0
- package/lib/cloud/laser-clean/index.d.ts +1 -1
- package/lib/cloud/laser-clean/index.js +1 -1
- package/lib/cloud/laser-clean/map.d.ts +5 -7
- package/lib/cloud/laser-clean/map.js +5 -9
- package/lib/cloud/laser-clean/record.d.ts +5 -6
- package/lib/cloud/laser-clean/record.js +5 -7
- package/lib/cloud/laser-clean/renameHistoryMap/index.d.ts +28 -0
- package/lib/cloud/laser-clean/renameHistoryMap/index.js +29 -0
- package/lib/cloud/laser-clean/renameHistoryMap/type.d.ts +9 -0
- package/lib/cloud/laser-clean/renameHistoryMap/type.js +1 -0
- package/lib/cloud/laser-clean/voice.d.ts +1 -3
- package/lib/cloud/laser-clean/voice.js +1 -4
- package/lib/cloud/linkage.d.ts +271 -53
- package/lib/cloud/linkage.js +256 -51
- package/lib/cloud/remoteGroup.d.ts +37 -0
- package/lib/cloud/remoteGroup.js +37 -0
- package/lib/cloud/timer.d.ts +104 -26
- package/lib/cloud/timer.js +104 -26
- package/lib/getApp/index.thing.d.ts +47 -1
- package/lib/getApp/index.thing.js +40 -2
- package/lib/getBoundingClientRect/index.thing.d.ts +101 -1
- package/lib/getBoundingClientRect/index.thing.js +59 -0
- package/lib/getCurrentPages/index.thing.d.ts +40 -15
- package/lib/getCurrentPages/index.thing.js +36 -15
- package/lib/getCustomConfig/index.d.ts +5 -2
- package/lib/getCustomConfig/index.thing.d.ts +68 -2
- package/lib/getCustomConfig/index.thing.js +62 -0
- package/lib/getCustomConfig/index.wechat.d.ts +5 -2
- package/lib/getCustomConfig/type.d.ts +26 -15
- package/lib/getElementById/index.thing.d.ts +42 -1
- package/lib/getElementById/index.thing.js +40 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +4 -2
- package/lib/nativeRouters/common.d.ts +8 -0
- package/lib/nativeRouters/device.d.ts +137 -5
- package/lib/nativeRouters/device.js +138 -6
- package/lib/nativeRouters/gw.d.ts +58 -8
- package/lib/nativeRouters/gw.js +57 -8
- package/lib/nativeRouters/outdoors.d.ts +16 -3
- package/lib/nativeRouters/outdoors.js +16 -3
- package/lib/nativeRouters/remoteGroup.d.ts +23 -0
- package/lib/nativeRouters/remoteGroup.js +23 -0
- package/lib/nativeRouters/root.d.ts +19 -0
- package/lib/nativeRouters/root.js +17 -0
- package/lib/openGroupCreate/index.d.ts +45 -0
- package/lib/openGroupCreate/index.js +32 -0
- package/package.json +5 -5
package/lib/cloud/gateway.js
CHANGED
|
@@ -1,30 +1,290 @@
|
|
|
1
1
|
/// <reference path="../../@types/gateway.d.ts" />
|
|
2
|
+
/// <reference path="../../@types/GroupCITestKit.d.ts" />
|
|
2
3
|
import { factory } from '../utils';
|
|
3
|
-
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export const hasParamsMethod = factory('hasParamsMethod', {
|
|
9
|
+
namespace: 'groupcitest'
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export const richDocMethod = factory('richDocMethod', {
|
|
16
|
+
namespace: 'groupcitest'
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 下发更新 LQI 指令,用于刷新网关子设备的信号质量值
|
|
21
|
+
* @param params.devId 子设备 ID
|
|
22
|
+
* @returns 是否下发成功
|
|
23
|
+
* @public
|
|
24
|
+
* @since @ray-js/ray 1.7.60
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* import { gateway } from '@ray-js/ray';
|
|
28
|
+
*
|
|
29
|
+
* const refreshLQI = async () => {
|
|
30
|
+
* try {
|
|
31
|
+
* const success = await gateway.sendCmdForRefreshDeviceLQI({
|
|
32
|
+
* devId: 'sub_device_001',
|
|
33
|
+
* });
|
|
34
|
+
* console.log('下发刷新LQI指令:', success);
|
|
35
|
+
* } catch (err) {
|
|
36
|
+
* console.error('下发失败:', err);
|
|
37
|
+
* }
|
|
38
|
+
* };
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export const sendCmdForRefreshDeviceLQI = factory('sendCmdForRefreshDeviceLQI', {
|
|
4
42
|
namespace: 'gateway'
|
|
5
43
|
});
|
|
6
|
-
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 获取设备最新 LQI(链路质量指示)信息
|
|
47
|
+
* @param params.devId 子设备 ID
|
|
48
|
+
* @param params.offsetTime 时间偏移量,单位为毫秒
|
|
49
|
+
* @returns 设备 LQI 信息列表
|
|
50
|
+
* @public
|
|
51
|
+
* @since @ray-js/ray 1.7.60
|
|
52
|
+
* @example
|
|
53
|
+
* ```typescript
|
|
54
|
+
* import { gateway } from '@ray-js/ray';
|
|
55
|
+
*
|
|
56
|
+
* const fetchLQI = async () => {
|
|
57
|
+
* try {
|
|
58
|
+
* const lqiList = await gateway.getLastDeviceLQI({
|
|
59
|
+
* devId: 'sub_device_001',
|
|
60
|
+
* offsetTime: 60000,
|
|
61
|
+
* });
|
|
62
|
+
* lqiList.forEach(item => {
|
|
63
|
+
* console.log(`设备: ${item.deviceName}, LQI: ${item.lqi}`);
|
|
64
|
+
* });
|
|
65
|
+
* } catch (err) {
|
|
66
|
+
* console.error('获取LQI失败:', err);
|
|
67
|
+
* }
|
|
68
|
+
* };
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export const getLastDeviceLQI = factory('getLastDeviceLQI', {
|
|
7
72
|
namespace: 'gateway'
|
|
8
73
|
});
|
|
9
|
-
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 查询设备高级能力,返回设备支持的扩展能力键值对
|
|
77
|
+
* @param params.devId 设备 ID
|
|
78
|
+
* @returns 设备高级能力键值对
|
|
79
|
+
* @public
|
|
80
|
+
* @since @ray-js/ray 1.7.60
|
|
81
|
+
* @example
|
|
82
|
+
* ```typescript
|
|
83
|
+
* import { gateway } from '@ray-js/ray';
|
|
84
|
+
*
|
|
85
|
+
* const querySeniorAbility = async () => {
|
|
86
|
+
* try {
|
|
87
|
+
* const abilities = await gateway.getSeniorAbility({
|
|
88
|
+
* devId: 'device_001',
|
|
89
|
+
* });
|
|
90
|
+
* console.log('设备高级能力:', abilities);
|
|
91
|
+
* } catch (err) {
|
|
92
|
+
* console.error('查询失败:', err);
|
|
93
|
+
* }
|
|
94
|
+
* };
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
export const getSeniorAbility = factory('getSeniorAbility', {
|
|
10
98
|
namespace: 'gateway'
|
|
11
99
|
});
|
|
12
|
-
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* 获取网关子设备数量限制,包括各类型子设备的上限
|
|
103
|
+
* @param params.devId 设备 ID
|
|
104
|
+
* @returns 子设备数量限制信息
|
|
105
|
+
* @public
|
|
106
|
+
* @since @ray-js/ray 1.7.60
|
|
107
|
+
* @example
|
|
108
|
+
* ```typescript
|
|
109
|
+
* import { gateway } from '@ray-js/ray';
|
|
110
|
+
*
|
|
111
|
+
* const fetchSubDevLimit = async () => {
|
|
112
|
+
* try {
|
|
113
|
+
* const limit = await gateway.getGatewaySubDevLimit({
|
|
114
|
+
* devId: 'gateway_001',
|
|
115
|
+
* });
|
|
116
|
+
* console.log('子设备上限:', limit.max);
|
|
117
|
+
* console.log('蓝牙子设备上限:', limit.blu);
|
|
118
|
+
* console.log('Zigbee子设备上限:', limit.zig);
|
|
119
|
+
* } catch (err) {
|
|
120
|
+
* console.error('获取失败:', err);
|
|
121
|
+
* }
|
|
122
|
+
* };
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
export const getGatewaySubDevLimit = factory('getGatewaySubDevLimit', {
|
|
13
126
|
namespace: 'gateway'
|
|
14
127
|
});
|
|
15
|
-
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Mesh 类设备拖拽,将子设备从一个 Mesh 网络移动到另一个
|
|
131
|
+
* @param params.nodeIds 需要拖拽的子设备 ID 列表
|
|
132
|
+
* @param params.sourceMeshId 原 Mesh ID 或网关 ID
|
|
133
|
+
* @param params.targetMeshId 目标 Mesh ID 或网关 ID
|
|
134
|
+
* @returns 拖拽结果,包含已在目标网关下的设备列表
|
|
135
|
+
* @public
|
|
136
|
+
* @since @ray-js/ray 1.7.60
|
|
137
|
+
* @example
|
|
138
|
+
* ```typescript
|
|
139
|
+
* import { gateway } from '@ray-js/ray';
|
|
140
|
+
*
|
|
141
|
+
* const moveMeshDevices = async () => {
|
|
142
|
+
* try {
|
|
143
|
+
* const result = await gateway.updateRelationMesh({
|
|
144
|
+
* nodeIds: ['node_001', 'node_002'],
|
|
145
|
+
* sourceMeshId: 'mesh_source',
|
|
146
|
+
* targetMeshId: 'mesh_target',
|
|
147
|
+
* });
|
|
148
|
+
* if (result.repeatNodeIds.length > 0) {
|
|
149
|
+
* console.log('已在目标网关下的设备:', result.repeatNodeIds);
|
|
150
|
+
* }
|
|
151
|
+
* } catch (err) {
|
|
152
|
+
* console.error('拖拽失败:', err);
|
|
153
|
+
* }
|
|
154
|
+
* };
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
export const updateRelationMesh = factory('updateRelationMesh', {
|
|
16
158
|
namespace: 'gateway'
|
|
17
159
|
});
|
|
18
|
-
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* 蓝牙单点类设备拖拽,将蓝牙子设备从一个网关移动到另一个
|
|
163
|
+
* @param params.nodes 需要拖拽的子设备 ID 与 UUID 列表
|
|
164
|
+
* @param params.sourceMeshId 原网关 ID
|
|
165
|
+
* @param params.targetMeshId 目标网关 ID
|
|
166
|
+
* @returns 拖拽结果,包含已在目标网关下的设备列表
|
|
167
|
+
* @public
|
|
168
|
+
* @since @ray-js/ray 1.7.60
|
|
169
|
+
* @example
|
|
170
|
+
* ```typescript
|
|
171
|
+
* import { gateway } from '@ray-js/ray';
|
|
172
|
+
*
|
|
173
|
+
* const moveBlueDevices = async () => {
|
|
174
|
+
* try {
|
|
175
|
+
* const result = await gateway.updateRelationBlue({
|
|
176
|
+
* nodes: [
|
|
177
|
+
* { devId: 'blue_dev_001', uuid: 'uuid_001' },
|
|
178
|
+
* { devId: 'blue_dev_002', uuid: 'uuid_002' },
|
|
179
|
+
* ],
|
|
180
|
+
* sourceMeshId: 'gateway_source',
|
|
181
|
+
* targetMeshId: 'gateway_target',
|
|
182
|
+
* });
|
|
183
|
+
* if (result.repeatNodeIds.length > 0) {
|
|
184
|
+
* console.log('已在目标网关下的设备:', result.repeatNodeIds);
|
|
185
|
+
* }
|
|
186
|
+
* } catch (err) {
|
|
187
|
+
* console.error('拖拽失败:', err);
|
|
188
|
+
* }
|
|
189
|
+
* };
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
export const updateRelationBlue = factory('updateRelationBlue', {
|
|
19
193
|
namespace: 'gateway'
|
|
20
194
|
});
|
|
21
|
-
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Beacon 类设备拖拽,将 Beacon 子设备从一个网关移动到另一个
|
|
198
|
+
* @param params.nodes 需要拖拽的子设备 ID 与 MAC 列表
|
|
199
|
+
* @param params.sourceMeshId 原网关 ID
|
|
200
|
+
* @param params.targetMeshId 目标网关 ID
|
|
201
|
+
* @returns 拖拽结果,包含已在目标网关下的设备列表
|
|
202
|
+
* @public
|
|
203
|
+
* @since @ray-js/ray 1.7.60
|
|
204
|
+
* @example
|
|
205
|
+
* ```typescript
|
|
206
|
+
* import { gateway } from '@ray-js/ray';
|
|
207
|
+
*
|
|
208
|
+
* const moveBeaconDevices = async () => {
|
|
209
|
+
* try {
|
|
210
|
+
* const result = await gateway.updateRelationBeacon({
|
|
211
|
+
* nodes: [
|
|
212
|
+
* { devId: 'beacon_dev_001', mac: 'AA:BB:CC:DD:EE:01' },
|
|
213
|
+
* { devId: 'beacon_dev_002', mac: 'AA:BB:CC:DD:EE:02' },
|
|
214
|
+
* ],
|
|
215
|
+
* sourceMeshId: 'gateway_source',
|
|
216
|
+
* targetMeshId: 'gateway_target',
|
|
217
|
+
* });
|
|
218
|
+
* if (result.repeatNodeIds.length > 0) {
|
|
219
|
+
* console.log('已在目标网关下的设备:', result.repeatNodeIds);
|
|
220
|
+
* }
|
|
221
|
+
* } catch (err) {
|
|
222
|
+
* console.error('拖拽失败:', err);
|
|
223
|
+
* }
|
|
224
|
+
* };
|
|
225
|
+
* ```
|
|
226
|
+
*/
|
|
227
|
+
export const updateRelationBeacon = factory('updateRelationBeacon', {
|
|
22
228
|
namespace: 'gateway'
|
|
23
229
|
});
|
|
24
|
-
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* 获取网关的能力信息,包括信号质量、性能指标和子设备数量上限
|
|
233
|
+
* @param params.devIds 设备 ID 拼成的字符串,以逗号分隔
|
|
234
|
+
* @returns 网关能力信息列表
|
|
235
|
+
* @public
|
|
236
|
+
* @since @ray-js/ray 1.7.60
|
|
237
|
+
* @example
|
|
238
|
+
* ```typescript
|
|
239
|
+
* import { gateway } from '@ray-js/ray';
|
|
240
|
+
*
|
|
241
|
+
* const fetchGatewayAbility = async () => {
|
|
242
|
+
* try {
|
|
243
|
+
* const abilities = await gateway.getGatewayAbility({
|
|
244
|
+
* devIds: 'gateway_001,gateway_002',
|
|
245
|
+
* });
|
|
246
|
+
* abilities.forEach(item => {
|
|
247
|
+
* console.log(`设备: ${item.devId}, 能力值: ${item.capability}, LQI: ${item.lqi}`);
|
|
248
|
+
* });
|
|
249
|
+
* } catch (err) {
|
|
250
|
+
* console.error('获取失败:', err);
|
|
251
|
+
* }
|
|
252
|
+
* };
|
|
253
|
+
* ```
|
|
254
|
+
*/
|
|
255
|
+
export const getGatewayAbility = factory('getGatewayAbility', {
|
|
25
256
|
namespace: 'gateway'
|
|
26
257
|
});
|
|
27
|
-
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* 获取设备安全日志,支持分页查询
|
|
261
|
+
* @param params.queryStr 查询条件字符串
|
|
262
|
+
* @returns 设备日志数据,包含日志列表和分页信息
|
|
263
|
+
* @public
|
|
264
|
+
* @since @ray-js/ray 1.7.60
|
|
265
|
+
* @example
|
|
266
|
+
* ```typescript
|
|
267
|
+
* import { gateway } from '@ray-js/ray';
|
|
268
|
+
*
|
|
269
|
+
* const fetchDeviceLog = async () => {
|
|
270
|
+
* try {
|
|
271
|
+
* const logData = await gateway.getSecurityDeviceLog({
|
|
272
|
+
* queryStr: 'device_001',
|
|
273
|
+
* });
|
|
274
|
+
* console.log('总数:', logData.totalCount);
|
|
275
|
+
* logData.datas.forEach(log => {
|
|
276
|
+
* console.log(`DP: ${log.dpName}, 值: ${log.value}, 时间: ${log.eventTime}`);
|
|
277
|
+
* });
|
|
278
|
+
* if (logData.hasNext) {
|
|
279
|
+
* console.log('还有更多数据');
|
|
280
|
+
* }
|
|
281
|
+
* } catch (err) {
|
|
282
|
+
* console.error('获取日志失败:', err);
|
|
283
|
+
* }
|
|
284
|
+
* };
|
|
285
|
+
* ```
|
|
286
|
+
*/
|
|
287
|
+
export const getSecurityDeviceLog = factory('getSecurityDeviceLog', {
|
|
28
288
|
namespace: 'gateway'
|
|
29
289
|
});
|
|
30
290
|
export const gateway = {
|
package/lib/cloud/health.d.ts
CHANGED
package/lib/cloud/health.js
CHANGED
|
@@ -1,52 +1,173 @@
|
|
|
1
|
+
/// <reference path="../../@types/health.d.ts" />
|
|
2
|
+
|
|
1
3
|
import { factory } from '../utils';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 添加面板用户
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
* @since @ray-js/ray 1.5.40
|
|
10
|
+
*/
|
|
2
11
|
const addPanelUser = factory('addPanelUser', {
|
|
3
12
|
namespace: 'health'
|
|
4
13
|
});
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 更新面板用户
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
* @since @ray-js/ray 1.5.40
|
|
20
|
+
*/
|
|
5
21
|
const updatePanelUser = factory('updatePanelUser', {
|
|
6
22
|
namespace: 'health'
|
|
7
23
|
});
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 删除面板用户
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
* @since @ray-js/ray 1.5.40
|
|
30
|
+
*/
|
|
8
31
|
const deletePanelUser = factory('deletePanelUser', {
|
|
9
32
|
namespace: 'health'
|
|
10
33
|
});
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 获取面板用户列表
|
|
37
|
+
*
|
|
38
|
+
* @public
|
|
39
|
+
* @since @ray-js/ray 1.5.40
|
|
40
|
+
*/
|
|
11
41
|
const getPanelUserList = factory('getPanelUserList', {
|
|
12
42
|
namespace: 'health'
|
|
13
43
|
});
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 获取默认头像列表
|
|
47
|
+
*
|
|
48
|
+
* @public
|
|
49
|
+
* @since @ray-js/ray 1.5.40
|
|
50
|
+
*/
|
|
14
51
|
const getDefaultAvatarList = factory('getDefaultAvatarList', {
|
|
15
52
|
namespace: 'health'
|
|
16
53
|
});
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 面板上传血压数据
|
|
57
|
+
*
|
|
58
|
+
* @public
|
|
59
|
+
* @since @ray-js/ray 1.5.40
|
|
60
|
+
*/
|
|
17
61
|
const reportPanelBpgData = factory('reportPanelBpgData', {
|
|
18
62
|
namespace: 'health'
|
|
19
63
|
});
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 手动上传血压数据
|
|
67
|
+
*
|
|
68
|
+
* @public
|
|
69
|
+
* @since @ray-js/ray 1.5.40
|
|
70
|
+
*/
|
|
20
71
|
const reportSingleBpgData = factory('reportSingleBpgData', {
|
|
21
72
|
namespace: 'health'
|
|
22
73
|
});
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 更新血压数据备注
|
|
77
|
+
*
|
|
78
|
+
* @public
|
|
79
|
+
* @since @ray-js/ray 1.5.40
|
|
80
|
+
*/
|
|
23
81
|
const updateBpgDataRemark = factory('updateBpgDataRemark', {
|
|
24
82
|
namespace: 'health'
|
|
25
83
|
});
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 删除血压数据
|
|
87
|
+
*
|
|
88
|
+
* @public
|
|
89
|
+
* @since @ray-js/ray 1.5.40
|
|
90
|
+
*/
|
|
26
91
|
const deleteBpgData = factory('deleteBpgData', {
|
|
27
92
|
namespace: 'health'
|
|
28
93
|
});
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* 获取历史血压数据
|
|
97
|
+
*
|
|
98
|
+
* @public
|
|
99
|
+
* @since @ray-js/ray 1.5.40
|
|
100
|
+
*/
|
|
29
101
|
const getBpgDataHistory = factory('getBpgDataHistory', {
|
|
30
102
|
namespace: 'health'
|
|
31
103
|
});
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 获取最新一天血压统计数据
|
|
107
|
+
*
|
|
108
|
+
* @public
|
|
109
|
+
* @since @ray-js/ray 1.5.40
|
|
110
|
+
*/
|
|
32
111
|
const getBpgDataTrendLatest = factory('getBpgDataTrendLatest', {
|
|
33
112
|
namespace: 'health'
|
|
34
113
|
});
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* 获取血压等级统计数据
|
|
117
|
+
*
|
|
118
|
+
* @public
|
|
119
|
+
* @since @ray-js/ray 1.5.40
|
|
120
|
+
*/
|
|
35
121
|
const getBpgDataLevnum = factory('getBpgDataLevnum', {
|
|
36
122
|
namespace: 'health'
|
|
37
123
|
});
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* 获取血压数据统计信息
|
|
127
|
+
*
|
|
128
|
+
* @public
|
|
129
|
+
* @since @ray-js/ray 1.5.40
|
|
130
|
+
*/
|
|
38
131
|
const getBpgDataTrend = factory('getBpgDataTrend', {
|
|
39
132
|
namespace: 'health'
|
|
40
133
|
});
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* 获取有血压数据的日期
|
|
137
|
+
*
|
|
138
|
+
* @public
|
|
139
|
+
* @since @ray-js/ray 1.5.40
|
|
140
|
+
*/
|
|
41
141
|
const getBpgDataDays = factory('getBpgDataDays', {
|
|
42
142
|
namespace: 'health'
|
|
43
143
|
});
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* 获取未分配血压数据
|
|
147
|
+
*
|
|
148
|
+
* @public
|
|
149
|
+
* @since @ray-js/ray 1.5.40
|
|
150
|
+
*/
|
|
44
151
|
const getBpgDataUnallocated = factory('getBpgDataUnallocated', {
|
|
45
152
|
namespace: 'health'
|
|
46
153
|
});
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* 分配未分配血压数据
|
|
157
|
+
*
|
|
158
|
+
* @public
|
|
159
|
+
* @since @ray-js/ray 1.5.40
|
|
160
|
+
*/
|
|
47
161
|
const updateBpgDataUnallocated = factory('updateBpgDataUnallocated', {
|
|
48
162
|
namespace: 'health'
|
|
49
163
|
});
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* 删除未分配血压数据
|
|
167
|
+
*
|
|
168
|
+
* @public
|
|
169
|
+
* @since @ray-js/ray 1.5.40
|
|
170
|
+
*/
|
|
50
171
|
const deleteBpgDataUnallocated = factory('deleteBpgDataUnallocated', {
|
|
51
172
|
namespace: 'health'
|
|
52
173
|
});
|