@ray-js/api 1.4.61 → 1.4.63
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/P2PKit.d.ts +24 -2
- package/lib/P2PKit-2.0.3.d.ts +1 -0
- package/lib/P2PKit-2.0.3.js +3 -0
- package/lib/PlayNetKit-1.1.3.d.ts +24 -25
- package/lib/cloud/device.js +1 -1
- package/lib/cloud/doorlock/README.md +3 -0
- package/lib/cloud/doorlock/auth.d.ts +235 -0
- package/lib/cloud/doorlock/auth.js +223 -0
- package/lib/cloud/doorlock/device.d.ts +137 -0
- package/lib/cloud/doorlock/device.js +187 -0
- package/lib/cloud/doorlock/index.d.ts +10 -0
- package/lib/cloud/doorlock/index.js +20 -0
- package/lib/cloud/doorlock/log.d.ts +113 -0
- package/lib/cloud/doorlock/log.js +53 -0
- package/lib/cloud/doorlock/member-opmode.d.ts +121 -0
- package/lib/cloud/doorlock/member-opmode.js +104 -0
- package/lib/cloud/doorlock/member.d.ts +110 -0
- package/lib/cloud/doorlock/member.js +72 -0
- package/lib/cloud/doorlock/offline-pwd.d.ts +61 -0
- package/lib/cloud/doorlock/offline-pwd.js +67 -0
- package/lib/cloud/{doorlock.js → doorlock/old.js} +3 -2
- package/lib/cloud/doorlock/temp-pwd.d.ts +194 -0
- package/lib/cloud/doorlock/temp-pwd.js +193 -0
- package/lib/cloud/doorlock/unlock-method.d.ts +62 -0
- package/lib/cloud/doorlock/unlock-method.js +85 -0
- package/lib/cloud/doorlock/unlock.d.ts +89 -0
- package/lib/cloud/doorlock/unlock.js +76 -0
- package/lib/cloud/index.d.ts +3 -1
- package/lib/cloud/index.js +7 -4
- package/lib/cloud/interface.d.ts +26 -0
- package/lib/cloud/recipe/basket.d.ts +220 -0
- package/lib/cloud/recipe/basket.js +328 -0
- package/lib/cloud/recipe/category-list.d.ts +71 -0
- package/lib/cloud/recipe/category-list.js +65 -0
- package/lib/cloud/recipe/custom.d.ts +177 -0
- package/lib/cloud/recipe/custom.js +172 -0
- package/lib/cloud/recipe/index.d.ts +8 -0
- package/lib/cloud/recipe/index.js +8 -0
- package/lib/cloud/recipe/menu.d.ts +170 -0
- package/lib/cloud/recipe/menu.js +76 -0
- package/lib/cloud/recipe/query.d.ts +87 -0
- package/lib/cloud/recipe/query.js +101 -0
- package/lib/cloud/recipe/record.d.ts +54 -0
- package/lib/cloud/recipe/record.js +87 -0
- package/lib/cloud/recipe/score.d.ts +69 -0
- package/lib/cloud/recipe/score.js +106 -0
- package/lib/cloud/recipe/star.d.ts +131 -0
- package/lib/cloud/recipe/star.js +151 -0
- package/lib/cloud/recipe/types.d.ts +7 -0
- package/lib/cloud/recipe/types.js +0 -0
- package/lib/cloud/remoteGroup.d.ts +10 -0
- package/lib/cloud/remoteGroup.js +31 -0
- package/lib/errorCode.d.ts +4 -0
- package/lib/errorCode.js +3 -0
- package/lib/nativeRouters/common.js +5 -2
- package/lib/nativeRouters/index.d.ts +1 -0
- package/lib/nativeRouters/index.js +2 -1
- package/lib/nativeRouters/remoteGroup.d.ts +22 -0
- package/lib/nativeRouters/remoteGroup.js +11 -0
- package/package.json +5 -5
- package/@types/PlayNetKit.d.ts +0 -444
- /package/lib/cloud/{doorlock.d.ts → doorlock/old.d.ts} +0 -0
@@ -0,0 +1,10 @@
|
|
1
|
+
import { IGetZigbeeLocalGroupDeviceList, IGetZigbeeLocalGroupRelation } from './interface';
|
2
|
+
/**
|
3
|
+
* 获取 Zigbee 遥控器群组 localId 列表
|
4
|
+
*/
|
5
|
+
declare const getZigbeeLocalGroupRelation: (params: IGetZigbeeLocalGroupRelation) => Promise<string>;
|
6
|
+
/**
|
7
|
+
* 获取可以加入 Zigbee 遥控器群组的设备列表
|
8
|
+
*/
|
9
|
+
declare const getZigbeeLocalGroupDeviceList: (params: IGetZigbeeLocalGroupDeviceList) => Promise<string>;
|
10
|
+
export { getZigbeeLocalGroupRelation, getZigbeeLocalGroupDeviceList };
|
@@ -0,0 +1,31 @@
|
|
1
|
+
// 遥控器群组接口
|
2
|
+
import { requestCloud } from '../';
|
3
|
+
import { THING } from '../constants';
|
4
|
+
/**
|
5
|
+
* 获取 Zigbee 遥控器群组 localId 列表
|
6
|
+
*/
|
7
|
+
const getZigbeeLocalGroupRelation = params => {
|
8
|
+
return requestCloud({
|
9
|
+
api: "".concat(THING, ".p.remote.local.relation.get"),
|
10
|
+
version: '1.0',
|
11
|
+
data: {
|
12
|
+
devId: params.devId,
|
13
|
+
type: 0
|
14
|
+
}
|
15
|
+
});
|
16
|
+
};
|
17
|
+
|
18
|
+
/**
|
19
|
+
* 获取可以加入 Zigbee 遥控器群组的设备列表
|
20
|
+
*/
|
21
|
+
const getZigbeeLocalGroupDeviceList = params => {
|
22
|
+
return requestCloud({
|
23
|
+
api: "".concat(THING, ".m.device.group.dev.list"),
|
24
|
+
version: '1.0',
|
25
|
+
data: params,
|
26
|
+
extData: {
|
27
|
+
gid: params.homeId
|
28
|
+
}
|
29
|
+
});
|
30
|
+
};
|
31
|
+
export { getZigbeeLocalGroupRelation, getZigbeeLocalGroupDeviceList };
|
package/lib/errorCode.js
ADDED
@@ -1,6 +1,7 @@
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
2
2
|
const _excluded = ["success", "fail", "complete"];
|
3
3
|
import { stringifyUrl } from '../utils';
|
4
|
+
import ErrorCode from '../errorCode';
|
4
5
|
export function nativeRouter(uri, params) {
|
5
6
|
const _ref = params || {},
|
6
7
|
{
|
@@ -20,9 +21,11 @@ export function nativeRouter(uri, params) {
|
|
20
21
|
resolve();
|
21
22
|
},
|
22
23
|
fail(err) {
|
23
|
-
if (+err.errorCode ===
|
24
|
+
if (+err.errorCode === ErrorCode.NATIVE_ROUTER_ERROR_ENVIRONMENT) {
|
25
|
+
const errMsg = 'Cannot use in this environment. Please use real device preview.';
|
26
|
+
console.warn(errMsg);
|
24
27
|
// 该环境不可使用,请使用真机预览和线上包
|
25
|
-
err.errorMsg =
|
28
|
+
err.errorMsg = errMsg;
|
26
29
|
}
|
27
30
|
fail === null || fail === void 0 || fail(err);
|
28
31
|
reject(err);
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { ICommon } from './common';
|
2
|
+
type OpenZigbeeLocalGroupParams = {
|
3
|
+
/**
|
4
|
+
* 设备 ID
|
5
|
+
*/
|
6
|
+
deviceId: string;
|
7
|
+
/**
|
8
|
+
* localId 群组本地标识
|
9
|
+
*/
|
10
|
+
localId: string;
|
11
|
+
/**
|
12
|
+
* categoryCode 并非三级品类,与 localId 匹配范围为 7001-7008;
|
13
|
+
* localId 为云端分配,步长为 8,因此一个遥控器内部最多支持关联 8 个群组,localId 为初始值依次+1,与之匹配的 categoryCode 从 7001 依次 +1.
|
14
|
+
*/
|
15
|
+
categoryCode: string;
|
16
|
+
/**
|
17
|
+
* 二级品类 code,用于进行设备列表筛选过滤
|
18
|
+
*/
|
19
|
+
codes: string;
|
20
|
+
} & ICommon;
|
21
|
+
export declare function openZigbeeLocalGroup(params?: OpenZigbeeLocalGroupParams): Promise<void>;
|
22
|
+
export {};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import { nativeRouter } from './common';
|
3
|
+
export function openZigbeeLocalGroup(params) {
|
4
|
+
const realParams = _objectSpread({}, params);
|
5
|
+
// 统一成 TTT 的 deviceId 写法,但实际入参为 devId
|
6
|
+
if (params.deviceId) {
|
7
|
+
realParams.devId = params.deviceId;
|
8
|
+
delete realParams.deviceId;
|
9
|
+
}
|
10
|
+
return nativeRouter('zigbee_pair', realParams);
|
11
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ray-js/api",
|
3
|
-
"version": "1.4.
|
3
|
+
"version": "1.4.63",
|
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.4.
|
33
|
-
"@ray-js/router": "1.4.
|
32
|
+
"@ray-js/framework": "1.4.63",
|
33
|
+
"@ray-js/router": "1.4.63",
|
34
34
|
"@ray-js/wechat": "^0.2.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.4.
|
39
|
+
"@ray-js/cli": "1.4.63",
|
40
40
|
"art-template": "^4.13.2",
|
41
41
|
"fs-extra": "^10.1.0",
|
42
42
|
"miniprogram-api-typings": "^3.12.2",
|
@@ -46,5 +46,5 @@
|
|
46
46
|
"access": "public",
|
47
47
|
"registry": "https://registry.npmjs.org"
|
48
48
|
},
|
49
|
-
"gitHead": "
|
49
|
+
"gitHead": "4934e503e3fcb057df92eb42c7f7fd84f1d31e60"
|
50
50
|
}
|
package/@types/PlayNetKit.d.ts
DELETED
@@ -1,444 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* PlayNetKit
|
3
|
-
*
|
4
|
-
* @version 1.1.3
|
5
|
-
*/
|
6
|
-
declare namespace ty.playnet {
|
7
|
-
/**
|
8
|
-
* 判断是否有这个权限
|
9
|
-
*WIFI or BLE
|
10
|
-
*/
|
11
|
-
export function hasPermission(params: {
|
12
|
-
/**
|
13
|
-
* "WIFI" or "BLE"
|
14
|
-
* 权限
|
15
|
-
*/
|
16
|
-
permission: string
|
17
|
-
complete?: () => void
|
18
|
-
success?: (params: boolean) => void
|
19
|
-
fail?: (params: {
|
20
|
-
errorMsg: string
|
21
|
-
errorCode: string | number
|
22
|
-
innerError: {
|
23
|
-
errorCode: string | number
|
24
|
-
errorMsg: string
|
25
|
-
}
|
26
|
-
}) => void
|
27
|
-
}): void
|
28
|
-
|
29
|
-
/**
|
30
|
-
* 请求获取这个权限
|
31
|
-
*WIFI or BLE
|
32
|
-
*/
|
33
|
-
export function requestPermission(params: {
|
34
|
-
/**
|
35
|
-
* "WIFI" or "BLE"
|
36
|
-
* 权限
|
37
|
-
*/
|
38
|
-
permission: string
|
39
|
-
complete?: () => void
|
40
|
-
success?: (params: null) => void
|
41
|
-
fail?: (params: {
|
42
|
-
errorMsg: string
|
43
|
-
errorCode: string | number
|
44
|
-
innerError: {
|
45
|
-
errorCode: string | number
|
46
|
-
errorMsg: string
|
47
|
-
}
|
48
|
-
}) => void
|
49
|
-
}): void
|
50
|
-
|
51
|
-
/**
|
52
|
-
* 指定时间内扫描已配网的设备,扫描结果通过【onBLEScanDevice】事件获取
|
53
|
-
*/
|
54
|
-
export function startBLEScanDevice(params: {
|
55
|
-
/** 扫描超时时间 */
|
56
|
-
timeout: number
|
57
|
-
/**
|
58
|
-
* 扫描类型
|
59
|
-
* SINGLE -> "SINGLE"
|
60
|
-
* SINGLE_QR -> "SINGLE_QR"
|
61
|
-
* MESH -> "MESH"
|
62
|
-
* MESH -> "MESH"
|
63
|
-
* SIG_MESH -> "SIG_MESH"
|
64
|
-
* NORMAL -> "NORMAL" 默认
|
65
|
-
* Thing_BEACON -> "Thing_BEACON"
|
66
|
-
* Multi_Mode 双模
|
67
|
-
*/
|
68
|
-
scanType: string
|
69
|
-
complete?: () => void
|
70
|
-
success?: (params: null) => void
|
71
|
-
fail?: (params: {
|
72
|
-
errorMsg: string
|
73
|
-
errorCode: string | number
|
74
|
-
innerError: {
|
75
|
-
errorCode: string | number
|
76
|
-
errorMsg: string
|
77
|
-
}
|
78
|
-
}) => void
|
79
|
-
}): void
|
80
|
-
|
81
|
-
/**
|
82
|
-
* 停止蓝牙扫描
|
83
|
-
*/
|
84
|
-
export function stopBLEScan(params?: {
|
85
|
-
complete?: () => void
|
86
|
-
success?: (params: null) => void
|
87
|
-
fail?: (params: {
|
88
|
-
errorMsg: string
|
89
|
-
errorCode: string | number
|
90
|
-
innerError: {
|
91
|
-
errorCode: string | number
|
92
|
-
errorMsg: string
|
93
|
-
}
|
94
|
-
}) => void
|
95
|
-
}): void
|
96
|
-
|
97
|
-
/**
|
98
|
-
* 蓝牙连接 / AP监听广播包后 并查询状态 然后再开始查询wifi列表
|
99
|
-
*/
|
100
|
-
export function queryDeviceConfigState(params: {
|
101
|
-
/** homeid */
|
102
|
-
homeId: number
|
103
|
-
/** 超时时间 */
|
104
|
-
timeout: number
|
105
|
-
/**
|
106
|
-
* 配网类型,后续新流程添加在这里
|
107
|
-
* AP -> "AP"
|
108
|
-
* WIFI_BLE -> "WIFI_BLE"
|
109
|
-
*/
|
110
|
-
pairType: string
|
111
|
-
/** 蓝牙扫描出来的广播包,目前只有wifi双模需要填写 */
|
112
|
-
bleWifiPairParams: ScanDevicePacket
|
113
|
-
complete?: () => void
|
114
|
-
success?: (params: WiFiInfo[]) => void
|
115
|
-
fail?: (params: {
|
116
|
-
errorMsg: string
|
117
|
-
errorCode: string | number
|
118
|
-
innerError: {
|
119
|
-
errorCode: string | number
|
120
|
-
errorMsg: string
|
121
|
-
}
|
122
|
-
}) => void
|
123
|
-
}): void
|
124
|
-
|
125
|
-
/**
|
126
|
-
* 开始配网
|
127
|
-
*/
|
128
|
-
export function startActivator(params: {
|
129
|
-
/**
|
130
|
-
* 配网类型,后续新流程添加在这里
|
131
|
-
* AP -> "AP"
|
132
|
-
* WIFI_BLE -> "WIFI_BLE"
|
133
|
-
*/
|
134
|
-
pairType: string
|
135
|
-
/** AP 模式下AP配网参数 */
|
136
|
-
apActivatorParams: ApActivatorParam
|
137
|
-
/** WIFI双模 模式下配网参数 */
|
138
|
-
bleWifiActivatorParams: BleWifiActivatorParam
|
139
|
-
complete?: () => void
|
140
|
-
success?: (params: {
|
141
|
-
/** 设备id */
|
142
|
-
devId: string
|
143
|
-
/** 设备名称 */
|
144
|
-
name: string
|
145
|
-
/** 设备房间id */
|
146
|
-
roomId: string
|
147
|
-
/** 设备图标url */
|
148
|
-
iconUrl: string
|
149
|
-
}) => void
|
150
|
-
fail?: (params: {
|
151
|
-
errorMsg: string
|
152
|
-
errorCode: string | number
|
153
|
-
innerError: {
|
154
|
-
errorCode: string | number
|
155
|
-
errorMsg: string
|
156
|
-
}
|
157
|
-
}) => void
|
158
|
-
}): void
|
159
|
-
|
160
|
-
/**
|
161
|
-
* 停止配网
|
162
|
-
*/
|
163
|
-
export function stopActivator(params: {
|
164
|
-
/** uuid 根据uuid来匹配找到对应的蓝牙配网设备 */
|
165
|
-
uuid: string
|
166
|
-
/**
|
167
|
-
* 配网类型,后续新流程添加在这里
|
168
|
-
* AP -> "AP"
|
169
|
-
* WIFI_BLE -> "WIFI_BLE", 蓝牙配网需要填uuid
|
170
|
-
*/
|
171
|
-
pairType: string
|
172
|
-
complete?: () => void
|
173
|
-
success?: (params: null) => void
|
174
|
-
fail?: (params: {
|
175
|
-
errorMsg: string
|
176
|
-
errorCode: string | number
|
177
|
-
innerError: {
|
178
|
-
errorCode: string | number
|
179
|
-
errorMsg: string
|
180
|
-
}
|
181
|
-
}) => void
|
182
|
-
}): void
|
183
|
-
|
184
|
-
/**
|
185
|
-
* 自动连接wifi
|
186
|
-
*/
|
187
|
-
export function autoConnectToAp(params: {
|
188
|
-
/** ssid */
|
189
|
-
ssid: string
|
190
|
-
/** pwd */
|
191
|
-
pwd: string
|
192
|
-
complete?: () => void
|
193
|
-
success?: (params: null) => void
|
194
|
-
fail?: (params: {
|
195
|
-
errorMsg: string
|
196
|
-
errorCode: string | number
|
197
|
-
innerError: {
|
198
|
-
errorCode: string | number
|
199
|
-
errorMsg: string
|
200
|
-
}
|
201
|
-
}) => void
|
202
|
-
}): void
|
203
|
-
|
204
|
-
/**
|
205
|
-
* 获取配网token
|
206
|
-
*/
|
207
|
-
export function getPairConfigToken(params: {
|
208
|
-
/** 家庭id */
|
209
|
-
gid: number
|
210
|
-
complete?: () => void
|
211
|
-
success?: (params: string) => void
|
212
|
-
fail?: (params: {
|
213
|
-
errorMsg: string
|
214
|
-
errorCode: string | number
|
215
|
-
innerError: {
|
216
|
-
errorCode: string | number
|
217
|
-
errorMsg: string
|
218
|
-
}
|
219
|
-
}) => void
|
220
|
-
}): void
|
221
|
-
|
222
|
-
/**
|
223
|
-
* 重置设备
|
224
|
-
*/
|
225
|
-
export function resetDevice(params: {
|
226
|
-
/** uuid 根据uuid来匹配找到对应的蓝牙配网设备 */
|
227
|
-
uuid: string
|
228
|
-
/**
|
229
|
-
* 配网类型,后续新流程添加在这里
|
230
|
-
* AP -> "AP"
|
231
|
-
* WIFI_BLE -> "WIFI_BLE", 蓝牙配网需要填uuid
|
232
|
-
*/
|
233
|
-
pairType: string
|
234
|
-
complete?: () => void
|
235
|
-
success?: (params: boolean) => void
|
236
|
-
fail?: (params: {
|
237
|
-
errorMsg: string
|
238
|
-
errorCode: string | number
|
239
|
-
innerError: {
|
240
|
-
errorCode: string | number
|
241
|
-
errorMsg: string
|
242
|
-
}
|
243
|
-
}) => void
|
244
|
-
}): void
|
245
|
-
|
246
|
-
/**
|
247
|
-
* 获取sl等级配置
|
248
|
-
*/
|
249
|
-
export function getDeviceSecurityConfigs(params?: {
|
250
|
-
complete?: () => void
|
251
|
-
success?: (params: string) => void
|
252
|
-
fail?: (params: {
|
253
|
-
errorMsg: string
|
254
|
-
errorCode: string | number
|
255
|
-
innerError: {
|
256
|
-
errorCode: string | number
|
257
|
-
errorMsg: string
|
258
|
-
}
|
259
|
-
}) => void
|
260
|
-
}): void
|
261
|
-
|
262
|
-
/**
|
263
|
-
* 在自动连接热点场景下,是否是系统控制弹窗的
|
264
|
-
*/
|
265
|
-
export function isSystemPopupInAutoConnectAp(params?: {
|
266
|
-
complete?: () => void
|
267
|
-
success?: (params: boolean) => void
|
268
|
-
fail?: (params: {
|
269
|
-
errorMsg: string
|
270
|
-
errorCode: string | number
|
271
|
-
innerError: {
|
272
|
-
errorCode: string | number
|
273
|
-
errorMsg: string
|
274
|
-
}
|
275
|
-
}) => void
|
276
|
-
}): void
|
277
|
-
|
278
|
-
/**
|
279
|
-
* 是否仅有蓝牙权限
|
280
|
-
*/
|
281
|
-
export function hasBlePermission(params?: {
|
282
|
-
complete?: () => void
|
283
|
-
success?: (params: boolean) => void
|
284
|
-
fail?: (params: {
|
285
|
-
errorMsg: string
|
286
|
-
errorCode: string | number
|
287
|
-
innerError: {
|
288
|
-
errorCode: string | number
|
289
|
-
errorMsg: string
|
290
|
-
}
|
291
|
-
}) => void
|
292
|
-
}): void
|
293
|
-
|
294
|
-
/**
|
295
|
-
* 是否有本地网络权限
|
296
|
-
*/
|
297
|
-
export function hasLocalNetworkPermission(params?: {
|
298
|
-
complete?: () => void
|
299
|
-
success?: (params: boolean) => void
|
300
|
-
fail?: (params: {
|
301
|
-
errorMsg: string
|
302
|
-
errorCode: string | number
|
303
|
-
innerError: {
|
304
|
-
errorCode: string | number
|
305
|
-
errorMsg: string
|
306
|
-
}
|
307
|
-
}) => void
|
308
|
-
}): void
|
309
|
-
|
310
|
-
/**
|
311
|
-
* 扫描到设备后进行通知
|
312
|
-
*/
|
313
|
-
export function onBLEScanDevice(listener: (params: ScanDevicePacket) => void): void
|
314
|
-
|
315
|
-
/**
|
316
|
-
* 取消监听:扫描到设备后进行通知
|
317
|
-
*/
|
318
|
-
export function offBLEScanDevice(listener: (params: ScanDevicePacket) => void): void
|
319
|
-
|
320
|
-
/**
|
321
|
-
* wifi状态发生变化
|
322
|
-
*/
|
323
|
-
export function onWifiStateChange(listener: (params: Privacy) => void): void
|
324
|
-
|
325
|
-
/**
|
326
|
-
* 取消监听:wifi状态发生变化
|
327
|
-
*/
|
328
|
-
export function offWifiStateChange(listener: (params: Privacy) => void): void
|
329
|
-
|
330
|
-
/**
|
331
|
-
* 蓝牙状态发生变化
|
332
|
-
*/
|
333
|
-
export function onBLEStateChange(listener: (params: Privacy) => void): void
|
334
|
-
|
335
|
-
/**
|
336
|
-
* 取消监听:蓝牙状态发生变化
|
337
|
-
*/
|
338
|
-
export function offBLEStateChange(listener: (params: Privacy) => void): void
|
339
|
-
|
340
|
-
/**
|
341
|
-
* 蓝牙权限发生变化
|
342
|
-
*/
|
343
|
-
export function onBlePermissionChange(listener: (params: Privacy) => void): void
|
344
|
-
|
345
|
-
/**
|
346
|
-
* 取消监听:蓝牙权限发生变化
|
347
|
-
*/
|
348
|
-
export function offBlePermissionChange(listener: (params: Privacy) => void): void
|
349
|
-
|
350
|
-
/**
|
351
|
-
* 本地网络权限发生变化
|
352
|
-
*/
|
353
|
-
export function onlocalNetWorkPermissionChange(listener: (params: Privacy) => void): void
|
354
|
-
|
355
|
-
/**
|
356
|
-
* 取消监听:本地网络权限发生变化
|
357
|
-
*/
|
358
|
-
export function offlocalNetWorkPermissionChange(listener: (params: Privacy) => void): void
|
359
|
-
|
360
|
-
export type ScanDevicePacket = {
|
361
|
-
/** id */
|
362
|
-
id: string
|
363
|
-
/** name */
|
364
|
-
name: string
|
365
|
-
/** providerName */
|
366
|
-
providerName: string
|
367
|
-
/** data */
|
368
|
-
data: string
|
369
|
-
/** configType */
|
370
|
-
configType: string
|
371
|
-
/** productId */
|
372
|
-
productId: string
|
373
|
-
/** uuid */
|
374
|
-
uuid: string
|
375
|
-
/** mac */
|
376
|
-
mac: string
|
377
|
-
/** address */
|
378
|
-
address: string
|
379
|
-
/** deviceType */
|
380
|
-
deviceType: number
|
381
|
-
/** isbind */
|
382
|
-
isbind: boolean
|
383
|
-
/** flag */
|
384
|
-
flag: number
|
385
|
-
/** isShare */
|
386
|
-
isShare: boolean
|
387
|
-
/** rssi */
|
388
|
-
rssi: number
|
389
|
-
}
|
390
|
-
|
391
|
-
export type WiFiInfo = {
|
392
|
-
/** ssid */
|
393
|
-
ssid: string
|
394
|
-
/** 强度 */
|
395
|
-
rssi: number
|
396
|
-
/** sec */
|
397
|
-
sec: number
|
398
|
-
}
|
399
|
-
|
400
|
-
export type ApActivatorParam = {
|
401
|
-
/** ssid */
|
402
|
-
ssid: string
|
403
|
-
/** pwd */
|
404
|
-
pwd: string
|
405
|
-
/** token */
|
406
|
-
token: string
|
407
|
-
/** 配网超时时间 */
|
408
|
-
timeout: number
|
409
|
-
/** 是否为密码错误恢复配网 */
|
410
|
-
isRecovery: boolean
|
411
|
-
/**
|
412
|
-
* securityConfig
|
413
|
-
* use getDeviceSecurityConfigs() method to get
|
414
|
-
*/
|
415
|
-
securityConfig: string
|
416
|
-
}
|
417
|
-
|
418
|
-
export type BleWifiActivatorParam = {
|
419
|
-
/** uuid */
|
420
|
-
uuid: string
|
421
|
-
/** ssid */
|
422
|
-
ssid: string
|
423
|
-
/** pwd */
|
424
|
-
pwd: string
|
425
|
-
/** token */
|
426
|
-
token: string
|
427
|
-
/** timeout */
|
428
|
-
timeout: number
|
429
|
-
/** 是否为密码错误恢复配网 */
|
430
|
-
isRecovery: boolean
|
431
|
-
/**
|
432
|
-
* the phase 1 timeout value, in milliseconds. Default 60000
|
433
|
-
* Note
|
434
|
-
* <p>
|
435
|
-
* For devices with WiFi and Bluetooth capabilities, use WiFi to activate in the first stage, if it fails, use Bluetooth to activate.
|
436
|
-
*/
|
437
|
-
phase1Timeout: number
|
438
|
-
}
|
439
|
-
|
440
|
-
export type Privacy = {
|
441
|
-
/** enable */
|
442
|
-
enable: boolean
|
443
|
-
}
|
444
|
-
}
|
File without changes
|