@ray-js/api 0.5.10 → 0.5.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. package/@types/BaseKit.d.ts +1009 -89
  2. package/@types/{TYKit.d.ts → BizKit.d.ts} +104 -41
  3. package/@types/DeviceKit.d.ts +1512 -176
  4. package/@types/MiniKit.d.ts +381 -26
  5. package/@types/all-kits.d.ts +1 -1
  6. package/lib/{BaseKit-2.3.11.d.ts → BaseKit-3.0.0.d.ts} +18 -2
  7. package/lib/{BaseKit-2.3.11.js → BaseKit-3.0.0.js} +18 -2
  8. package/lib/{TYKit-2.2.6.d.ts → BizKit-3.0.1.d.ts} +2 -1
  9. package/lib/{TYKit-2.2.6.js → BizKit-3.0.1.js} +2 -1
  10. package/lib/{DeviceKit-2.3.3.d.ts → DeviceKit-3.0.0.d.ts} +58 -18
  11. package/lib/{DeviceKit-2.3.3.js → DeviceKit-3.0.0.js} +140 -20
  12. package/lib/{MiniKit-2.4.3.d.ts → MiniKit-3.0.0.d.ts} +14 -0
  13. package/lib/{MiniKit-2.4.3.js → MiniKit-3.0.0.js} +14 -0
  14. package/lib/all-kits.d.ts +5 -5
  15. package/lib/all-kits.js +5 -5
  16. package/lib/getApp/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  17. package/lib/getApp/{index.tuya.js → index.thing.js} +0 -0
  18. package/lib/getBoundingClientRect/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  19. package/lib/getBoundingClientRect/{index.tuya.js → index.thing.js} +0 -0
  20. package/lib/getCurrentPages/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  21. package/lib/getCurrentPages/{index.tuya.js → index.thing.js} +0 -0
  22. package/lib/getElementById/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  23. package/lib/getElementById/{index.tuya.js → index.thing.js} +0 -0
  24. package/lib/getI18nInfo/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  25. package/lib/getI18nInfo/{index.tuya.js → index.thing.js} +0 -0
  26. package/lib/hideTabBar/index.d.ts +1 -7
  27. package/lib/hideTabBar/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  28. package/lib/hideTabBar/{index.tuya.js → index.thing.js} +0 -0
  29. package/lib/navigateBack/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  30. package/lib/navigateBack/{index.tuya.js → index.thing.js} +0 -0
  31. package/lib/navigateTo/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  32. package/lib/navigateTo/{index.tuya.js → index.thing.js} +0 -0
  33. package/lib/reLaunch/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  34. package/lib/reLaunch/{index.tuya.js → index.thing.js} +0 -0
  35. package/lib/readFileSync/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  36. package/lib/readFileSync/{index.tuya.js → index.thing.js} +0 -0
  37. package/lib/redirectTo/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  38. package/lib/redirectTo/{index.tuya.js → index.thing.js} +0 -0
  39. package/lib/requestCloud/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  40. package/lib/requestCloud/{index.tuya.js → index.thing.js} +0 -0
  41. package/lib/setNavigationBarColor/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  42. package/lib/setNavigationBarColor/{index.tuya.js → index.thing.js} +0 -0
  43. package/lib/setNavigationBarTitle/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  44. package/lib/setNavigationBarTitle/{index.tuya.js → index.thing.js} +0 -0
  45. package/lib/showTabBar/index.d.ts +1 -7
  46. package/lib/showTabBar/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  47. package/lib/showTabBar/{index.tuya.js → index.thing.js} +0 -0
  48. package/lib/switchTab/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  49. package/lib/switchTab/{index.tuya.js → index.thing.js} +0 -0
  50. package/package.json +5 -9
@@ -1,9 +1,194 @@
1
1
  /**
2
2
  * DeviceKit
3
3
  *
4
- * @version 2.3.3
4
+ * @version 3.0.0
5
5
  */
6
6
  declare namespace ty.device {
7
+ /**
8
+ * 注册监听远离beacon设备范围事件
9
+ */
10
+ export function unregisterLeaveBeaconFenceEvent(params: {
11
+ /** 设备模型 设备id */
12
+ deviceId: string
13
+ complete?: () => void
14
+ success?: (params: null) => void
15
+ fail?: (params: {
16
+ errorMsg: string
17
+ errorCode: string | number
18
+ innerError: {
19
+ errorCode: string | number
20
+ errorMsg: string
21
+ }
22
+ }) => void
23
+ }): void
24
+
25
+ /**
26
+ * 注册监听远离beacon设备范围事件
27
+ */
28
+ export function registerLeaveBeaconFenceEvent(params: {
29
+ /** 设备模型 设备id */
30
+ deviceId: string
31
+ complete?: () => void
32
+ success?: (params: null) => void
33
+ fail?: (params: {
34
+ errorMsg: string
35
+ errorCode: string | number
36
+ innerError: {
37
+ errorCode: string | number
38
+ errorMsg: string
39
+ }
40
+ }) => void
41
+ }): void
42
+
43
+ /**
44
+ * 写入BeaconFence配置
45
+ */
46
+ export function writeBeaconFenceConfig(params: {
47
+ /** 设备模型 设备id */
48
+ deviceId: string
49
+ /** 最小信号强度 */
50
+ beaconFenceRssi: number
51
+ /** 设置是否打开进入范围强度区间发送dp功能 */
52
+ isOpenEventWhenApproachingBeaconFence: boolean
53
+ /** 设置是否打开离开范围强度区间发送dp功能 */
54
+ isOpenEventWhenLeaveBeaconFence: boolean
55
+ /** 设置是否打开离开范围强度区间发送本地通知 */
56
+ isOpenNotifyWhenLeaveBeaconFence: boolean
57
+ complete?: () => void
58
+ success?: (params: null) => void
59
+ fail?: (params: {
60
+ errorMsg: string
61
+ errorCode: string | number
62
+ innerError: {
63
+ errorCode: string | number
64
+ errorMsg: string
65
+ }
66
+ }) => void
67
+ }): void
68
+
69
+ /**
70
+ * 读取beaconFence配置
71
+ */
72
+ export function readBeaconFenceConfig(params: {
73
+ /**
74
+ * 设备模型
75
+ * deviceId 设备Id
76
+ */
77
+ deviceId: string
78
+ complete?: () => void
79
+ success?: (params: {
80
+ /** 设备模型 设备id */
81
+ deviceId: string
82
+ /** 最小信号强度 */
83
+ beaconFenceRssi: number
84
+ /** 设置是否打开进入范围强度区间发送dp功能 */
85
+ isOpenEventWhenApproachingBeaconFence: boolean
86
+ /** 设置是否打开离开范围强度区间发送dp功能 */
87
+ isOpenEventWhenLeaveBeaconFence: boolean
88
+ /** 设置是否打开离开范围强度区间发送本地通知 */
89
+ isOpenNotifyWhenLeaveBeaconFence: boolean
90
+ }) => void
91
+ fail?: (params: {
92
+ errorMsg: string
93
+ errorCode: string | number
94
+ innerError: {
95
+ errorCode: string | number
96
+ errorMsg: string
97
+ }
98
+ }) => void
99
+ }): void
100
+
101
+ /**
102
+ * 移除BT配对 (仅Android端实现)
103
+ */
104
+ export function disconnectBTBond(params: {
105
+ /** 设备的mac地址 */
106
+ mac: string
107
+ complete?: () => void
108
+ success?: (params: null) => void
109
+ fail?: (params: {
110
+ errorMsg: string
111
+ errorCode: string | number
112
+ innerError: {
113
+ errorCode: string | number
114
+ errorMsg: string
115
+ }
116
+ }) => void
117
+ }): void
118
+
119
+ /**
120
+ * 打开BT配对窗口 (仅Android端实现)
121
+ */
122
+ export function connectBTBond(params: {
123
+ /** 设备的mac地址 */
124
+ mac: string
125
+ complete?: () => void
126
+ success?: (params: null) => void
127
+ fail?: (params: {
128
+ errorMsg: string
129
+ errorCode: string | number
130
+ innerError: {
131
+ errorCode: string | number
132
+ errorMsg: string
133
+ }
134
+ }) => void
135
+ }): void
136
+
137
+ /**
138
+ * 取消文件传输到蓝牙设备 仅IOS支持
139
+ */
140
+ export function cancelBLEFileTransfer(params: {
141
+ /** 设备模型 设备id */
142
+ deviceId: string
143
+ /** 文件id */
144
+ fileId: number
145
+ /** 文件标识符 */
146
+ fileIdentifier: string
147
+ /** 文件版本 */
148
+ fileVersion: number
149
+ /** 文件地址 */
150
+ filePath: string
151
+ complete?: () => void
152
+ success?: (params: null) => void
153
+ fail?: (params: {
154
+ errorMsg: string
155
+ errorCode: string | number
156
+ innerError: {
157
+ errorCode: string | number
158
+ errorMsg: string
159
+ }
160
+ }) => void
161
+ }): void
162
+
163
+ /**
164
+ * 传输文件到蓝牙设备
165
+ */
166
+ export function postBLEFileTransfer(params: {
167
+ /** 设备模型 设备id */
168
+ deviceId: string
169
+ /** 文件id */
170
+ fileId: number
171
+ /** 文件标识符 */
172
+ fileIdentifier: string
173
+ /** 文件版本 */
174
+ fileVersion: number
175
+ /** 文件地址 */
176
+ filePath: string
177
+ complete?: () => void
178
+ success?: (params: {
179
+ /** true/false 传输成功/传输失败 */
180
+ result: boolean
181
+ }) => void
182
+ fail?: (params: {
183
+ errorMsg: string
184
+ errorCode: string | number
185
+ innerError: {
186
+ errorCode: string | number
187
+ errorMsg: string
188
+ }
189
+ }) => void
190
+ }): void
191
+
7
192
  /**
8
193
  * 获取BLE外设的信号
9
194
  */
@@ -32,9 +217,9 @@ declare namespace ty.device {
32
217
  }): void
33
218
 
34
219
  /**
35
- * 开始监听BLE(tuya)连接状态
220
+ * 开始监听BLE(thing)连接状态
36
221
  */
37
- export function subscribeTYBLEConnectStatus(params: {
222
+ export function subscribeBLEConnectStatus(params: {
38
223
  /**
39
224
  * 设备模型
40
225
  * deviceId 设备Id
@@ -53,9 +238,9 @@ declare namespace ty.device {
53
238
  }): void
54
239
 
55
240
  /**
56
- * 停止监听BLE(tuya)连接状态
241
+ * 停止监听BLE(thing)连接状态
57
242
  */
58
- export function unsubscribeTYBLEConnectStatus(params: {
243
+ export function unsubscribeBLEConnectStatus(params: {
59
244
  /**
60
245
  * 设备模型
61
246
  * deviceId 设备Id
@@ -74,9 +259,9 @@ declare namespace ty.device {
74
259
  }): void
75
260
 
76
261
  /**
77
- * 连接BLE(tuya)设备,【Android特有:与directConnectBLEDevice方法的区别在于,该方法会先进行扫描的动作,扫描到设备之后才会进行连接。】
262
+ * 连接BLE(thing)设备,【Android特有:与directConnectBLEDevice方法的区别在于,该方法会先进行扫描的动作,扫描到设备之后才会进行连接。】
78
263
  */
79
- export function connectTYBLEDevice(params: {
264
+ export function connectBLEDevice(params: {
80
265
  /**
81
266
  * 设备模型
82
267
  * deviceId 设备Id
@@ -95,7 +280,7 @@ declare namespace ty.device {
95
280
  }): void
96
281
 
97
282
  /**
98
- * 直连BLE(tuya)设备,【Android特有:与connectTYBLEDevice方法的区别在于,该方法在连接设备时并不会进行扫描的动作。换言之,需要先扫描到设备之后,方可调用该方法进行连接】
283
+ * 直连BLE(thing)设备,【Android特有:与connectBLEDevice方法的区别在于,该方法在连接设备时并不会进行扫描的动作。换言之,需要先扫描到设备之后,方可调用该方法进行连接】
99
284
  */
100
285
  export function directConnectBLEDevice(params: {
101
286
  /**
@@ -116,9 +301,9 @@ declare namespace ty.device {
116
301
  }): void
117
302
 
118
303
  /**
119
- * 断开BLE(tuya)设备
304
+ * 断开BLE(thing)设备
120
305
  */
121
- export function disconnectTYBLEDevice(params: {
306
+ export function disconnectBLEDevice(params: {
122
307
  /**
123
308
  * 设备模型
124
309
  * deviceId 设备Id
@@ -137,9 +322,9 @@ declare namespace ty.device {
137
322
  }): void
138
323
 
139
324
  /**
140
- * 查询BLE(tuya)本地在线状态
325
+ * 查询BLE(thing)本地在线状态
141
326
  */
142
- export function getTYBLEOnlineState(params: {
327
+ export function getBLEOnlineState(params: {
143
328
  /**
144
329
  * 设备模型
145
330
  * deviceId 设备Id
@@ -164,9 +349,9 @@ declare namespace ty.device {
164
349
  }): void
165
350
 
166
351
  /**
167
- * 开始监听BLE(tuya)设备数据透传通道上报
352
+ * 开始监听BLE(thing)设备数据透传通道上报
168
353
  */
169
- export function subscribeTYBLETransparentDataReport(params: {
354
+ export function subscribeBLETransparentDataReport(params: {
170
355
  /**
171
356
  * 设备模型
172
357
  * deviceId 设备Id
@@ -185,9 +370,9 @@ declare namespace ty.device {
185
370
  }): void
186
371
 
187
372
  /**
188
- * 停止监听BLE(tuya)设备数据透传通道上报
373
+ * 停止监听BLE(thing)设备数据透传通道上报
189
374
  */
190
- export function unsubscribeTYBLETransparentDataReport(params: {
375
+ export function unsubscribeBLETransparentDataReport(params: {
191
376
  /**
192
377
  * 设备模型
193
378
  * deviceId 设备Id
@@ -206,9 +391,9 @@ declare namespace ty.device {
206
391
  }): void
207
392
 
208
393
  /**
209
- * BLE(tuya)下发透传数据
394
+ * BLE(thing)下发透传数据
210
395
  */
211
- export function publishTYBLETransparentData(params: {
396
+ export function publishBLETransparentData(params: {
212
397
  /**
213
398
  * 蓝牙透传数据
214
399
  * deviceId: 设备 id
@@ -230,7 +415,7 @@ declare namespace ty.device {
230
415
 
231
416
  /**
232
417
  * 获取加密过的设备 localKey
233
- *BLE(tuya)蓝牙大数据通道传输过程中需要用到的特殊加密操作
418
+ *BLE(thing)蓝牙大数据通道传输过程中需要用到的特殊加密操作
234
419
  */
235
420
  export function getEncryptLocalKeyWithData(params: {
236
421
  /**
@@ -255,7 +440,7 @@ declare namespace ty.device {
255
440
  /**
256
441
  * 大数据通道操作,支持进度反馈
257
442
  */
258
- export function postTYBLEBigDataChannelWithProgress(params: {
443
+ export function postBLEBigDataChannelWithProgress(params: {
259
444
  /** deviceId 设备 id */
260
445
  deviceId: string
261
446
  /**
@@ -416,7 +601,7 @@ declare namespace ty.device {
416
601
  * MESH -> "MESH"
417
602
  * SIG_MESH -> "SIG_MESH"
418
603
  * NORMAL -> "NORMAL"
419
- * TY_BEACON -> "TY_BEACON"
604
+ * Thing_BEACON -> "Thing_BEACON"
420
605
  */
421
606
  scanType: string
422
607
  complete?: () => void
@@ -432,7 +617,7 @@ declare namespace ty.device {
432
617
  }): void
433
618
 
434
619
  /**
435
- * iOS单端插件方法。调用 connectTYBLEDevice 连接蓝牙设备前需要先调用该方法开启扫描。
620
+ * iOS单端插件方法。调用 connectBLEDevice 连接蓝牙设备前需要先调用该方法开启扫描。
436
621
  *开启扫描
437
622
  */
438
623
  export function startBLEScan(params?: {
@@ -449,7 +634,7 @@ declare namespace ty.device {
449
634
  }): void
450
635
 
451
636
  /**
452
- * iOS单端插件方法。调用 connectTYBLEDevice 连接蓝牙设备前需要先调用该方法开启扫描。
637
+ * iOS单端插件方法。调用 connectBLEDevice 连接蓝牙设备前需要先调用该方法开启扫描。
453
638
  *开启扫描
454
639
  */
455
640
  export function startBLEScanSync(): null
@@ -710,6 +895,74 @@ declare namespace ty.device {
710
895
  }) => void
711
896
  }): void
712
897
 
898
+ /**
899
+ * 连云激活-WiFi的激活状态
900
+ */
901
+ export function getDeviceWifiActivatorStatus(params: {
902
+ /**
903
+ * 设备模型
904
+ * deviceId 设备Id
905
+ */
906
+ deviceId: string
907
+ complete?: () => void
908
+ success?: (params: {
909
+ /** 设备是否WiFi激活 */
910
+ wifiActivator: boolean
911
+ }) => void
912
+ fail?: (params: {
913
+ errorMsg: string
914
+ errorCode: string | number
915
+ innerError: {
916
+ errorCode: string | number
917
+ errorMsg: string
918
+ }
919
+ }) => void
920
+ }): void
921
+
922
+ /**
923
+ * 连云激活-进行wifi激活
924
+ */
925
+ export function startDeviceWifiActivator(params: {
926
+ /**
927
+ * 设备模型
928
+ * deviceId 设备Id
929
+ */
930
+ deviceId: string
931
+ complete?: () => void
932
+ success?: (params: {
933
+ /** 设备是否WiFi激活 */
934
+ wifiActivator: boolean
935
+ }) => void
936
+ fail?: (params: {
937
+ errorMsg: string
938
+ errorCode: string | number
939
+ innerError: {
940
+ errorCode: string | number
941
+ errorMsg: string
942
+ }
943
+ }) => void
944
+ }): void
945
+
946
+ /**
947
+ * 修改设备名称
948
+ */
949
+ export function renameDeviceName(params: {
950
+ /** deviceId 设备id */
951
+ deviceId: string
952
+ /** name 设备名称 */
953
+ name: string
954
+ complete?: () => void
955
+ success?: (params: null) => void
956
+ fail?: (params: {
957
+ errorMsg: string
958
+ errorCode: string | number
959
+ innerError: {
960
+ errorCode: string | number
961
+ errorMsg: string
962
+ }
963
+ }) => void
964
+ }): void
965
+
713
966
  /**
714
967
  * 重置设备并恢复出厂设置。
715
968
  *设备数据会被清除并进入待配网状态。
@@ -917,7 +1170,7 @@ declare namespace ty.device {
917
1170
  devAttribute: number
918
1171
  /**
919
1172
  * pcc
920
- * 涂鸦自研蓝牙 mesh 产品的分类标识
1173
+ * Thing自研蓝牙 mesh 产品的分类标识
921
1174
  */
922
1175
  pcc: string
923
1176
  /**
@@ -952,7 +1205,7 @@ declare namespace ty.device {
952
1205
  bizAttribute: number
953
1206
  /**
954
1207
  * meshId
955
- * 涂鸦自研的蓝牙 mesh id
1208
+ * Thing自研的蓝牙 mesh id
956
1209
  */
957
1210
  meshId: string
958
1211
  /**
@@ -970,6 +1223,8 @@ declare namespace ty.device {
970
1223
  * 本地局域网是否在线
971
1224
  */
972
1225
  isLocalOnline: boolean
1226
+ /** 设备云端在线情况 */
1227
+ isCloudOnline: boolean
973
1228
  /**
974
1229
  * isOnline
975
1230
  * 设备总的在线情况,只要一个情况在线,就是在线,复合在线情况
@@ -987,8 +1242,20 @@ declare namespace ty.device {
987
1242
  * 标准功能集 code
988
1243
  */
989
1244
  dpCodes: Record<string, {}>
990
- /** 原始 json,业务来不及拓展更新的时候,可以根据这个来获取处理 */
991
- originJson: Record<string, {}>
1245
+ /** 时区信息 */
1246
+ devTimezoneId: string
1247
+ /** 设备的功能点执行的时间 */
1248
+ dpsTime: Record<string, {}>
1249
+ /** 设备纬度 */
1250
+ latitude: string
1251
+ /** 设备经度 */
1252
+ longitude: string
1253
+ /** 设备ip地址 */
1254
+ ip: string
1255
+ /** 是否为虚拟设备 */
1256
+ isVirtualDevice: boolean
1257
+ /** zigbeeInstallCode to the cloud to mark the gateway with installation code ability */
1258
+ isZigbeeInstallCode: boolean
992
1259
  }) => void
993
1260
  fail?: (params: {
994
1261
  errorMsg: string
@@ -1008,8 +1275,6 @@ declare namespace ty.device {
1008
1275
  productId: string
1009
1276
  complete?: () => void
1010
1277
  success?: (params: {
1011
- /** 产品原始 json 信息 */
1012
- originJson: Record<string, {}>
1013
1278
  /** 面板配置项,可以在平台进行配置 */
1014
1279
  panelConfig: Record<string, {}>
1015
1280
  /** 产品功能定义集合 */
@@ -1049,12 +1314,12 @@ declare namespace ty.device {
1049
1314
  standard: boolean
1050
1315
  /**
1051
1316
  * pcc
1052
- * 涂鸦自研蓝牙 mesh 产品的分类标识
1317
+ * Thing自研蓝牙 mesh 产品的分类标识
1053
1318
  */
1054
1319
  pcc: string
1055
1320
  /**
1056
1321
  * vendorInfo
1057
- * 涂鸦自研蓝牙 mesh 产品的分类标识,融合类使用
1322
+ * Thing自研蓝牙 mesh 产品的分类标识,融合类使用
1058
1323
  */
1059
1324
  vendorInfo: string
1060
1325
  /**
@@ -1214,7 +1479,7 @@ declare namespace ty.device {
1214
1479
  * HTTP = 2, // Http
1215
1480
  * BLE = 3, // Single Point Bluetooth
1216
1481
  * SIGMesh = 4, // Sig Mesh
1217
- * BLEMesh = 5, // Tuya Private Mesh
1482
+ * BLEMesh = 5, // Thing Private Mesh
1218
1483
  * BLEBeacon = 6, // Beacon
1219
1484
  */
1220
1485
  pipelines: number[]
@@ -1254,7 +1519,7 @@ declare namespace ty.device {
1254
1519
  * HTTP = 2, // Http
1255
1520
  * BLE = 3, // Single Point Bluetooth
1256
1521
  * SIGMesh = 4, // Sig Mesh
1257
- * BLEMesh = 5, // Tuya Private Mesh
1522
+ * BLEMesh = 5, // Thing Private Mesh
1258
1523
  * BLEBeacon = 6, // Beacon
1259
1524
  */
1260
1525
  pipelines: number[]
@@ -1294,7 +1559,7 @@ declare namespace ty.device {
1294
1559
  * HTTP = 2, // Http
1295
1560
  * BLE = 3, // Single Point Bluetooth
1296
1561
  * SIGMesh = 4, // Sig Mesh
1297
- * BLEMesh = 5, // Tuya Private Mesh
1562
+ * BLEMesh = 5, // Thing Private Mesh
1298
1563
  * BLEBeacon = 6, // Beacon
1299
1564
  */
1300
1565
  pipelines: number[]
@@ -1476,7 +1741,7 @@ declare namespace ty.device {
1476
1741
  }): void
1477
1742
 
1478
1743
  /**
1479
- * 订阅设备移除事件
1744
+ * 订阅设备移除事件 (430版本之后,请用registerDeviceListListener接口替换)
1480
1745
  */
1481
1746
  export function subscribeDeviceRemoved(params: {
1482
1747
  /** 设备id */
@@ -1494,7 +1759,7 @@ declare namespace ty.device {
1494
1759
  }): void
1495
1760
 
1496
1761
  /**
1497
- * 取消订阅设备移除事件
1762
+ * 取消订阅设备移除事件 (430版本之后,请用unregisterDeviceListListener接口替换)
1498
1763
  */
1499
1764
  export function unSubscribeDeviceRemoved(params: {
1500
1765
  /** 设备id */
@@ -1629,6 +1894,63 @@ declare namespace ty.device {
1629
1894
  }) => void
1630
1895
  }): void
1631
1896
 
1897
+ /**
1898
+ * 注册需要监听的topci列表 [仅m/m/i topic 订阅]
1899
+ */
1900
+ export function registerTopicListListener(params: {
1901
+ /** 需监听的topic列表 */
1902
+ topicList: string[]
1903
+ complete?: () => void
1904
+ success?: (params: null) => void
1905
+ fail?: (params: {
1906
+ errorMsg: string
1907
+ errorCode: string | number
1908
+ innerError: {
1909
+ errorCode: string | number
1910
+ errorMsg: string
1911
+ }
1912
+ }) => void
1913
+ }): void
1914
+
1915
+ /**
1916
+ * 注销需要监听的topic列表
1917
+ */
1918
+ export function unregisterTopicListListener(params?: {
1919
+ complete?: () => void
1920
+ success?: (params: null) => void
1921
+ fail?: (params: {
1922
+ errorMsg: string
1923
+ errorCode: string | number
1924
+ innerError: {
1925
+ errorCode: string | number
1926
+ errorMsg: string
1927
+ }
1928
+ }) => void
1929
+ }): void
1930
+
1931
+ /**
1932
+ * 获取mqtt连接状态 回调返回当前连接情况
1933
+ */
1934
+ export function getMqttConnectState(params?: {
1935
+ complete?: () => void
1936
+ success?: (params: {
1937
+ /**
1938
+ * mqtt连接状态
1939
+ * 0 连接失败
1940
+ * 1 连接成功
1941
+ */
1942
+ connectState: number
1943
+ }) => void
1944
+ fail?: (params: {
1945
+ errorMsg: string
1946
+ errorCode: string | number
1947
+ innerError: {
1948
+ errorCode: string | number
1949
+ errorMsg: string
1950
+ }
1951
+ }) => void
1952
+ }): void
1953
+
1632
1954
  /**
1633
1955
  * 检查固件升级信息
1634
1956
  */
@@ -2285,39 +2607,502 @@ declare namespace ty.device {
2285
2607
  }): void
2286
2608
 
2287
2609
  /**
2288
- * 获取 group 信息
2610
+ * 打开推荐场景详情页面
2611
+ *详细文档链接:https://wiki.tuya-inc.com:7799/page/1456192108871295013
2289
2612
  */
2290
- export function getGroupInfo(params: {
2291
- /** 群组id */
2292
- groupId: string
2613
+ export function openRecommendSceneDetail(params: {
2614
+ /** 来源 */
2615
+ source: string
2616
+ /** 场景模型 */
2617
+ sceneModel: Record<string, {}>
2293
2618
  complete?: () => void
2294
2619
  success?: (params: {
2620
+ /** 返回状态,默认返回 true */
2621
+ status?: boolean
2622
+ /** 成功返回的类型。0-未操作,1-保存成功,2-点击不感兴趣 */
2623
+ type: number
2624
+ /** 返回的场景数据,可能为空 */
2625
+ data?: Record<string, {}>
2626
+ }) => void
2627
+ fail?: (params: {
2628
+ errorMsg: string
2629
+ errorCode: string | number
2630
+ innerError: {
2631
+ errorCode: string | number
2632
+ errorMsg: string
2633
+ }
2634
+ }) => void
2635
+ }): void
2636
+
2637
+ /**
2638
+ * 跳转一键执行和自动化页面
2639
+ */
2640
+ export function openDeviceExecutionAndAnutomation(params: {
2641
+ /**
2642
+ * deviceId
2643
+ * 设备 id
2644
+ */
2645
+ deviceId: string
2646
+ /** 页面标题,Android 需要 */
2647
+ title?: string
2648
+ complete?: () => void
2649
+ success?: (params: null) => void
2650
+ fail?: (params: {
2651
+ errorMsg: string
2652
+ errorCode: string | number
2653
+ innerError: {
2654
+ errorCode: string | number
2655
+ errorMsg: string
2656
+ }
2657
+ }) => void
2658
+ }): void
2659
+
2660
+ /**
2661
+ * 保存场景动作数据
2662
+ */
2663
+ export function saveSceneAction(params: {
2664
+ /** 设备id */
2665
+ deviceId: string
2666
+ /** 动作的索引位置 */
2667
+ taskPosition: number
2668
+ /** 动作执行器 */
2669
+ actionExecutor?: string
2670
+ /** 动作执行信息 */
2671
+ executorProperty: Record<string, {}>
2672
+ /** 动作额外信息 */
2673
+ extraProperty: Record<string, {}>
2674
+ /** 动作展示信息 */
2675
+ actionDisplayNew: Record<string, {}>
2676
+ complete?: () => void
2677
+ success?: (params: null) => void
2678
+ fail?: (params: {
2679
+ errorMsg: string
2680
+ errorCode: string | number
2681
+ innerError: {
2682
+ errorCode: string | number
2683
+ errorMsg: string
2684
+ }
2685
+ }) => void
2686
+ }): void
2687
+
2688
+ /**
2689
+ * 创建自动化动作
2690
+ */
2691
+ export function createAction(params: {
2692
+ /**
2693
+ * 动作类型:device,smart,remind,delay
2694
+ * device:设备
2695
+ * smart:操作某个智能(执行智能、开关自动化)
2696
+ * remind:提醒
2697
+ * delay:延时
2698
+ */
2699
+ createType: string
2700
+ /**
2701
+ * 智能类型:scene,auto
2702
+ * scene:一键执行
2703
+ * auto:自动化
2704
+ */
2705
+ smartType: string
2706
+ /** 当前场景动作列表 */
2707
+ actionArray: SceneAction[]
2708
+ complete?: () => void
2709
+ success?: (params: {
2710
+ /** 动作列表 */
2711
+ actionArray: SceneAction[]
2712
+ }) => void
2713
+ fail?: (params: {
2714
+ errorMsg: string
2715
+ errorCode: string | number
2716
+ innerError: {
2717
+ errorCode: string | number
2718
+ errorMsg: string
2719
+ }
2720
+ }) => void
2721
+ }): void
2722
+
2723
+ /**
2724
+ * 编辑场景动作
2725
+ */
2726
+ export function editAction(params: {
2727
+ /** 当前编辑的actionIndex */
2728
+ editIndex: string
2729
+ /** 智能类型 */
2730
+ smartType: string
2731
+ /** 动作列表 */
2732
+ actionArray: SceneAction[]
2733
+ complete?: () => void
2734
+ success?: (params: {
2735
+ /** 动作列表 */
2736
+ actionArray: SceneAction[]
2737
+ }) => void
2738
+ fail?: (params: {
2739
+ errorMsg: string
2740
+ errorCode: string | number
2741
+ innerError: {
2742
+ errorCode: string | number
2743
+ errorMsg: string
2744
+ }
2745
+ }) => void
2746
+ }): void
2747
+
2748
+ /**
2749
+ * 展示场景的风格弹窗
2750
+ */
2751
+ export function showSceneDialog(params?: {
2752
+ /**
2753
+ * 智能类型:scene,auto
2754
+ * scene:一键执行
2755
+ * auto:自动化
2756
+ */
2757
+ smartType?: string
2758
+ /** 颜色 */
2759
+ color?: string
2760
+ /** 图标 */
2761
+ icon?: string
2762
+ /** 图片 */
2763
+ image?: string
2764
+ complete?: () => void
2765
+ success?: (params: {
2766
+ /** 颜色 */
2767
+ color?: string
2768
+ /** 图标 */
2769
+ icon?: string
2770
+ /** 图片 */
2771
+ image?: string
2772
+ }) => void
2773
+ fail?: (params: {
2774
+ errorMsg: string
2775
+ errorCode: string | number
2776
+ innerError: {
2777
+ errorCode: string | number
2778
+ errorMsg: string
2779
+ }
2780
+ }) => void
2781
+ }): void
2782
+
2783
+ /**
2784
+ * 打开生效时间段页面
2785
+ */
2786
+ export function openPreConditionPage(params?: {
2787
+ /** id */
2788
+ id?: string
2789
+ /** 固定值 timeCheck */
2790
+ condType?: string
2791
+ /** 规则 */
2792
+ expr?: Expr
2793
+ complete?: () => void
2794
+ success?: (params: {
2795
+ /** id */
2796
+ id: string
2797
+ /** 固定值 timeCheck */
2798
+ condType: string
2799
+ /** 规则 */
2800
+ expr: Expr
2801
+ }) => void
2802
+ fail?: (params: {
2803
+ errorMsg: string
2804
+ errorCode: string | number
2805
+ innerError: {
2806
+ errorCode: string | number
2807
+ errorMsg: string
2808
+ }
2809
+ }) => void
2810
+ }): void
2811
+
2812
+ /**
2813
+ * 创建条件
2814
+ */
2815
+ export function createCondition(params: {
2816
+ /** 条件类型 */
2817
+ type: string
2818
+ /** 条件内容 */
2819
+ condition?: string
2820
+ /** 索引 */
2821
+ index?: number
2822
+ complete?: () => void
2823
+ success?: (params: {
2824
+ /** 条件类型 */
2825
+ type?: string
2826
+ /** 条件内容 */
2827
+ condition?: string
2828
+ /** 索引 */
2829
+ index?: number
2830
+ }) => void
2831
+ fail?: (params: {
2832
+ errorMsg: string
2833
+ errorCode: string | number
2834
+ innerError: {
2835
+ errorCode: string | number
2836
+ errorMsg: string
2837
+ }
2838
+ }) => void
2839
+ }): void
2840
+
2841
+ /**
2842
+ * 编辑条件
2843
+ */
2844
+ export function editCondition(params: {
2845
+ /** 条件类型 */
2846
+ type: string
2847
+ /** 条件内容 */
2848
+ condition?: string
2849
+ /** 索引 */
2850
+ index?: number
2851
+ complete?: () => void
2852
+ success?: (params: {
2853
+ /** 条件类型 */
2854
+ type?: string
2855
+ /** 条件内容 */
2856
+ condition?: string
2857
+ /** 索引 */
2858
+ index?: number
2859
+ }) => void
2860
+ fail?: (params: {
2861
+ errorMsg: string
2862
+ errorCode: string | number
2863
+ innerError: {
2864
+ errorCode: string | number
2865
+ errorMsg: string
2866
+ }
2867
+ }) => void
2868
+ }): void
2869
+
2870
+ /**
2871
+ * 获取群组下设备列表
2872
+ */
2873
+ export function getGroupDeviceList(params: {
2874
+ /** 群组id */
2875
+ groupId: string
2876
+ complete?: () => void
2877
+ success?: (params: {
2878
+ /** groupId 群组id */
2879
+ groupId: string
2880
+ /** deviceList 设备列表 */
2881
+ deviceList: DeviceInfo_SLAb2e[]
2882
+ }) => void
2883
+ fail?: (params: {
2884
+ errorMsg: string
2885
+ errorCode: string | number
2886
+ innerError: {
2887
+ errorCode: string | number
2888
+ errorMsg: string
2889
+ }
2890
+ }) => void
2891
+ }): void
2892
+
2893
+ /**
2894
+ * 获取群组下设备数量
2895
+ */
2896
+ export function getGroupDeviceNum(params: {
2897
+ /** 群组id */
2898
+ groupId: string
2899
+ complete?: () => void
2900
+ success?: (params: {
2901
+ /** groupId 群组id */
2902
+ groupId: string
2903
+ /** devieNum 设备数量 */
2904
+ devieNum: number
2905
+ }) => void
2906
+ fail?: (params: {
2907
+ errorMsg: string
2908
+ errorCode: string | number
2909
+ innerError: {
2910
+ errorCode: string | number
2911
+ errorMsg: string
2912
+ }
2913
+ }) => void
2914
+ }): void
2915
+
2916
+ /**
2917
+ * 根据dpCode获取群组下具备此dpCode的设备数量。如果是一个分享的群组,请通过接口获取。
2918
+ */
2919
+ export function getDeviceNumWithDpCode(params: {
2920
+ /** groupId 群组id */
2921
+ groupId: string
2922
+ /** dpCode内容 */
2923
+ dpCode: string
2924
+ complete?: () => void
2925
+ success?: (params: {
2926
+ /** groupId 群组id */
2927
+ groupId: string
2928
+ /** devieNum 设备数量 */
2929
+ devieNum: number
2930
+ }) => void
2931
+ fail?: (params: {
2932
+ errorMsg: string
2933
+ errorCode: string | number
2934
+ innerError: {
2935
+ errorCode: string | number
2936
+ errorMsg: string
2937
+ }
2938
+ }) => void
2939
+ }): void
2940
+
2941
+ /**
2942
+ * 通过dpCode下发控制指令
2943
+ */
2944
+ export function publishGroupDpCodes(params: {
2945
+ /** groupId 群组id */
2946
+ groupId: string
2947
+ /**
2948
+ * dp信息
2949
+ * 示例: dpCodes: {"switch" : true}
2950
+ */
2951
+ dpCodes: Record<string, Object>
2952
+ complete?: () => void
2953
+ success?: (params: null) => void
2954
+ fail?: (params: {
2955
+ errorMsg: string
2956
+ errorCode: string | number
2957
+ innerError: {
2958
+ errorCode: string | number
2959
+ errorMsg: string
2960
+ }
2961
+ }) => void
2962
+ }): void
2963
+
2964
+ /**
2965
+ * mesh群组控制(仅用于单设备面板中的群控,如PIR传感器面板)
2966
+ */
2967
+ export function publishSigMeshMultiDps(params: {
2968
+ /** groupId 群组id */
2969
+ groupId: string
2970
+ /** localId 群组本地标识 */
2971
+ localId: string
2972
+ /**
2973
+ * dp信息
2974
+ * 示例: dps: {"1" : true}
2975
+ */
2976
+ dps: Record<string, {}>
2977
+ /** pcc mesh设备品类 */
2978
+ pcc: string
2979
+ complete?: () => void
2980
+ success?: (params: null) => void
2981
+ fail?: (params: {
2982
+ errorMsg: string
2983
+ errorCode: string | number
2984
+ innerError: {
2985
+ errorCode: string | number
2986
+ errorMsg: string
2987
+ }
2988
+ }) => void
2989
+ }): void
2990
+
2991
+ /**
2992
+ * 跳转本地mesh群组
2993
+ */
2994
+ export function openMeshLocalGroup(params: {
2995
+ /**
2996
+ * 整体说明
2997
+ * 支持2个版本:
2998
+ * 1、本地版本仅支持根据vendorIds进行过滤,为本地逻辑,设备列表APP本地根据meshCategory进行比对过滤,群组结果保存在设备上,云端不参与群组的列表获取与保存。
2999
+ * 2、云端版本支持根据pccs或者codes进行过滤,为云端逻辑,设备列表获取及群组设备关系保存在云端。
3000
+ * 本地版本参数:
3001
+ * {
3002
+ * "localId": "203a",
3003
+ * "vendorIds": "1F10,2F10"
3004
+ * }
3005
+ * 云端版本参数:
3006
+ * 1、pcc过滤,相当于旧版本的vendorIds
3007
+ * {
3008
+ * "localId": "203a",
3009
+ * "type": "0",
3010
+ * "pccs": ["1210"],
3011
+ * "categoryCode": "7001"
3012
+ * }
3013
+ * 2、code过滤,根据二级品类进行过滤,目前云端只支持ykq和gykzq这两种遥控器
3014
+ * {
3015
+ * "localId": "203a",
3016
+ * "type": "1",
3017
+ * "codes": ["xxxx"],
3018
+ * "categoryCode": "7001"
3019
+ * }
3020
+ * 关于categoryCode:categoryCode 并非三级品类,与localId匹配范围为7001-7008;localId 为云端分配,步长为8,因此一个遥控器内部最多支持关联8个群组,localid为初始值依次+1,与之匹配的categoryCode从7001依次+1.
3021
+ * vendorIds 必传 可以为空字符串
3022
+ * devId 遥控器设备id
3023
+ */
3024
+ deviceId: string
3025
+ /** localId 群组本地标识 */
3026
+ localId: string
3027
+ /**
3028
+ * 遥控器群组本地版本,使用功能此参数,云端版本传空字符串
3029
+ * vendorIds 使用meshCategory进行设备列表筛选
3030
+ * 示例:vendorIds: "1F10,2F10"
3031
+ */
3032
+ vendorIds: string
3033
+ /**
3034
+ * 遥控器群组云端版本,使用此功能参数
3035
+ * type 筛选条件 0:pccs过滤,1:codes过滤
3036
+ */
3037
+ type?: string
3038
+ /**
3039
+ * 遥控器群组云端版本,使用此功能参数
3040
+ * pccs 使用meshCategory进行设备列表筛选
3041
+ * 示例:pccs: ["1F10","2F10"]
3042
+ */
3043
+ pccs?: string[]
3044
+ /**
3045
+ * 遥控器群组云端版本,使用此功能参数
3046
+ * codes 使用二级品类进行设备列表筛选
3047
+ * 示例:pccs: ["1F10","2F10"]
3048
+ */
3049
+ codes?: string[]
3050
+ /**
3051
+ * categoryCode 并非三级品类,与localId匹配范围为7001-7008;
3052
+ * localId 为云端分配,步长为8,因此一个遥控器内部最多支持关联8个群组,localid为初始值依次+1,与之匹配的categoryCode从7001依次+1.
3053
+ */
3054
+ categoryCode?: string
3055
+ /**
3056
+ * 是否支持低功耗,部分无线开关需要用到
3057
+ * 默认值:false
3058
+ */
3059
+ isSupportLowPower?: boolean
3060
+ complete?: () => void
3061
+ success?: (params: null) => void
3062
+ fail?: (params: {
3063
+ errorMsg: string
3064
+ errorCode: string | number
3065
+ innerError: {
3066
+ errorCode: string | number
3067
+ errorMsg: string
3068
+ }
3069
+ }) => void
3070
+ }): void
3071
+
3072
+ /**
3073
+ * 获取 group 信息
3074
+ */
3075
+ export function getGroupInfo(params: {
3076
+ /** 群组id */
3077
+ groupId: string
3078
+ complete?: () => void
3079
+ success?: (params: {
3080
+ /**
3081
+ * groupId
3082
+ * The group ID.
3083
+ */
3084
+ groupId: string
3085
+ /**
3086
+ * productId
3087
+ * The product ID.
3088
+ */
3089
+ productId: string
3090
+ /**
3091
+ * name
3092
+ * The name of the group.
3093
+ */
3094
+ name: string
3095
+ /**
3096
+ * time
3097
+ * The time when the group was created.
3098
+ */
3099
+ time: number
3100
+ /**
3101
+ * iconUrl
3102
+ * The URL of the icon.
3103
+ */
3104
+ iconUrl: string
2295
3105
  /**
2296
- * groupId
2297
- * The group ID.
2298
- */
2299
- groupId: string
2300
- /**
2301
- * productId
2302
- * The product ID.
2303
- */
2304
- productId: string
2305
- /**
2306
- * name
2307
- * The name of the group.
2308
- */
2309
- name: string
2310
- /**
2311
- * time
2312
- * The time when the group was created.
2313
- */
2314
- time: number
2315
- /**
2316
- * iconUrl
2317
- * The URL of the icon.
2318
- */
2319
- iconUrl: string
2320
- /**
2321
3106
  * type
2322
3107
  * The type of group.
2323
3108
  * Wifi = 0, Mesh = 1, Zigbee = 2, SIGMesh = 3, Beacon = 4,
@@ -2346,7 +3131,7 @@ declare namespace ty.device {
2346
3131
  /** The custom DP name. */
2347
3132
  dpName: {}
2348
3133
  /** The device list. */
2349
- deviceList: DeviceInfo_mScpag[]
3134
+ deviceList: DeviceInfo_SLAb2e[]
2350
3135
  /** The local short address of groups. */
2351
3136
  localId: string
2352
3137
  /** The subclass. */
@@ -2413,15 +3198,49 @@ declare namespace ty.device {
2413
3198
  }): void
2414
3199
 
2415
3200
  /**
2416
- * 设置群组的属性
3201
+ * 设置群组的属性
3202
+ */
3203
+ export function setGroupProperty(params: {
3204
+ /** 群组id */
3205
+ groupId: string
3206
+ /** code 属性code */
3207
+ code: string
3208
+ /** value */
3209
+ value: string
3210
+ complete?: () => void
3211
+ success?: (params: null) => void
3212
+ fail?: (params: {
3213
+ errorMsg: string
3214
+ errorCode: string | number
3215
+ innerError: {
3216
+ errorCode: string | number
3217
+ errorMsg: string
3218
+ }
3219
+ }) => void
3220
+ }): void
3221
+
3222
+ /**
3223
+ * 开启对群组事件的监听
3224
+ */
3225
+ export function registerGroupChange(params: {
3226
+ /** groupIdList 群组id 列表 */
3227
+ groupIdList: string[]
3228
+ complete?: () => void
3229
+ success?: (params: null) => void
3230
+ fail?: (params: {
3231
+ errorMsg: string
3232
+ errorCode: string | number
3233
+ innerError: {
3234
+ errorCode: string | number
3235
+ errorMsg: string
3236
+ }
3237
+ }) => void
3238
+ }): void
3239
+
3240
+ /**
3241
+ * 关闭对群组事件的监听
2417
3242
  */
2418
- export function setGroupProperty(params: {
2419
- /** 群组id */
2420
- groupId: string
2421
- /** code 属性code */
2422
- code: string
2423
- /** value */
2424
- value: string
3243
+ export function unRegisterGroupChange(params?: {
2425
3244
  complete?: () => void
2426
3245
  success?: (params: null) => void
2427
3246
  fail?: (params: {
@@ -2435,13 +3254,18 @@ declare namespace ty.device {
2435
3254
  }): void
2436
3255
 
2437
3256
  /**
2438
- * 开启对群组事件的监听
3257
+ * 通过nodeId获取子设备的设备Id
2439
3258
  */
2440
- export function registerGroupChange(params: {
2441
- /** groupIdList 群组id 列表 */
2442
- groupIdList: string[]
3259
+ export function getMeshDeviceId(params: {
3260
+ /** nodeId */
3261
+ nodeId: string
3262
+ /** deviceId 网关id */
3263
+ deviceId: string
2443
3264
  complete?: () => void
2444
- success?: (params: null) => void
3265
+ success?: (params: {
3266
+ /** 设备id */
3267
+ deviceId: string
3268
+ }) => void
2445
3269
  fail?: (params: {
2446
3270
  errorMsg: string
2447
3271
  errorCode: string | number
@@ -2453,9 +3277,13 @@ declare namespace ty.device {
2453
3277
  }): void
2454
3278
 
2455
3279
  /**
2456
- * 关闭对群组事件的监听
3280
+ * 获取mesh子子设备的dp数据
2457
3281
  */
2458
- export function unRegisterGroupChange(params?: {
3282
+ export function getDpDataByMesh(params: {
3283
+ /** 设备模型 设备id */
3284
+ deviceId: string
3285
+ /** dpId */
3286
+ dpIds: Object[]
2459
3287
  complete?: () => void
2460
3288
  success?: (params: null) => void
2461
3289
  fail?: (params: {
@@ -2516,26 +3344,6 @@ declare namespace ty.device {
2516
3344
  }) => void
2517
3345
  }): void
2518
3346
 
2519
- /**
2520
- * 打开一个指定的RN面板
2521
- */
2522
- export function pushRNPanel(params: {
2523
- /**
2524
- * RN设备面板属性
2525
- * 设备模型
2526
- * deviceId 设备Id
2527
- */
2528
- deviceId: string
2529
- /**
2530
- * 面板初始化参数
2531
- * initialProps 初始化参数
2532
- */
2533
- initialProps?: Record<string, {}>
2534
- complete?: () => void
2535
- success?: (params: null) => void
2536
- fail?: (params: {}) => void
2537
- }): void
2538
-
2539
3347
  /**
2540
3348
  * 设备是否支持物模型
2541
3349
  */
@@ -2668,56 +3476,80 @@ declare namespace ty.device {
2668
3476
  }): void
2669
3477
 
2670
3478
  /**
2671
- * BLE(tuya)连接状态变更通知事件
3479
+ * 远离beacon设备的事件
3480
+ */
3481
+ export function onLeaveBeaconFence(listener: (params: LeaveBeaconFenceEvent) => void): void
3482
+
3483
+ /**
3484
+ * 取消监听:远离beacon设备的事件
2672
3485
  */
2673
- export function onTYBLEConnectStatusChange(
2674
- listener: (params: TYBLEConnectStatusEvent) => void
3486
+ export function offLeaveBeaconFence(listener: (params: LeaveBeaconFenceEvent) => void): void
3487
+
3488
+ /**
3489
+ * 传输文件的到蓝牙设备的进度事件
3490
+ */
3491
+ export function onFileTransferProgress(
3492
+ listener: (params: FileTransferProgressResult) => void
2675
3493
  ): void
2676
3494
 
2677
3495
  /**
2678
- * BLE(tuya)连接状态变更通知事件
3496
+ * 取消监听:传输文件的到蓝牙设备的进度事件
2679
3497
  */
2680
- export function offTYBLEConnectStatusChange(
2681
- listener: (params: TYBLEConnectStatusEvent) => void
3498
+ export function offFileTransferProgress(
3499
+ listener: (params: FileTransferProgressResult) => void
2682
3500
  ): void
2683
3501
 
2684
3502
  /**
2685
- * BLE(tuya)设备数据透传通道上报通知
3503
+ * BLE(thing)连接状态变更通知事件
2686
3504
  */
2687
- export function onTYBLETransparentDataReport(
2688
- listener: (params: TYBLETransparentDataBean) => void
3505
+ export function onBLEConnectStatusChange(
3506
+ listener: (params: ThingBLEConnectStatusEvent) => void
2689
3507
  ): void
2690
3508
 
2691
3509
  /**
2692
- * BLE(tuya)设备数据透传通道上报通知
3510
+ * 取消监听:BLE(thing)连接状态变更通知事件
2693
3511
  */
2694
- export function offTYBLETransparentDataReport(
2695
- listener: (params: TYBLETransparentDataBean) => void
3512
+ export function offBLEConnectStatusChange(
3513
+ listener: (params: ThingBLEConnectStatusEvent) => void
2696
3514
  ): void
2697
3515
 
2698
3516
  /**
2699
- * BLE(tuya)大数据通道传输进度
3517
+ * BLE(thing)设备数据透传通道上报通知
2700
3518
  */
2701
- export function onTYBLEBigDataChannelProgressEvent(
2702
- listener: (params: TYBLEBigDataProgressEvent) => void
3519
+ export function onBLETransparentDataReport(
3520
+ listener: (params: ThingBLETransparentDataBean) => void
2703
3521
  ): void
2704
3522
 
2705
3523
  /**
2706
- * BLE(tuya)大数据通道传输进度
3524
+ * 取消监听:BLE(thing)设备数据透传通道上报通知
2707
3525
  */
2708
- export function offTYBLEBigDataChannelProgressEvent(
2709
- listener: (params: TYBLEBigDataProgressEvent) => void
3526
+ export function offBLETransparentDataReport(
3527
+ listener: (params: ThingBLETransparentDataBean) => void
2710
3528
  ): void
2711
3529
 
2712
3530
  /**
2713
- * 扫描到设备后进行通知
3531
+ * BLE(thing)大数据通道传输进度
3532
+ */
3533
+ export function onBLEBigDataChannelProgressEvent(
3534
+ listener: (params: ThingBLEBigDataProgressEvent) => void
3535
+ ): void
3536
+
3537
+ /**
3538
+ * 取消监听:BLE(thing)大数据通道传输进度
2714
3539
  */
2715
- export function onTYBLEScanBindDevice(listener: (params: TYBLEScanDeviceEvent) => void): void
3540
+ export function offBLEBigDataChannelProgressEvent(
3541
+ listener: (params: ThingBLEBigDataProgressEvent) => void
3542
+ ): void
2716
3543
 
2717
3544
  /**
2718
3545
  * 扫描到设备后进行通知
2719
3546
  */
2720
- export function offTYBLEScanBindDevice(listener: (params: TYBLEScanDeviceEvent) => void): void
3547
+ export function onBLEScanBindDevice(listener: (params: ThingBLEScanDeviceEvent) => void): void
3548
+
3549
+ /**
3550
+ * 取消监听:扫描到设备后进行通知
3551
+ */
3552
+ export function offBLEScanBindDevice(listener: (params: ThingBLEScanDeviceEvent) => void): void
2721
3553
 
2722
3554
  /**
2723
3555
  * 大数据从设备传输到App成功的事件
@@ -2727,7 +3559,7 @@ declare namespace ty.device {
2727
3559
  ): void
2728
3560
 
2729
3561
  /**
2730
- * 大数据从设备传输到App成功的事件
3562
+ * 取消监听:大数据从设备传输到App成功的事件
2731
3563
  */
2732
3564
  export function offBLEBigDataChannelDeviceToAppSuccess(
2733
3565
  listener: (params: BLEBigDataChannelDeviceToAppSuccessResponse) => void
@@ -2737,25 +3569,25 @@ declare namespace ty.device {
2737
3569
  * 大数据上传到云端进度的事件
2738
3570
  */
2739
3571
  export function onBLEBigDataChannelUploadCloudProgress(
2740
- listener: (params: TYBLEBigDataProgressEvent) => void
3572
+ listener: (params: ThingBLEBigDataProgressEvent) => void
2741
3573
  ): void
2742
3574
 
2743
3575
  /**
2744
- * 大数据上传到云端进度的事件
3576
+ * 取消监听:大数据上传到云端进度的事件
2745
3577
  */
2746
3578
  export function offBLEBigDataChannelUploadCloudProgress(
2747
- listener: (params: TYBLEBigDataProgressEvent) => void
3579
+ listener: (params: ThingBLEBigDataProgressEvent) => void
2748
3580
  ): void
2749
3581
 
2750
3582
  /**
2751
3583
  * 子设备配网结果事件
2752
3584
  */
2753
- export function onSubDeviceInfoUpdateEvent(listener: (params: Device) => void): void
3585
+ export function onSubDeviceInfoUpdateEvent(listener: (params: GWActivationRespond) => void): void
2754
3586
 
2755
3587
  /**
2756
- * 子设备配网结果事件
3588
+ * 取消监听:子设备配网结果事件
2757
3589
  */
2758
- export function offSubDeviceInfoUpdateEvent(listener: (params: Device) => void): void
3590
+ export function offSubDeviceInfoUpdateEvent(listener: (params: GWActivationRespond) => void): void
2759
3591
 
2760
3592
  /**
2761
3593
  * 免配网-设备扫描结果事件
@@ -2765,7 +3597,7 @@ declare namespace ty.device {
2765
3597
  ): void
2766
3598
 
2767
3599
  /**
2768
- * 免配网-设备扫描结果事件
3600
+ * 取消监听:免配网-设备扫描结果事件
2769
3601
  */
2770
3602
  export function offDirectlyConnectedSearchDeviceEvent(
2771
3603
  listener: (params: DirectlyConnectedSearchRespond) => void
@@ -2777,7 +3609,7 @@ declare namespace ty.device {
2777
3609
  export function onDpDataChange(listener: (params: DpsChanged) => void): void
2778
3610
 
2779
3611
  /**
2780
- * dp点变更
3612
+ * 取消监听:dp点变更
2781
3613
  */
2782
3614
  export function offDpDataChange(listener: (params: DpsChanged) => void): void
2783
3615
 
@@ -2787,7 +3619,7 @@ declare namespace ty.device {
2787
3619
  export function onMqttMessageReceived(listener: (params: MqttResponse) => void): void
2788
3620
 
2789
3621
  /**
2790
- * MQTT消息通道消息上报
3622
+ * 取消监听:MQTT消息通道消息上报
2791
3623
  */
2792
3624
  export function offMqttMessageReceived(listener: (params: MqttResponse) => void): void
2793
3625
 
@@ -2797,7 +3629,7 @@ declare namespace ty.device {
2797
3629
  export function onSocketMessageReceived(listener: (params: SocketResponse) => void): void
2798
3630
 
2799
3631
  /**
2800
- * socket消息通道消息上报
3632
+ * 取消监听:socket消息通道消息上报
2801
3633
  */
2802
3634
  export function offSocketMessageReceived(listener: (params: SocketResponse) => void): void
2803
3635
 
@@ -2807,19 +3639,19 @@ declare namespace ty.device {
2807
3639
  export function onDeviceOnlineStatusUpdate(listener: (params: Online) => void): void
2808
3640
 
2809
3641
  /**
2810
- * 设备上下线状态变更
3642
+ * 取消监听:设备上下线状态变更
2811
3643
  */
2812
3644
  export function offDeviceOnlineStatusUpdate(listener: (params: Online) => void): void
2813
3645
 
2814
3646
  /**
2815
3647
  * 设备 dp 名字和设备名字触发
2816
3648
  */
2817
- export function onDeviceInfoUpdated(listener: (params: Device_elDqwU) => void): void
3649
+ export function onDeviceInfoUpdated(listener: (params: Device_KeiZSq) => void): void
2818
3650
 
2819
3651
  /**
2820
- * 设备 dp 名字和设备名字触发
3652
+ * 取消监听:设备 dp 名字和设备名字触发
2821
3653
  */
2822
- export function offDeviceInfoUpdated(listener: (params: Device_elDqwU) => void): void
3654
+ export function offDeviceInfoUpdated(listener: (params: Device_KeiZSq) => void): void
2823
3655
 
2824
3656
  /**
2825
3657
  * 设备移除事件
@@ -2827,27 +3659,57 @@ declare namespace ty.device {
2827
3659
  export function onDeviceRemoved(listener: (params: OnDeviceRemovedBody) => void): void
2828
3660
 
2829
3661
  /**
2830
- * 设备移除事件
3662
+ * 取消监听:设备移除事件
2831
3663
  */
2832
3664
  export function offDeviceRemoved(listener: (params: OnDeviceRemovedBody) => void): void
2833
3665
 
3666
+ /**
3667
+ * mqtt连接状态变化事件
3668
+ */
3669
+ export function onMqttConnectState(listener: (params: MqttConnectStateResponse) => void): void
3670
+
3671
+ /**
3672
+ * 取消监听:mqtt连接状态变化事件
3673
+ */
3674
+ export function offMqttConnectState(listener: (params: MqttConnectStateResponse) => void): void
3675
+
2834
3676
  /**
2835
3677
  * 定时变化事件
2836
3678
  */
2837
3679
  export function onTimerUpdate(listener: (params: {}) => void): void
2838
3680
 
2839
3681
  /**
2840
- * 定时变化事件
3682
+ * 取消监听:定时变化事件
2841
3683
  */
2842
3684
  export function offTimerUpdate(listener: (params: {}) => void): void
2843
3685
 
3686
+ /**
3687
+ * 群组内增加/移除设备事件
3688
+ */
3689
+ export function onGroupInfoChange(listener: (params: GroupInfoResponse) => void): void
3690
+
3691
+ /**
3692
+ * 取消监听:群组内增加/移除设备事件
3693
+ */
3694
+ export function offGroupInfoChange(listener: (params: GroupInfoResponse) => void): void
3695
+
3696
+ /**
3697
+ * 群组dpCode变化事件
3698
+ */
3699
+ export function onGroupDpCodeChange(listener: (params: GroupDpCodeBean) => void): void
3700
+
3701
+ /**
3702
+ * 取消监听:群组dpCode变化事件
3703
+ */
3704
+ export function offGroupDpCodeChange(listener: (params: GroupDpCodeBean) => void): void
3705
+
2844
3706
  /**
2845
3707
  * 群组移除事件
2846
3708
  */
2847
3709
  export function onGroupRemovedEvent(listener: (params: GroupBean) => void): void
2848
3710
 
2849
3711
  /**
2850
- * 群组移除事件
3712
+ * 取消监听:群组移除事件
2851
3713
  */
2852
3714
  export function offGroupRemovedEvent(listener: (params: GroupBean) => void): void
2853
3715
 
@@ -2857,7 +3719,7 @@ declare namespace ty.device {
2857
3719
  export function onGroupDpDataChangeEvent(listener: (params: GroupDpDataBean) => void): void
2858
3720
 
2859
3721
  /**
2860
- * 群组DP变更事件
3722
+ * 取消监听:群组DP变更事件
2861
3723
  */
2862
3724
  export function offGroupDpDataChangeEvent(listener: (params: GroupDpDataBean) => void): void
2863
3725
 
@@ -2869,7 +3731,7 @@ declare namespace ty.device {
2869
3731
  ): void
2870
3732
 
2871
3733
  /**
2872
- * 接收物模型消息事件。只有subscribeReceivedThingModelMessage订阅了,才会收到该事件。
3734
+ * 取消监听:接收物模型消息事件。只有subscribeReceivedThingModelMessage订阅了,才会收到该事件。
2873
3735
  */
2874
3736
  export function offReceivedThingModelMessage(
2875
3737
  listener: (params: OnReceivedThingModelMessageBody) => void
@@ -2967,7 +3829,7 @@ declare namespace ty.device {
2967
3829
  devAttribute: number
2968
3830
  /**
2969
3831
  * pcc
2970
- * 涂鸦自研蓝牙 mesh 产品的分类标识
3832
+ * Thing自研蓝牙 mesh 产品的分类标识
2971
3833
  */
2972
3834
  pcc: string
2973
3835
  /**
@@ -3002,7 +3864,7 @@ declare namespace ty.device {
3002
3864
  bizAttribute: number
3003
3865
  /**
3004
3866
  * meshId
3005
- * 涂鸦自研的蓝牙 mesh id
3867
+ * Thing自研的蓝牙 mesh id
3006
3868
  */
3007
3869
  meshId: string
3008
3870
  /**
@@ -3020,6 +3882,8 @@ declare namespace ty.device {
3020
3882
  * 本地局域网是否在线
3021
3883
  */
3022
3884
  isLocalOnline: boolean
3885
+ /** 设备云端在线情况 */
3886
+ isCloudOnline: boolean
3023
3887
  /**
3024
3888
  * isOnline
3025
3889
  * 设备总的在线情况,只要一个情况在线,就是在线,复合在线情况
@@ -3037,8 +3901,20 @@ declare namespace ty.device {
3037
3901
  * 标准功能集 code
3038
3902
  */
3039
3903
  dpCodes: Record<string, {}>
3040
- /** 原始 json,业务来不及拓展更新的时候,可以根据这个来获取处理 */
3041
- originJson: Record<string, {}>
3904
+ /** 时区信息 */
3905
+ devTimezoneId: string
3906
+ /** 设备的功能点执行的时间 */
3907
+ dpsTime: Record<string, {}>
3908
+ /** 设备纬度 */
3909
+ latitude: string
3910
+ /** 设备经度 */
3911
+ longitude: string
3912
+ /** 设备ip地址 */
3913
+ ip: string
3914
+ /** 是否为虚拟设备 */
3915
+ isVirtualDevice: boolean
3916
+ /** zigbeeInstallCode to the cloud to mark the gateway with installation code ability */
3917
+ isZigbeeInstallCode: boolean
3042
3918
  }
3043
3919
 
3044
3920
  export type Object = {}
@@ -3194,7 +4070,82 @@ declare namespace ty.device {
3194
4070
  originJson: Record<string, {}>
3195
4071
  }
3196
4072
 
3197
- export type DeviceInfo_mScpag = {
4073
+ export type SceneAction = {
4074
+ /** 条件 ID */
4075
+ id?: string
4076
+ /** 场景 ID */
4077
+ ruleId?: string
4078
+ /** 场景 ID */
4079
+ orderNum?: number
4080
+ /** 条件为设备类型时,表示设备 ID */
4081
+ entityId: string
4082
+ /** 设备名称 */
4083
+ entityName?: string
4084
+ /**
4085
+ * 动作类型。枚举:
4086
+ * ruleTrigger:触发场景
4087
+ * ruleEnable:启用场景
4088
+ * ruleDisable:禁用场景
4089
+ * appPushTrigger:推送消息
4090
+ * mobileVoiceSend:电话服务
4091
+ * smsSend:短信服务
4092
+ * deviceGroupDpIssue:执行群组
4093
+ * irIssue:执行红外设备
4094
+ * dpIssue:执行普通设备
4095
+ * delay:延时
4096
+ * irIssueVii:执行红外设备,执行参数为真实的红外控制码
4097
+ * toggle:执行切换开关动作
4098
+ * dpStep:执行步进动作
4099
+ */
4100
+ actionExecutor: string
4101
+ /** 动作执行信息 */
4102
+ executorProperty: Record<string, {}>
4103
+ /** 动作额外信息 */
4104
+ extraProperty: Record<string, {}>
4105
+ /** 设备是否在线 */
4106
+ isDevOnline?: boolean
4107
+ /** 条件为设备类型时,表示设备是否被移除 */
4108
+ devDelMark?: boolean
4109
+ /** 条件为设备类型时,表示设备被删除时的图标 */
4110
+ deleteDevIcon?: string
4111
+ /** 条件为设备类型时,设备的图标 */
4112
+ devIcon?: string
4113
+ /** 动作的策略 */
4114
+ actionStrategy?: string
4115
+ /** 面板信息(小程序或者RN面板) */
4116
+ extraPanelInfo?: ExtraPanelInfo
4117
+ /** 设备产品 ID */
4118
+ pid?: string
4119
+ /** 设备产品 ID */
4120
+ productId?: string
4121
+ /** 条件为设备类型时,表示设备产品图片 */
4122
+ productPic?: string
4123
+ /** 条件默认图标 */
4124
+ defaultIconUrl?: string
4125
+ /** 动作展示信息 */
4126
+ actionDisplayNew?: Record<string, {}>
4127
+ /** 执行状态 */
4128
+ status?: boolean
4129
+ }
4130
+
4131
+ export type Expr = {
4132
+ /** 开始时间 imeInterval=custom时自定义,其余默认00:00 */
4133
+ start: string
4134
+ /** 结束时间,timeInterval=custom时自定义,其余默认23:59 */
4135
+ end: string
4136
+ /** 自定义:custom,全天:allDay,白天:daytime,夜间:night,默认allDay */
4137
+ timeInterval: string
4138
+ /** 按7123456顺序标记,例:0001100,每周三、四;0000000表示只执行一次 */
4139
+ loops: string
4140
+ /** 时区 */
4141
+ timeZoneId: string
4142
+ /** 城市Id */
4143
+ cityId: string
4144
+ /** 城市名称 */
4145
+ cityName: string
4146
+ }
4147
+
4148
+ export type DeviceInfo_SLAb2e = {
3198
4149
  /** 产品信息,schema,功能定义都在里面 */
3199
4150
  schema: {}[]
3200
4151
  /**
@@ -3270,7 +4221,7 @@ declare namespace ty.device {
3270
4221
  devAttribute: number
3271
4222
  /**
3272
4223
  * pcc
3273
- * 涂鸦自研蓝牙 mesh 产品的分类标识
4224
+ * Thing自研蓝牙 mesh 产品的分类标识
3274
4225
  */
3275
4226
  pcc: string
3276
4227
  /**
@@ -3305,7 +4256,7 @@ declare namespace ty.device {
3305
4256
  bizAttribute: number
3306
4257
  /**
3307
4258
  * meshId
3308
- * 涂鸦自研的蓝牙 mesh id
4259
+ * Thing自研的蓝牙 mesh id
3309
4260
  */
3310
4261
  meshId: string
3311
4262
  /**
@@ -3358,9 +4309,31 @@ declare namespace ty.device {
3358
4309
  events: ThingEvent[]
3359
4310
  }
3360
4311
 
3361
- export type TYBLEConnectStatusEvent = {
4312
+ export type LeaveBeaconFenceEvent = {
4313
+ /** 设备模型 设备id */
4314
+ deviceId: string
4315
+ /** 具体文案 */
4316
+ text: string
4317
+ }
4318
+
4319
+ export type FileTransferProgressResult = {
4320
+ /** 设备模型 设备id */
4321
+ deviceId: string
4322
+ /** 文件id */
4323
+ fileId: number
4324
+ /** 文件标识符 */
4325
+ fileIdentifier: string
4326
+ /** 文件版本 */
4327
+ fileVersion: number
4328
+ /** 文件地址 */
4329
+ filePath: string
4330
+ /** 传输进度 */
4331
+ progress: number
4332
+ }
4333
+
4334
+ export type ThingBLEConnectStatusEvent = {
3362
4335
  /**
3363
- * BLE(tuya)连接状态
4336
+ * BLE(thing)连接状态
3364
4337
  * deviceId: 设备 id
3365
4338
  */
3366
4339
  deviceId: string
@@ -3373,7 +4346,7 @@ declare namespace ty.device {
3373
4346
  status: string
3374
4347
  }
3375
4348
 
3376
- export type TYBLETransparentDataBean = {
4349
+ export type ThingBLETransparentDataBean = {
3377
4350
  /**
3378
4351
  * 蓝牙透传数据
3379
4352
  * deviceId: 设备 id
@@ -3383,7 +4356,7 @@ declare namespace ty.device {
3383
4356
  data: string
3384
4357
  }
3385
4358
 
3386
- export type TYBLEBigDataProgressEvent = {
4359
+ export type ThingBLEBigDataProgressEvent = {
3387
4360
  /**
3388
4361
  * 大数据通道传输进度
3389
4362
  * deviceId 设备 id
@@ -3393,7 +4366,7 @@ declare namespace ty.device {
3393
4366
  progress: number
3394
4367
  }
3395
4368
 
3396
- export type TYBLEScanDeviceEvent = {
4369
+ export type ThingBLEScanDeviceEvent = {
3397
4370
  /** 扫描到的设备ID */
3398
4371
  deviceId: string
3399
4372
  }
@@ -3403,6 +4376,19 @@ declare namespace ty.device {
3403
4376
  data: BLEBigDataChannelData[]
3404
4377
  }
3405
4378
 
4379
+ export type GWActivationRespond = {
4380
+ /**
4381
+ * 设备模型
4382
+ * deviceId 设备Id
4383
+ */
4384
+ deviceId: string
4385
+ /**
4386
+ * 网关模型
4387
+ * gwId 网关设备Id
4388
+ */
4389
+ gwId: string
4390
+ }
4391
+
3406
4392
  export type DirectlyConnectedSearchRespond = {
3407
4393
  /**
3408
4394
  * 设备是否激活
@@ -3439,6 +4425,8 @@ declare namespace ty.device {
3439
4425
  type: string
3440
4426
  /** 协议号 */
3441
4427
  protocol: number
4428
+ /** topic */
4429
+ topic?: string
3442
4430
  }
3443
4431
 
3444
4432
  export type SocketResponse = {
@@ -3465,7 +4453,7 @@ declare namespace ty.device {
3465
4453
  onlineType: number
3466
4454
  }
3467
4455
 
3468
- export type Device_elDqwU = {
4456
+ export type Device_KeiZSq = {
3469
4457
  /**
3470
4458
  * deviceId 设备id
3471
4459
  * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
@@ -3480,6 +4468,30 @@ declare namespace ty.device {
3480
4468
  deviceId: string
3481
4469
  }
3482
4470
 
4471
+ export type MqttConnectStateResponse = {
4472
+ /**
4473
+ * mqtt连接状态
4474
+ * 0 连接失败
4475
+ * 1 连接成功
4476
+ */
4477
+ connectState: number
4478
+ }
4479
+
4480
+ export type GroupInfoResponse = {
4481
+ /** groupId 群组id */
4482
+ groupId: string
4483
+ }
4484
+
4485
+ export type GroupDpCodeBean = {
4486
+ /** groupId 群组id */
4487
+ groupId: string
4488
+ /**
4489
+ * dp信息
4490
+ * 示例: dpCodes: {"switch" : true}
4491
+ */
4492
+ dpCodes: Record<string, Object>
4493
+ }
4494
+
3483
4495
  export type GroupBean = {
3484
4496
  /** 群组id */
3485
4497
  groupId: string
@@ -3532,6 +4544,18 @@ declare namespace ty.device {
3532
4544
  timeout: number
3533
4545
  }
3534
4546
 
4547
+ export type DeviceWifiActivatorResponse = {
4548
+ /** 设备是否WiFi激活 */
4549
+ wifiActivator: boolean
4550
+ }
4551
+
4552
+ export type DeviceNameParams = {
4553
+ /** deviceId 设备id */
4554
+ deviceId: string
4555
+ /** name 设备名称 */
4556
+ name: string
4557
+ }
4558
+
3535
4559
  export type DeviceOnlineTypeResponse = {
3536
4560
  /** 设备网络在线类型 */
3537
4561
  onlineType: number
@@ -3543,8 +4567,6 @@ declare namespace ty.device {
3543
4567
  }
3544
4568
 
3545
4569
  export type ProductInfo = {
3546
- /** 产品原始 json 信息 */
3547
- originJson: Record<string, {}>
3548
4570
  /** 面板配置项,可以在平台进行配置 */
3549
4571
  panelConfig: Record<string, {}>
3550
4572
  /** 产品功能定义集合 */
@@ -3584,12 +4606,12 @@ declare namespace ty.device {
3584
4606
  standard: boolean
3585
4607
  /**
3586
4608
  * pcc
3587
- * 涂鸦自研蓝牙 mesh 产品的分类标识
4609
+ * Thing自研蓝牙 mesh 产品的分类标识
3588
4610
  */
3589
4611
  pcc: string
3590
4612
  /**
3591
4613
  * vendorInfo
3592
- * 涂鸦自研蓝牙 mesh 产品的分类标识,融合类使用
4614
+ * Thing自研蓝牙 mesh 产品的分类标识,融合类使用
3593
4615
  */
3594
4616
  vendorInfo: string
3595
4617
  /**
@@ -3711,7 +4733,7 @@ declare namespace ty.device {
3711
4733
  * HTTP = 2, // Http
3712
4734
  * BLE = 3, // Single Point Bluetooth
3713
4735
  * SIGMesh = 4, // Sig Mesh
3714
- * BLEMesh = 5, // Tuya Private Mesh
4736
+ * BLEMesh = 5, // Thing Private Mesh
3715
4737
  * BLEBeacon = 6, // Beacon
3716
4738
  */
3717
4739
  pipelines: number[]
@@ -3816,6 +4838,11 @@ declare namespace ty.device {
3816
4838
  deviceIdList: string[]
3817
4839
  }
3818
4840
 
4841
+ export type TopicListListenerParams = {
4842
+ /** 需监听的topic列表 */
4843
+ topicList: string[]
4844
+ }
4845
+
3819
4846
  export type OTAUpdateInfoParams = {
3820
4847
  /**
3821
4848
  * deviceId
@@ -4125,7 +5152,7 @@ declare namespace ty.device {
4125
5152
  warningText: string
4126
5153
  }
4127
5154
 
4128
- export type Device_iLmqmD = {
5155
+ export type Device_2Szsn0 = {
4129
5156
  /**
4130
5157
  * deviceId
4131
5158
  * 设备 id
@@ -4170,6 +5197,310 @@ declare namespace ty.device {
4170
5197
  services: ThirdPartyService[]
4171
5198
  }
4172
5199
 
5200
+ export type UiComponent = {
5201
+ /** 组件code */
5202
+ code: string
5203
+ /** 组件版本 */
5204
+ version: string
5205
+ /** 排序 */
5206
+ sort: number
5207
+ /** 版本路径 */
5208
+ content?: string
5209
+ /** 文件大小 */
5210
+ fileSize?: string
5211
+ /** 文件md5 */
5212
+ fileMd5?: string
5213
+ }
5214
+
5215
+ export type UiInfo = {
5216
+ /** 发布状态 */
5217
+ phase?: string
5218
+ /** 类型:H5 RN */
5219
+ type?: string
5220
+ /** uiId版本 */
5221
+ ui?: string
5222
+ /** rn版本 */
5223
+ appRnVersion?: string
5224
+ /** 名称 */
5225
+ name?: string
5226
+ /** 是否找到面板 */
5227
+ rnFind?: boolean
5228
+ /** 面板配置 */
5229
+ uiConfig?: Record<string, {}>
5230
+ /** 包下载地址相对路径 */
5231
+ content?: string
5232
+ /** 文件大小 */
5233
+ fileSize?: string
5234
+ /** 文件md5 */
5235
+ fileMd5?: string
5236
+ /** 包类型:0.全量包,1.拆分包 */
5237
+ rnBizPack?: number
5238
+ /** 包ID */
5239
+ bizClientId?: string
5240
+ /** 拆分包依赖组件列表 */
5241
+ uiComponentList?: UiComponent[]
5242
+ }
5243
+
5244
+ export type RNPanelInfo = {
5245
+ /** 面板id */
5246
+ uiid?: string
5247
+ /** 面板信息 */
5248
+ uiInfo?: UiInfo
5249
+ /** Android 面板信息 */
5250
+ androidUiInfo?: UiInfo
5251
+ /** 多语言 */
5252
+ i18nTime?: number
5253
+ }
5254
+
5255
+ export type MiniInfo = {
5256
+ /** 小程序额外信息 */
5257
+ extraMiniInfo?: Record<string, {}>
5258
+ }
5259
+
5260
+ export type ExtraPanelInfo = {
5261
+ /** RN面板信息 */
5262
+ rnPanelInfo?: RNPanelInfo
5263
+ /** 小程序信息 */
5264
+ miniInfo?: MiniInfo
5265
+ }
5266
+
5267
+ export type RecommendSceneParams = {
5268
+ /** 来源 */
5269
+ source: string
5270
+ /** 场景模型 */
5271
+ sceneModel: Record<string, {}>
5272
+ }
5273
+
5274
+ export type RecommendSceneCallBack = {
5275
+ /** 返回状态,默认返回 true */
5276
+ status?: boolean
5277
+ /** 成功返回的类型。0-未操作,1-保存成功,2-点击不感兴趣 */
5278
+ type: number
5279
+ /** 返回的场景数据,可能为空 */
5280
+ data?: Record<string, {}>
5281
+ }
5282
+
5283
+ export type OpenDeviceExecutionAndAnutomationParams = {
5284
+ /**
5285
+ * deviceId
5286
+ * 设备 id
5287
+ */
5288
+ deviceId: string
5289
+ /** 页面标题,Android 需要 */
5290
+ title?: string
5291
+ }
5292
+
5293
+ export type SaveSceneActionParams = {
5294
+ /** 设备id */
5295
+ deviceId: string
5296
+ /** 动作的索引位置 */
5297
+ taskPosition: number
5298
+ /** 动作执行器 */
5299
+ actionExecutor?: string
5300
+ /** 动作执行信息 */
5301
+ executorProperty: Record<string, {}>
5302
+ /** 动作额外信息 */
5303
+ extraProperty: Record<string, {}>
5304
+ /** 动作展示信息 */
5305
+ actionDisplayNew: Record<string, {}>
5306
+ }
5307
+
5308
+ export type ActionParams = {
5309
+ /**
5310
+ * 动作类型:device,smart,remind,delay
5311
+ * device:设备
5312
+ * smart:操作某个智能(执行智能、开关自动化)
5313
+ * remind:提醒
5314
+ * delay:延时
5315
+ */
5316
+ createType: string
5317
+ /**
5318
+ * 智能类型:scene,auto
5319
+ * scene:一键执行
5320
+ * auto:自动化
5321
+ */
5322
+ smartType: string
5323
+ /** 当前场景动作列表 */
5324
+ actionArray: SceneAction[]
5325
+ }
5326
+
5327
+ export type ActionResponse = {
5328
+ /** 动作列表 */
5329
+ actionArray: SceneAction[]
5330
+ }
5331
+
5332
+ export type EditActionParams = {
5333
+ /** 当前编辑的actionIndex */
5334
+ editIndex: string
5335
+ /** 智能类型 */
5336
+ smartType: string
5337
+ /** 动作列表 */
5338
+ actionArray: SceneAction[]
5339
+ }
5340
+
5341
+ export type SceneDialogParams = {
5342
+ /**
5343
+ * 智能类型:scene,auto
5344
+ * scene:一键执行
5345
+ * auto:自动化
5346
+ */
5347
+ smartType?: string
5348
+ /** 颜色 */
5349
+ color?: string
5350
+ /** 图标 */
5351
+ icon?: string
5352
+ /** 图片 */
5353
+ image?: string
5354
+ }
5355
+
5356
+ export type SceneDialogResponse = {
5357
+ /** 颜色 */
5358
+ color?: string
5359
+ /** 图标 */
5360
+ icon?: string
5361
+ /** 图片 */
5362
+ image?: string
5363
+ }
5364
+
5365
+ export type PreConditionPageParams = {
5366
+ /** id */
5367
+ id?: string
5368
+ /** 固定值 timeCheck */
5369
+ condType?: string
5370
+ /** 规则 */
5371
+ expr?: Expr
5372
+ }
5373
+
5374
+ export type PreConditionPageResponse = {
5375
+ /** id */
5376
+ id: string
5377
+ /** 固定值 timeCheck */
5378
+ condType: string
5379
+ /** 规则 */
5380
+ expr: Expr
5381
+ }
5382
+
5383
+ export type ConditionParams = {
5384
+ /** 条件类型 */
5385
+ type: string
5386
+ /** 条件内容 */
5387
+ condition?: string
5388
+ /** 索引 */
5389
+ index?: number
5390
+ }
5391
+
5392
+ export type ConditionResponse = {
5393
+ /** 条件类型 */
5394
+ type?: string
5395
+ /** 条件内容 */
5396
+ condition?: string
5397
+ /** 索引 */
5398
+ index?: number
5399
+ }
5400
+
5401
+ export type DeviceListResponse = {
5402
+ /** groupId 群组id */
5403
+ groupId: string
5404
+ /** deviceList 设备列表 */
5405
+ deviceList: DeviceInfo_SLAb2e[]
5406
+ }
5407
+
5408
+ export type DeviceNumResponse = {
5409
+ /** groupId 群组id */
5410
+ groupId: string
5411
+ /** devieNum 设备数量 */
5412
+ devieNum: number
5413
+ }
5414
+
5415
+ export type DpCodeParams = {
5416
+ /** groupId 群组id */
5417
+ groupId: string
5418
+ /** dpCode内容 */
5419
+ dpCode: string
5420
+ }
5421
+
5422
+ export type SigMeshMultiDpDataParams = {
5423
+ /** groupId 群组id */
5424
+ groupId: string
5425
+ /** localId 群组本地标识 */
5426
+ localId: string
5427
+ /**
5428
+ * dp信息
5429
+ * 示例: dps: {"1" : true}
5430
+ */
5431
+ dps: Record<string, {}>
5432
+ /** pcc mesh设备品类 */
5433
+ pcc: string
5434
+ }
5435
+
5436
+ export type MeshLocalGroupParams = {
5437
+ /**
5438
+ * 整体说明
5439
+ * 支持2个版本:
5440
+ * 1、本地版本仅支持根据vendorIds进行过滤,为本地逻辑,设备列表APP本地根据meshCategory进行比对过滤,群组结果保存在设备上,云端不参与群组的列表获取与保存。
5441
+ * 2、云端版本支持根据pccs或者codes进行过滤,为云端逻辑,设备列表获取及群组设备关系保存在云端。
5442
+ * 本地版本参数:
5443
+ * {
5444
+ * "localId": "203a",
5445
+ * "vendorIds": "1F10,2F10"
5446
+ * }
5447
+ * 云端版本参数:
5448
+ * 1、pcc过滤,相当于旧版本的vendorIds
5449
+ * {
5450
+ * "localId": "203a",
5451
+ * "type": "0",
5452
+ * "pccs": ["1210"],
5453
+ * "categoryCode": "7001"
5454
+ * }
5455
+ * 2、code过滤,根据二级品类进行过滤,目前云端只支持ykq和gykzq这两种遥控器
5456
+ * {
5457
+ * "localId": "203a",
5458
+ * "type": "1",
5459
+ * "codes": ["xxxx"],
5460
+ * "categoryCode": "7001"
5461
+ * }
5462
+ * 关于categoryCode:categoryCode 并非三级品类,与localId匹配范围为7001-7008;localId 为云端分配,步长为8,因此一个遥控器内部最多支持关联8个群组,localid为初始值依次+1,与之匹配的categoryCode从7001依次+1.
5463
+ * vendorIds 必传 可以为空字符串
5464
+ * devId 遥控器设备id
5465
+ */
5466
+ deviceId: string
5467
+ /** localId 群组本地标识 */
5468
+ localId: string
5469
+ /**
5470
+ * 遥控器群组本地版本,使用功能此参数,云端版本传空字符串
5471
+ * vendorIds 使用meshCategory进行设备列表筛选
5472
+ * 示例:vendorIds: "1F10,2F10"
5473
+ */
5474
+ vendorIds: string
5475
+ /**
5476
+ * 遥控器群组云端版本,使用此功能参数
5477
+ * type 筛选条件 0:pccs过滤,1:codes过滤
5478
+ */
5479
+ type?: string
5480
+ /**
5481
+ * 遥控器群组云端版本,使用此功能参数
5482
+ * pccs 使用meshCategory进行设备列表筛选
5483
+ * 示例:pccs: ["1F10","2F10"]
5484
+ */
5485
+ pccs?: string[]
5486
+ /**
5487
+ * 遥控器群组云端版本,使用此功能参数
5488
+ * codes 使用二级品类进行设备列表筛选
5489
+ * 示例:pccs: ["1F10","2F10"]
5490
+ */
5491
+ codes?: string[]
5492
+ /**
5493
+ * categoryCode 并非三级品类,与localId匹配范围为7001-7008;
5494
+ * localId 为云端分配,步长为8,因此一个遥控器内部最多支持关联8个群组,localid为初始值依次+1,与之匹配的categoryCode从7001依次+1.
5495
+ */
5496
+ categoryCode?: string
5497
+ /**
5498
+ * 是否支持低功耗,部分无线开关需要用到
5499
+ * 默认值:false
5500
+ */
5501
+ isSupportLowPower?: boolean
5502
+ }
5503
+
4173
5504
  export type GroupInfo = {
4174
5505
  /**
4175
5506
  * groupId
@@ -4225,7 +5556,7 @@ declare namespace ty.device {
4225
5556
  /** The custom DP name. */
4226
5557
  dpName: {}
4227
5558
  /** The device list. */
4228
- deviceList: DeviceInfo_mScpag[]
5559
+ deviceList: DeviceInfo_SLAb2e[]
4229
5560
  /** The local short address of groups. */
4230
5561
  localId: string
4231
5562
  /** The subclass. */
@@ -4257,6 +5588,25 @@ declare namespace ty.device {
4257
5588
  groupIdList: string[]
4258
5589
  }
4259
5590
 
5591
+ export type NodeParams = {
5592
+ /** nodeId */
5593
+ nodeId: string
5594
+ /** deviceId 网关id */
5595
+ deviceId: string
5596
+ }
5597
+
5598
+ export type DeviceResult = {
5599
+ /** 设备id */
5600
+ deviceId: string
5601
+ }
5602
+
5603
+ export type DpDataParams = {
5604
+ /** 设备模型 设备id */
5605
+ deviceId: string
5606
+ /** dpId */
5607
+ dpIds: Object[]
5608
+ }
5609
+
4260
5610
  export type CheckOTAUpgradeStatusParams = {
4261
5611
  /**
4262
5612
  * deviceId
@@ -4281,20 +5631,6 @@ declare namespace ty.device {
4281
5631
  deviceId: string
4282
5632
  }
4283
5633
 
4284
- export type RNPanelInfoBean = {
4285
- /**
4286
- * RN设备面板属性
4287
- * 设备模型
4288
- * deviceId 设备Id
4289
- */
4290
- deviceId: string
4291
- /**
4292
- * 面板初始化参数
4293
- * initialProps 初始化参数
4294
- */
4295
- initialProps?: Record<string, {}>
4296
- }
4297
-
4298
5634
  export type ThingProperty = {
4299
5635
  /** 属性id */
4300
5636
  abilityId: number