@ray-js/api 0.5.4 → 0.5.6-beta-1

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.
Files changed (137) hide show
  1. package/@types/BaseKit.d.ts +1009 -65
  2. package/@types/{TYKit.d.ts → BizKit.d.ts} +69 -42
  3. package/@types/DeviceKit.d.ts +788 -1564
  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-2.5.1-anonymize.2.d.ts} +18 -1
  7. package/lib/{BaseKit-2.3.11.js → BaseKit-2.5.1-anonymize.2.js} +18 -1
  8. package/lib/BizKit-2.4.6-rc.101.d.ts +40 -0
  9. package/lib/{TYKit-2.2.6.js → BizKit-2.4.6-rc.101.js} +1 -1
  10. package/lib/{DeviceKit-2.3.3.d.ts → DeviceKit-2.5.2-anonymize.1.d.ts} +43 -56
  11. package/lib/{DeviceKit-2.3.3.wechat.js → DeviceKit-2.5.2-anonymize.1.js} +85 -124
  12. package/lib/{MiniKit-2.4.3.d.ts → MiniKit-4.4.0-anonymize.4.d.ts} +14 -0
  13. package/lib/{MiniKit-2.4.3.wechat.js → MiniKit-4.4.0-anonymize.4.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.native.js +4 -0
  17. package/lib/getBoundingClientRect/index.js +26 -1
  18. package/lib/getCurrentPages/index.native.js +5 -0
  19. package/lib/getElementById/index.native.js +13 -0
  20. package/lib/getI18nInfo/index.native.js +9 -0
  21. package/lib/hideNotification/index.native.js +7 -0
  22. package/lib/hideTabBar/index.native.js +2 -0
  23. package/lib/navigateBack/index.native.js +2 -0
  24. package/lib/navigateTo/index.native.js +2 -0
  25. package/lib/reLaunch/index.native.js +2 -0
  26. package/lib/readFileSync/index.native.js +8 -0
  27. package/lib/redirectTo/index.native.js +2 -0
  28. package/lib/requestCloud/index.native.js +8 -0
  29. package/lib/setNavigationBarColor/index.native.js +2 -0
  30. package/lib/setNavigationBarTitle/index.native.js +2 -0
  31. package/lib/showTabBar/index.native.js +2 -0
  32. package/lib/switchTab/index.native.js +2 -0
  33. package/package.json +8 -8
  34. package/lib/BaseKit-2.3.11.android.js +0 -1
  35. package/lib/BaseKit-2.3.11.ios.js +0 -1
  36. package/lib/BaseKit-2.3.11.tuya.js +0 -66
  37. package/lib/BaseKit-2.3.11.web.js +0 -66
  38. package/lib/BaseKit-2.3.11.wechat.js +0 -66
  39. package/lib/DeviceKit-2.3.3.android.js +0 -1
  40. package/lib/DeviceKit-2.3.3.ios.js +0 -1
  41. package/lib/DeviceKit-2.3.3.js +0 -407
  42. package/lib/DeviceKit-2.3.3.tuya.js +0 -407
  43. package/lib/DeviceKit-2.3.3.web.js +0 -407
  44. package/lib/MiniKit-2.4.3.android.js +0 -1
  45. package/lib/MiniKit-2.4.3.ios.js +0 -1
  46. package/lib/MiniKit-2.4.3.js +0 -43
  47. package/lib/MiniKit-2.4.3.tuya.js +0 -43
  48. package/lib/MiniKit-2.4.3.web.js +0 -43
  49. package/lib/TYKit-2.2.6.android.js +0 -1
  50. package/lib/TYKit-2.2.6.d.ts +0 -40
  51. package/lib/TYKit-2.2.6.ios.js +0 -1
  52. package/lib/TYKit-2.2.6.tuya.js +0 -53
  53. package/lib/TYKit-2.2.6.web.js +0 -53
  54. package/lib/TYKit-2.2.6.wechat.js +0 -53
  55. package/lib/all-kits.android.js +0 -1
  56. package/lib/all-kits.ios.js +0 -1
  57. package/lib/all-kits.tuya.js +0 -6
  58. package/lib/all-kits.web.js +0 -6
  59. package/lib/all-kits.wechat.js +0 -6
  60. package/lib/core/index.android.js +0 -1
  61. package/lib/core/index.ios.js +0 -1
  62. package/lib/core/index.tuya.js +0 -1
  63. package/lib/core/index.web.js +0 -1
  64. package/lib/core/index.wechat.js +0 -1
  65. package/lib/core/promisify/index.android.js +0 -1
  66. package/lib/core/promisify/index.ios.js +0 -1
  67. package/lib/core/promisify/index.tuya.js +0 -27
  68. package/lib/core/promisify/index.web.js +0 -27
  69. package/lib/core/promisify/index.wechat.js +0 -27
  70. package/lib/getApp/index.android.js +0 -1
  71. package/lib/getApp/index.ios.js +0 -1
  72. package/lib/getApp/index.web.js +0 -4
  73. package/lib/getBoundingClientRect/index.android.js +0 -1
  74. package/lib/getBoundingClientRect/index.ios.js +0 -1
  75. package/lib/getBoundingClientRect/index.web.js +0 -26
  76. package/lib/getCurrentPages/index.android.js +0 -1
  77. package/lib/getCurrentPages/index.ios.js +0 -1
  78. package/lib/getCurrentPages/index.web.js +0 -4
  79. package/lib/getElementById/index.android.js +0 -1
  80. package/lib/getElementById/index.ios.js +0 -1
  81. package/lib/getElementById/index.web.js +0 -7
  82. package/lib/getI18nInfo/index.android.js +0 -1
  83. package/lib/getI18nInfo/index.ios.js +0 -1
  84. package/lib/getI18nInfo/index.web.js +0 -4
  85. package/lib/hideNotification/index.android.js +0 -1
  86. package/lib/hideNotification/index.ios.js +0 -1
  87. package/lib/hideNotification/index.tuya.js +0 -3
  88. package/lib/hideNotification/index.web.js +0 -3
  89. package/lib/hideNotification/index.wechat.js +0 -3
  90. package/lib/hideTabBar/index.android.js +0 -1
  91. package/lib/hideTabBar/index.ios.js +0 -1
  92. package/lib/hideTabBar/index.web.js +0 -4
  93. package/lib/index.android.js +0 -1
  94. package/lib/index.ios.js +0 -1
  95. package/lib/index.tuya.js +0 -20
  96. package/lib/index.web.js +0 -20
  97. package/lib/index.wechat.js +0 -20
  98. package/lib/navigateBack/index.android.js +0 -1
  99. package/lib/navigateBack/index.ios.js +0 -1
  100. package/lib/navigateBack/index.web.js +0 -14
  101. package/lib/navigateTo/index.android.js +0 -1
  102. package/lib/navigateTo/index.ios.js +0 -1
  103. package/lib/navigateTo/index.web.js +0 -11
  104. package/lib/reLaunch/index.android.js +0 -1
  105. package/lib/reLaunch/index.ios.js +0 -1
  106. package/lib/reLaunch/index.web.js +0 -11
  107. package/lib/readFileSync/index.android.js +0 -1
  108. package/lib/readFileSync/index.ios.js +0 -1
  109. package/lib/readFileSync/index.web.js +0 -6
  110. package/lib/redirectTo/index.android.js +0 -1
  111. package/lib/redirectTo/index.ios.js +0 -1
  112. package/lib/redirectTo/index.web.js +0 -13
  113. package/lib/requestCloud/index.android.js +0 -1
  114. package/lib/requestCloud/index.ios.js +0 -1
  115. package/lib/requestCloud/index.web.js +0 -7
  116. package/lib/setNavigationBarColor/index.android.js +0 -1
  117. package/lib/setNavigationBarColor/index.ios.js +0 -1
  118. package/lib/setNavigationBarColor/index.web.js +0 -11
  119. package/lib/setNavigationBarTitle/index.android.js +0 -1
  120. package/lib/setNavigationBarTitle/index.ios.js +0 -1
  121. package/lib/setNavigationBarTitle/index.web.js +0 -11
  122. package/lib/showNotification/index.android.js +0 -1
  123. package/lib/showNotification/index.ios.js +0 -1
  124. package/lib/showNotification/index.tuya.js +0 -3
  125. package/lib/showNotification/index.web.js +0 -3
  126. package/lib/showNotification/index.wechat.js +0 -3
  127. package/lib/showTabBar/index.android.js +0 -1
  128. package/lib/showTabBar/index.ios.js +0 -1
  129. package/lib/showTabBar/index.web.js +0 -4
  130. package/lib/switchTab/index.android.js +0 -1
  131. package/lib/switchTab/index.ios.js +0 -1
  132. package/lib/switchTab/index.web.js +0 -11
  133. package/lib/utils.android.js +0 -1
  134. package/lib/utils.ios.js +0 -1
  135. package/lib/utils.tuya.js +0 -21
  136. package/lib/utils.web.js +0 -21
  137. package/lib/utils.wechat.js +0 -20
@@ -1,9 +1,194 @@
1
1
  /**
2
2
  * DeviceKit
3
3
  *
4
- * @version 2.3.3
4
+ * @version 2.5.2-anonymize.1
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
@@ -711,19 +896,19 @@ declare namespace ty.device {
711
896
  }): void
712
897
 
713
898
  /**
714
- * 重置设备并恢复出厂设置。
715
- *设备数据会被清除并进入待配网状态。
899
+ * 连云激活-WiFi的激活状态
716
900
  */
717
- export function resetFactory(params: {
901
+ export function getDeviceWifiActivatorStatus(params: {
718
902
  /**
719
- * deviceId 设备id
720
- * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
903
+ * 设备模型
904
+ * deviceId 设备Id
721
905
  */
722
906
  deviceId: string
723
- /** dps 科学变化的数据 */
724
- dps?: Record<string, {}>
725
907
  complete?: () => void
726
- success?: (params: null) => void
908
+ success?: (params: {
909
+ /** 设备是否WiFi激活 */
910
+ wifiActivator: boolean
911
+ }) => void
727
912
  fail?: (params: {
728
913
  errorMsg: string
729
914
  errorCode: string | number
@@ -735,18 +920,19 @@ declare namespace ty.device {
735
920
  }): void
736
921
 
737
922
  /**
738
- * 移除设备
923
+ * 连云激活-进行wifi激活
739
924
  */
740
- export function removeDevice(params: {
925
+ export function startDeviceWifiActivator(params: {
741
926
  /**
742
- * deviceId 设备id
743
- * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
927
+ * 设备模型
928
+ * deviceId 设备Id
744
929
  */
745
930
  deviceId: string
746
- /** dps 科学变化的数据 */
747
- dps?: Record<string, {}>
748
931
  complete?: () => void
749
- success?: (params: null) => void
932
+ success?: (params: {
933
+ /** 设备是否WiFi激活 */
934
+ wifiActivator: boolean
935
+ }) => void
750
936
  fail?: (params: {
751
937
  errorMsg: string
752
938
  errorCode: string | number
@@ -758,16 +944,14 @@ declare namespace ty.device {
758
944
  }): void
759
945
 
760
946
  /**
761
- * 注册Zigbee网关子设备监听器
947
+ * 检查固件升级信息
762
948
  */
763
- export function registerZigbeeGateWaySubDeviceListener(params: {
949
+ export function checkOTAUpdateInfo(params: {
764
950
  /**
765
- * deviceId 设备id
766
- * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
951
+ * deviceId
952
+ * 设备 id
767
953
  */
768
954
  deviceId: string
769
- /** dps 科学变化的数据 */
770
- dps?: Record<string, {}>
771
955
  complete?: () => void
772
956
  success?: (params: null) => void
773
957
  fail?: (params: {
@@ -781,16 +965,14 @@ declare namespace ty.device {
781
965
  }): void
782
966
 
783
967
  /**
784
- * 注销Zigbee网关子设备监听器
968
+ * 跳转设备详情
785
969
  */
786
- export function unregisterZigbeeGateWaySubDeviceListener(params: {
970
+ export function openDeviceDetailPage(params: {
787
971
  /**
788
- * deviceId 设备id
789
- * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
972
+ * deviceId
973
+ * 设备 id
790
974
  */
791
975
  deviceId: string
792
- /** dps 科学变化的数据 */
793
- dps?: Record<string, {}>
794
976
  complete?: () => void
795
977
  success?: (params: null) => void
796
978
  fail?: (params: {
@@ -804,21 +986,16 @@ declare namespace ty.device {
804
986
  }): void
805
987
 
806
988
  /**
807
- * 检查设备某个通道是否在线
989
+ * 跳转群组详情
808
990
  */
809
- export function getDeviceOnlineType(params: {
991
+ export function openGroupDetailPage(params: {
810
992
  /**
811
- * deviceId 设备id
812
- * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
993
+ * groupId
994
+ * 群组 id
813
995
  */
814
- deviceId: string
815
- /** dps 科学变化的数据 */
816
- dps?: Record<string, {}>
996
+ groupId: string
817
997
  complete?: () => void
818
- success?: (params: {
819
- /** 设备网络在线类型 */
820
- onlineType: number
821
- }) => void
998
+ success?: (params: null) => void
822
999
  fail?: (params: {
823
1000
  errorMsg: string
824
1001
  errorCode: string | number
@@ -830,166 +1007,43 @@ declare namespace ty.device {
830
1007
  }): void
831
1008
 
832
1009
  /**
833
- * 获取设备的设备信息
1010
+ * 跳转定时界面
834
1011
  */
835
- export function getDeviceInfo(params: {
1012
+ export function openTimerPage(params: {
836
1013
  /**
837
- * deviceId 设备id
838
- * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
1014
+ * deviceId
1015
+ * 设备 id ,deviceId 和 groupId 至少传一个
839
1016
  */
840
1017
  deviceId: string
841
- /** dps 科学变化的数据 */
842
- dps?: Record<string, {}>
1018
+ /**
1019
+ * category
1020
+ * 定时分类
1021
+ */
1022
+ category: string
1023
+ /**
1024
+ * repeat
1025
+ * 0表示需要选择重复,1表示不需要
1026
+ */
1027
+ repeat?: number
1028
+ /**
1029
+ * data
1030
+ * dp 数据
1031
+ * {
1032
+ * "dpName": dp 点名称,string
1033
+ * "dpId": dp 点 id,string
1034
+ * "selected": dp 点默认值的 index,t.Integer
1035
+ * "rangeKeys": dp 点的值范围,Array<object>
1036
+ * "rangeValues": dp 点的显示数据范围,Array<string>
1037
+ * }
1038
+ */
1039
+ data: {}[]
1040
+ /**
1041
+ * timerConfig
1042
+ * UI配置
1043
+ */
1044
+ timerConfig?: TimerConfig
843
1045
  complete?: () => void
844
- success?: (params: {
845
- /** 产品信息,schema,功能定义都在里面 */
846
- schema: {}[]
847
- /**
848
- * dps
849
- * 设备的功能点状态,可以根据对应的 dpid 拿到具体的状态值去做业务逻辑
850
- */
851
- dps: Record<string, {}>
852
- /**
853
- * attribute
854
- * 产品属性定义,在 backend-ng 平台上可查到对应配置,使用二进制位运算的方式进行管理
855
- */
856
- attribute: number
857
- /**
858
- * capability
859
- * 产品能力值,在 backend-ng 平台上可以查询对应的勾选项,整体业务逻辑会根据该数据进行划分
860
- * 区分设备类型也可以根据该属性进行调整,按二进制位运算的方式进行管理
861
- */
862
- capability: number
863
- /**
864
- * dpName
865
- * 自定义 dp 的名字,通常在面板里会使用到
866
- */
867
- dpName: Record<string, string>
868
- /**
869
- * ability
870
- * 目前业务很少使用,用于区分特殊类型的设备
871
- */
872
- ability: number
873
- /**
874
- * icon
875
- * 设备的 icon url
876
- */
877
- icon: string
878
- /**
879
- * devId
880
- * 设备的唯一 id
881
- */
882
- devId: string
883
- /**
884
- * verSw
885
- * 设备固件版本号
886
- */
887
- verSw: string
888
- /**
889
- * isShare
890
- * 是否为分享设备,true 则是分享设备
891
- */
892
- isShare: boolean
893
- /**
894
- * bv
895
- * 设备的基线版本号
896
- */
897
- bv: string
898
- /**
899
- * uuid
900
- * 设备的固件唯一标识
901
- */
902
- uuid: string
903
- /**
904
- * panelConfig
905
- * 产品面板里的配置项,通常在 IoT 平台上可以查看到对应的配置
906
- */
907
- panelConfig: Record<string, {}>
908
- /**
909
- * activeTime
910
- * 设备激活时间,时间戳
911
- */
912
- activeTime: number
913
- /**
914
- * devAttribute
915
- * 设备的业务能力拓展,二进制位的方式进行运算
916
- */
917
- devAttribute: number
918
- /**
919
- * pcc
920
- * 涂鸦自研蓝牙 mesh 产品的分类标识
921
- */
922
- pcc: string
923
- /**
924
- * nodeId
925
- * 子设备的短地址
926
- */
927
- nodeId: string
928
- /**
929
- * parentId
930
- * 上级节点 id,子设备/或蓝牙 mesh 设备通常会有该字段,用于内部寻找相关的网关或上级模型来进行业务处理
931
- */
932
- parentId: string
933
- /**
934
- * category
935
- * 产品的分类
936
- */
937
- category: string
938
- /**
939
- * standSchemaModel
940
- * 标准产品功能集定义模型
941
- */
942
- standSchemaModel: {}
943
- /**
944
- * productId
945
- * 设备对应的产品 id
946
- */
947
- productId: string
948
- /**
949
- * bizAttribute
950
- * 设备自主上报的能力位
951
- */
952
- bizAttribute: number
953
- /**
954
- * meshId
955
- * 涂鸦自研的蓝牙 mesh id
956
- */
957
- meshId: string
958
- /**
959
- * sigmeshId
960
- * 当前设备所属行业属性对应的蓝牙 mesh id
961
- */
962
- sigmeshId: string
963
- /**
964
- * meta
965
- * 设备自定义配置元属性,用于存放业务数据
966
- */
967
- meta: Record<string, {}>
968
- /**
969
- * isLocalOnline
970
- * 本地局域网是否在线
971
- */
972
- isLocalOnline: boolean
973
- /**
974
- * isOnline
975
- * 设备总的在线情况,只要一个情况在线,就是在线,复合在线情况
976
- */
977
- isOnline: boolean
978
- /**
979
- * name
980
- * 设备名称
981
- */
982
- name: string
983
- /** groupId */
984
- groupId: string
985
- /**
986
- * dpCodes
987
- * 标准功能集 code
988
- */
989
- dpCodes: Record<string, {}>
990
- /** 原始 json,业务来不及拓展更新的时候,可以根据这个来获取处理 */
991
- originJson: Record<string, {}>
992
- }) => void
1046
+ success?: (params: null) => void
993
1047
  fail?: (params: {
994
1048
  errorMsg: string
995
1049
  errorCode: string | number
@@ -1001,747 +1055,7 @@ declare namespace ty.device {
1001
1055
  }): void
1002
1056
 
1003
1057
  /**
1004
- * 获取产品信息
1005
- */
1006
- export function getProductInfo(params: {
1007
- /** 产品id */
1008
- productId: string
1009
- complete?: () => void
1010
- success?: (params: {
1011
- /** 产品原始 json 信息 */
1012
- originJson: Record<string, {}>
1013
- /** 面板配置项,可以在平台进行配置 */
1014
- panelConfig: Record<string, {}>
1015
- /** 产品功能定义集合 */
1016
- schema: string
1017
- /** 产品功能定义集合拓展 */
1018
- schemaExt: string
1019
- /**
1020
- * capability
1021
- * 产品能力值,在 backend-ng 平台上可以查询对应的勾选项,整体业务逻辑会根据该数据进行划分
1022
- * 区分设备类型也可以根据该属性进行调整,按二进制位运算的方式进行管理
1023
- */
1024
- capability: number
1025
- /**
1026
- * attribute
1027
- * 产品属性定义,在 backend-ng 平台上可查到对应配置,使用二进制位运算的方式进行管理
1028
- */
1029
- attribute: number
1030
- /**
1031
- * productId
1032
- * 产品 id
1033
- */
1034
- productId: string
1035
- /**
1036
- * category
1037
- * 产品的分类
1038
- */
1039
- category: string
1040
- /**
1041
- * categoryCode
1042
- * 产品的二级分类
1043
- */
1044
- categoryCode: string
1045
- /**
1046
- * standard
1047
- * 是否为标准产品
1048
- */
1049
- standard: boolean
1050
- /**
1051
- * pcc
1052
- * 涂鸦自研蓝牙 mesh 产品的分类标识
1053
- */
1054
- pcc: string
1055
- /**
1056
- * vendorInfo
1057
- * 涂鸦自研蓝牙 mesh 产品的分类标识,融合类使用
1058
- */
1059
- vendorInfo: string
1060
- /**
1061
- * quickOpDps
1062
- * 快捷操作的 dp ids
1063
- */
1064
- quickOpDps: string[]
1065
- /**
1066
- * faultDps
1067
- * 告警/错误的显示 dp ids
1068
- */
1069
- faultDps: string[]
1070
- /**
1071
- * displayDps
1072
- * 快捷操作的 dp ids
1073
- */
1074
- displayDps: string[]
1075
- /**
1076
- * displayMsgs
1077
- * 快捷操作显示文案
1078
- */
1079
- displayMsgs: Record<string, {}>
1080
- /**
1081
- * uiPhase
1082
- * ui 包当前环境,预览包或线上包
1083
- */
1084
- uiPhase: string
1085
- /**
1086
- * uiId
1087
- * ui 包唯一包名识别
1088
- */
1089
- uiId: string
1090
- /**
1091
- * uiVersion
1092
- * ui 包版本号
1093
- */
1094
- uiVersion: string
1095
- /**
1096
- * ui
1097
- * ui 小标识
1098
- */
1099
- ui: string
1100
- /**
1101
- * rnFind
1102
- * 是否有包含 RN 包
1103
- */
1104
- rnFind: boolean
1105
- /**
1106
- * uiType
1107
- * ui 包类型
1108
- */
1109
- uiType: string
1110
- /**
1111
- * uiName
1112
- * ui 包名称
1113
- */
1114
- uiName: string
1115
- /**
1116
- * i18nTime
1117
- * 产品语言包最新更新时间
1118
- */
1119
- i18nTime: number
1120
- /**
1121
- * supportGroup
1122
- * 是否支持创建群组
1123
- */
1124
- supportGroup: boolean
1125
- /**
1126
- * supportSGroup
1127
- * 是否支持创建标准群组
1128
- */
1129
- supportSGroup: boolean
1130
- /**
1131
- * configMetas
1132
- * 产品特殊配置项,一些功能业务的特殊配置
1133
- */
1134
- configMetas: Record<string, {}>
1135
- /**
1136
- * productVer
1137
- * 产品版本
1138
- */
1139
- productVer: string
1140
- }) => void
1141
- fail?: (params: {
1142
- errorMsg: string
1143
- errorCode: string | number
1144
- innerError: {
1145
- errorCode: string | number
1146
- errorMsg: string
1147
- }
1148
- }) => void
1149
- }): void
1150
-
1151
- /**
1152
- * 获取子设备信息
1153
- */
1154
- export function getSubDeviceInfoList(params: {
1155
- /** 网关设备id或上级节点id */
1156
- meshId: string
1157
- complete?: () => void
1158
- success?: (params: DeviceInfo[]) => void
1159
- fail?: (params: {
1160
- errorMsg: string
1161
- errorCode: string | number
1162
- innerError: {
1163
- errorCode: string | number
1164
- errorMsg: string
1165
- }
1166
- }) => void
1167
- }): void
1168
-
1169
- /**
1170
- * 判断设备上网类型是否与deviceModel物模型一致
1171
- */
1172
- export function validDeviceOnlineType(params: {
1173
- /** 设备id */
1174
- deviceId: string
1175
- /**
1176
- * 设备在线类型,
1177
- * Wi-Fi online 1 << 0
1178
- * Local online 1 << 1
1179
- * Bluetooth LE online 1 << 2
1180
- * Bluetooth LE mesh online 1 << 3
1181
- */
1182
- onlineType: number
1183
- complete?: () => void
1184
- success?: (params: boolean) => void
1185
- fail?: (params: {
1186
- errorMsg: string
1187
- errorCode: string | number
1188
- innerError: {
1189
- errorCode: string | number
1190
- errorMsg: string
1191
- }
1192
- }) => void
1193
- }): void
1194
-
1195
- /**
1196
- * 发送 dps
1197
- */
1198
- export function publishDps(params: {
1199
- /** 设备id */
1200
- deviceId: string
1201
- /** dps */
1202
- dps: Record<string, {}>
1203
- /**
1204
- * 下发通道类型
1205
- * 0: 局域网
1206
- * 1: 网络
1207
- * 2: 自动
1208
- */
1209
- mode: number
1210
- /**
1211
- * 下发通道的优先级
1212
- * LAN = 0, // LAN
1213
- * MQTT = 1, // MQTT
1214
- * HTTP = 2, // Http
1215
- * BLE = 3, // Single Point Bluetooth
1216
- * SIGMesh = 4, // Sig Mesh
1217
- * BLEMesh = 5, // Tuya Private Mesh
1218
- * BLEBeacon = 6, // Beacon
1219
- */
1220
- pipelines: number[]
1221
- /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
1222
- options: Record<string, {}>
1223
- complete?: () => void
1224
- success?: (params: boolean) => void
1225
- fail?: (params: {
1226
- errorMsg: string
1227
- errorCode: string | number
1228
- innerError: {
1229
- errorCode: string | number
1230
- errorMsg: string
1231
- }
1232
- }) => void
1233
- }): void
1234
-
1235
- /**
1236
- * 发送 标准dp
1237
- */
1238
- export function publishCommands(params: {
1239
- /** 设备id */
1240
- deviceId: string
1241
- /** dps */
1242
- dps: Record<string, {}>
1243
- /**
1244
- * 下发通道类型
1245
- * 0: 局域网
1246
- * 1: 网络
1247
- * 2: 自动
1248
- */
1249
- mode: number
1250
- /**
1251
- * 下发通道的优先级
1252
- * LAN = 0, // LAN
1253
- * MQTT = 1, // MQTT
1254
- * HTTP = 2, // Http
1255
- * BLE = 3, // Single Point Bluetooth
1256
- * SIGMesh = 4, // Sig Mesh
1257
- * BLEMesh = 5, // Tuya Private Mesh
1258
- * BLEBeacon = 6, // Beacon
1259
- */
1260
- pipelines: number[]
1261
- /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
1262
- options: Record<string, {}>
1263
- complete?: () => void
1264
- success?: (params: boolean) => void
1265
- fail?: (params: {
1266
- errorMsg: string
1267
- errorCode: string | number
1268
- innerError: {
1269
- errorCode: string | number
1270
- errorMsg: string
1271
- }
1272
- }) => void
1273
- }): void
1274
-
1275
- /**
1276
- * 指定通道发送dps控制指令
1277
- */
1278
- export function publishDpsWithPipeType(params: {
1279
- /** 设备id */
1280
- deviceId: string
1281
- /** dps */
1282
- dps: Record<string, {}>
1283
- /**
1284
- * 下发通道类型
1285
- * 0: 局域网
1286
- * 1: 网络
1287
- * 2: 自动
1288
- */
1289
- mode: number
1290
- /**
1291
- * 下发通道的优先级
1292
- * LAN = 0, // LAN
1293
- * MQTT = 1, // MQTT
1294
- * HTTP = 2, // Http
1295
- * BLE = 3, // Single Point Bluetooth
1296
- * SIGMesh = 4, // Sig Mesh
1297
- * BLEMesh = 5, // Tuya Private Mesh
1298
- * BLEBeacon = 6, // Beacon
1299
- */
1300
- pipelines: number[]
1301
- /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
1302
- options: Record<string, {}>
1303
- complete?: () => void
1304
- success?: (params: boolean) => void
1305
- fail?: (params: {
1306
- errorMsg: string
1307
- errorCode: string | number
1308
- innerError: {
1309
- errorCode: string | number
1310
- errorMsg: string
1311
- }
1312
- }) => void
1313
- }): void
1314
-
1315
- /**
1316
- * 查询 dps
1317
- */
1318
- export function queryDps(params: {
1319
- /** 设备id */
1320
- deviceId: string
1321
- /** dpids 数组 */
1322
- dpIds: number[]
1323
- complete?: () => void
1324
- success?: (params: boolean) => void
1325
- fail?: (params: {
1326
- errorMsg: string
1327
- errorCode: string | number
1328
- innerError: {
1329
- errorCode: string | number
1330
- errorMsg: string
1331
- }
1332
- }) => void
1333
- }): void
1334
-
1335
- /**
1336
- * 通过 MQTT 消息通道下发消息
1337
- */
1338
- export function publishMqttMessage(params: {
1339
- /** 消息内容 */
1340
- message: Record<string, {}>
1341
- /** 设备id */
1342
- deviceId: string
1343
- /** 协议号 */
1344
- protocol: number
1345
- /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
1346
- options: Record<string, {}>
1347
- complete?: () => void
1348
- success?: (params: boolean) => void
1349
- fail?: (params: {
1350
- errorMsg: string
1351
- errorCode: string | number
1352
- innerError: {
1353
- errorCode: string | number
1354
- errorMsg: string
1355
- }
1356
- }) => void
1357
- }): void
1358
-
1359
- /**
1360
- * 通过 局域网 消息通道下发消息
1361
- */
1362
- export function publishLanMessage(params: {
1363
- /** 消息内容 */
1364
- message: string
1365
- /** 设备id */
1366
- deviceId: string
1367
- /** 协议号 */
1368
- protocol: number
1369
- /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
1370
- options?: Record<string, {}>
1371
- complete?: () => void
1372
- success?: (params: boolean) => void
1373
- fail?: (params: {
1374
- errorMsg: string
1375
- errorCode: string | number
1376
- innerError: {
1377
- errorCode: string | number
1378
- errorMsg: string
1379
- }
1380
- }) => void
1381
- }): void
1382
-
1383
- /**
1384
- * 通过 Socket 消息通道下发消息
1385
- */
1386
- export function publishSocketMessage(params: {
1387
- /** 消息内容 */
1388
- message: Record<string, {}>
1389
- /** 设备id */
1390
- deviceId: string
1391
- /** 局域网消息 type */
1392
- type: number
1393
- /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
1394
- options: Record<string, {}>
1395
- complete?: () => void
1396
- success?: (params: boolean) => void
1397
- fail?: (params: {
1398
- errorMsg: string
1399
- errorCode: string | number
1400
- innerError: {
1401
- errorCode: string | number
1402
- errorMsg: string
1403
- }
1404
- }) => void
1405
- }): void
1406
-
1407
- /**
1408
- * 获取设备属性
1409
- */
1410
- export function getDeviceProperty(params: {
1411
- /**
1412
- * deviceId 设备id
1413
- * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
1414
- */
1415
- deviceId: string
1416
- /** dps 科学变化的数据 */
1417
- dps?: Record<string, {}>
1418
- complete?: () => void
1419
- success?: (params: {
1420
- /** the properties map */
1421
- properties: Record<string, Object>
1422
- }) => void
1423
- fail?: (params: {
1424
- errorMsg: string
1425
- errorCode: string | number
1426
- innerError: {
1427
- errorCode: string | number
1428
- errorMsg: string
1429
- }
1430
- }) => void
1431
- }): void
1432
-
1433
- /**
1434
- * 设置设备属性
1435
- */
1436
- export function setDeviceProperty(params: {
1437
- /** deviceId */
1438
- deviceId: string
1439
- /** the custom data key */
1440
- code: string
1441
- /** the custom data value */
1442
- value: string
1443
- complete?: () => void
1444
- success?: (params: {
1445
- /** deviceId */
1446
- deviceId: string
1447
- /** set DeviceProperty successfully */
1448
- result: boolean
1449
- }) => void
1450
- fail?: (params: {
1451
- errorMsg: string
1452
- errorCode: string | number
1453
- innerError: {
1454
- errorCode: string | number
1455
- errorMsg: string
1456
- }
1457
- }) => void
1458
- }): void
1459
-
1460
- /**
1461
- * 同步设备信息
1462
- */
1463
- export function syncDeviceInfo(params: {
1464
- /** 设备id */
1465
- deviceId: string
1466
- complete?: () => void
1467
- success?: (params: null) => void
1468
- fail?: (params: {
1469
- errorMsg: string
1470
- errorCode: string | number
1471
- innerError: {
1472
- errorCode: string | number
1473
- errorMsg: string
1474
- }
1475
- }) => void
1476
- }): void
1477
-
1478
- /**
1479
- * 订阅设备移除事件
1480
- */
1481
- export function subscribeDeviceRemoved(params: {
1482
- /** 设备id */
1483
- deviceId: string
1484
- complete?: () => void
1485
- success?: (params: null) => void
1486
- fail?: (params: {
1487
- errorMsg: string
1488
- errorCode: string | number
1489
- innerError: {
1490
- errorCode: string | number
1491
- errorMsg: string
1492
- }
1493
- }) => void
1494
- }): void
1495
-
1496
- /**
1497
- * 取消订阅设备移除事件
1498
- */
1499
- export function unSubscribeDeviceRemoved(params: {
1500
- /** 设备id */
1501
- deviceId: string
1502
- complete?: () => void
1503
- success?: (params: null) => void
1504
- fail?: (params: {
1505
- errorMsg: string
1506
- errorCode: string | number
1507
- innerError: {
1508
- errorCode: string | number
1509
- errorMsg: string
1510
- }
1511
- }) => void
1512
- }): void
1513
-
1514
- /**
1515
- * 注册设备的MQTT信息监听
1516
- */
1517
- export function registerMQTTDeviceListener(params: {
1518
- /**
1519
- * deviceId 设备id
1520
- * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
1521
- */
1522
- deviceId: string
1523
- complete?: () => void
1524
- success?: (params: null) => void
1525
- fail?: (params: {
1526
- errorMsg: string
1527
- errorCode: string | number
1528
- innerError: {
1529
- errorCode: string | number
1530
- errorMsg: string
1531
- }
1532
- }) => void
1533
- }): void
1534
-
1535
- /**
1536
- * 注销设备的MQTT信息监听
1537
- */
1538
- export function unregisterMQTTDeviceListener(params: {
1539
- /**
1540
- * deviceId 设备id
1541
- * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
1542
- */
1543
- deviceId: string
1544
- complete?: () => void
1545
- success?: (params: null) => void
1546
- fail?: (params: {
1547
- errorMsg: string
1548
- errorCode: string | number
1549
- innerError: {
1550
- errorCode: string | number
1551
- errorMsg: string
1552
- }
1553
- }) => void
1554
- }): void
1555
-
1556
- /**
1557
- * 注册MQTT协议监听
1558
- */
1559
- export function registerMQTTProtocolListener(params: {
1560
- /**
1561
- * protocol 协议号
1562
- * MQTT预定义的协议号
1563
- */
1564
- protocol: number
1565
- complete?: () => void
1566
- success?: (params: null) => void
1567
- fail?: (params: {
1568
- errorMsg: string
1569
- errorCode: string | number
1570
- innerError: {
1571
- errorCode: string | number
1572
- errorMsg: string
1573
- }
1574
- }) => void
1575
- }): void
1576
-
1577
- /**
1578
- * 注销MQTT协议监听
1579
- */
1580
- export function unregisterMQTTProtocolListener(params: {
1581
- /**
1582
- * protocol 协议号
1583
- * MQTT预定义的协议号
1584
- */
1585
- protocol: number
1586
- complete?: () => void
1587
- success?: (params: null) => void
1588
- fail?: (params: {
1589
- errorMsg: string
1590
- errorCode: string | number
1591
- innerError: {
1592
- errorCode: string | number
1593
- errorMsg: string
1594
- }
1595
- }) => void
1596
- }): void
1597
-
1598
- /**
1599
- * 注册需要监听的设备列表的监听器
1600
- */
1601
- export function registerDeviceListListener(params: {
1602
- /** 需注册的设备列表 */
1603
- deviceIdList: string[]
1604
- complete?: () => void
1605
- success?: (params: null) => void
1606
- fail?: (params: {
1607
- errorMsg: string
1608
- errorCode: string | number
1609
- innerError: {
1610
- errorCode: string | number
1611
- errorMsg: string
1612
- }
1613
- }) => void
1614
- }): void
1615
-
1616
- /**
1617
- * 注销需要监听的设备列表的监听器
1618
- */
1619
- export function unregisterDeviceListListener(params?: {
1620
- complete?: () => void
1621
- success?: (params: null) => void
1622
- fail?: (params: {
1623
- errorMsg: string
1624
- errorCode: string | number
1625
- innerError: {
1626
- errorCode: string | number
1627
- errorMsg: string
1628
- }
1629
- }) => void
1630
- }): void
1631
-
1632
- /**
1633
- * 检查固件升级信息
1634
- */
1635
- export function checkOTAUpdateInfo(params: {
1636
- /**
1637
- * deviceId
1638
- * 设备 id
1639
- */
1640
- deviceId: string
1641
- complete?: () => void
1642
- success?: (params: null) => void
1643
- fail?: (params: {
1644
- errorMsg: string
1645
- errorCode: string | number
1646
- innerError: {
1647
- errorCode: string | number
1648
- errorMsg: string
1649
- }
1650
- }) => void
1651
- }): void
1652
-
1653
- /**
1654
- * 跳转设备详情
1655
- */
1656
- export function openDeviceDetailPage(params: {
1657
- /**
1658
- * deviceId
1659
- * 设备 id
1660
- */
1661
- deviceId: string
1662
- complete?: () => void
1663
- success?: (params: null) => void
1664
- fail?: (params: {
1665
- errorMsg: string
1666
- errorCode: string | number
1667
- innerError: {
1668
- errorCode: string | number
1669
- errorMsg: string
1670
- }
1671
- }) => void
1672
- }): void
1673
-
1674
- /**
1675
- * 跳转群组详情
1676
- */
1677
- export function openGroupDetailPage(params: {
1678
- /**
1679
- * groupId
1680
- * 群组 id
1681
- */
1682
- groupId: string
1683
- complete?: () => void
1684
- success?: (params: null) => void
1685
- fail?: (params: {
1686
- errorMsg: string
1687
- errorCode: string | number
1688
- innerError: {
1689
- errorCode: string | number
1690
- errorMsg: string
1691
- }
1692
- }) => void
1693
- }): void
1694
-
1695
- /**
1696
- * 跳转定时界面
1697
- */
1698
- export function openTimerPage(params: {
1699
- /**
1700
- * deviceId
1701
- * 设备 id ,deviceId 和 groupId 至少传一个
1702
- */
1703
- deviceId: string
1704
- /**
1705
- * category
1706
- * 定时分类
1707
- */
1708
- category: string
1709
- /**
1710
- * repeat
1711
- * 0表示需要选择重复,1表示不需要
1712
- */
1713
- repeat?: number
1714
- /**
1715
- * data
1716
- * dp 数据
1717
- * {
1718
- * "dpName": dp 点名称,string
1719
- * "dpId": dp 点 id,string
1720
- * "selected": dp 点默认值的 index,t.Integer
1721
- * "rangeKeys": dp 点的值范围,Array<object>
1722
- * "rangeValues": dp 点的显示数据范围,Array<string>
1723
- * }
1724
- */
1725
- data: {}[]
1726
- /**
1727
- * timerConfig
1728
- * UI配置
1729
- */
1730
- timerConfig?: TimerConfig
1731
- complete?: () => void
1732
- success?: (params: null) => void
1733
- fail?: (params: {
1734
- errorMsg: string
1735
- errorCode: string | number
1736
- innerError: {
1737
- errorCode: string | number
1738
- errorMsg: string
1739
- }
1740
- }) => void
1741
- }): void
1742
-
1743
- /**
1744
- * 跳转定时界面
1058
+ * 跳转定时界面
1745
1059
  */
1746
1060
  export function openGroupTimerPage(params: {
1747
1061
  /**
@@ -2265,15 +1579,217 @@ declare namespace ty.device {
2265
1579
  */
2266
1580
  export function getSupportedThirdPartyServices(params: {
2267
1581
  /**
2268
- * deviceId
2269
- * 设备 id
1582
+ * deviceId
1583
+ * 设备 id
1584
+ */
1585
+ deviceId: string
1586
+ complete?: () => void
1587
+ success?: (params: {
1588
+ /** 服务列表 */
1589
+ services: ThirdPartyService[]
1590
+ }) => void
1591
+ fail?: (params: {
1592
+ errorMsg: string
1593
+ errorCode: string | number
1594
+ innerError: {
1595
+ errorCode: string | number
1596
+ errorMsg: string
1597
+ }
1598
+ }) => void
1599
+ }): void
1600
+
1601
+ /**
1602
+ * 获取群组下设备列表
1603
+ */
1604
+ export function getGroupDeviceList(params: {
1605
+ /** 群组id */
1606
+ groupId: string
1607
+ complete?: () => void
1608
+ success?: (params: {
1609
+ /** groupId 群组id */
1610
+ groupId: string
1611
+ /** deviceList 设备列表 */
1612
+ deviceList: DeviceInfo[]
1613
+ }) => void
1614
+ fail?: (params: {
1615
+ errorMsg: string
1616
+ errorCode: string | number
1617
+ innerError: {
1618
+ errorCode: string | number
1619
+ errorMsg: string
1620
+ }
1621
+ }) => void
1622
+ }): void
1623
+
1624
+ /**
1625
+ * 获取群组下设备数量
1626
+ */
1627
+ export function getGroupDeviceNum(params: {
1628
+ /** 群组id */
1629
+ groupId: string
1630
+ complete?: () => void
1631
+ success?: (params: {
1632
+ /** groupId 群组id */
1633
+ groupId: string
1634
+ /** devieNum 设备数量 */
1635
+ devieNum: number
1636
+ }) => void
1637
+ fail?: (params: {
1638
+ errorMsg: string
1639
+ errorCode: string | number
1640
+ innerError: {
1641
+ errorCode: string | number
1642
+ errorMsg: string
1643
+ }
1644
+ }) => void
1645
+ }): void
1646
+
1647
+ /**
1648
+ * 根据dpCode获取群组下具备此dpCode的设备数量。如果是一个分享的群组,请通过接口获取。
1649
+ */
1650
+ export function getDeviceNumWithDpCode(params: {
1651
+ /** groupId 群组id */
1652
+ groupId: string
1653
+ /** dpCode内容 */
1654
+ dpCode: string
1655
+ complete?: () => void
1656
+ success?: (params: {
1657
+ /** groupId 群组id */
1658
+ groupId: string
1659
+ /** devieNum 设备数量 */
1660
+ devieNum: number
1661
+ }) => void
1662
+ fail?: (params: {
1663
+ errorMsg: string
1664
+ errorCode: string | number
1665
+ innerError: {
1666
+ errorCode: string | number
1667
+ errorMsg: string
1668
+ }
1669
+ }) => void
1670
+ }): void
1671
+
1672
+ /**
1673
+ * 通过dpCode下发控制指令
1674
+ */
1675
+ export function publishGroupDpCodes(params: {
1676
+ /** groupId 群组id */
1677
+ groupId: string
1678
+ /**
1679
+ * dp信息
1680
+ * 示例: dpCodes: {"switch" : true}
1681
+ */
1682
+ dpCodes: Record<string, Object>
1683
+ complete?: () => void
1684
+ success?: (params: null) => void
1685
+ fail?: (params: {
1686
+ errorMsg: string
1687
+ errorCode: string | number
1688
+ innerError: {
1689
+ errorCode: string | number
1690
+ errorMsg: string
1691
+ }
1692
+ }) => void
1693
+ }): void
1694
+
1695
+ /**
1696
+ * mesh群组控制(仅用于单设备面板中的群控,如PIR传感器面板)
1697
+ */
1698
+ export function publishSigMeshMultiDps(params: {
1699
+ /** groupId 群组id */
1700
+ groupId: string
1701
+ /** localId 群组本地标识 */
1702
+ localId: string
1703
+ /**
1704
+ * dp信息
1705
+ * 示例: dps: {"1" : true}
1706
+ */
1707
+ dps: Record<string, {}>
1708
+ /** pcc mesh设备品类 */
1709
+ pcc: string
1710
+ complete?: () => void
1711
+ success?: (params: null) => void
1712
+ fail?: (params: {
1713
+ errorMsg: string
1714
+ errorCode: string | number
1715
+ innerError: {
1716
+ errorCode: string | number
1717
+ errorMsg: string
1718
+ }
1719
+ }) => void
1720
+ }): void
1721
+
1722
+ /**
1723
+ * 跳转本地mesh群组
1724
+ */
1725
+ export function openMeshLocalGroup(params: {
1726
+ /**
1727
+ * 整体说明
1728
+ * 支持2个版本:
1729
+ * 1、本地版本仅支持根据vendorIds进行过滤,为本地逻辑,设备列表APP本地根据meshCategory进行比对过滤,群组结果保存在设备上,云端不参与群组的列表获取与保存。
1730
+ * 2、云端版本支持根据pccs或者codes进行过滤,为云端逻辑,设备列表获取及群组设备关系保存在云端。
1731
+ * 本地版本参数:
1732
+ * {
1733
+ * "localId": "203a",
1734
+ * "vendorIds": "1F10,2F10"
1735
+ * }
1736
+ * 云端版本参数:
1737
+ * 1、pcc过滤,相当于旧版本的vendorIds
1738
+ * {
1739
+ * "localId": "203a",
1740
+ * "type": "0",
1741
+ * "pccs": ["1210"],
1742
+ * "categoryCode": "7001"
1743
+ * }
1744
+ * 2、code过滤,根据二级品类进行过滤,目前云端只支持ykq和gykzq这两种遥控器
1745
+ * {
1746
+ * "localId": "203a",
1747
+ * "type": "1",
1748
+ * "codes": ["xxxx"],
1749
+ * "categoryCode": "7001"
1750
+ * }
1751
+ * 关于categoryCode:categoryCode 并非三级品类,与localId匹配范围为7001-7008;localId 为云端分配,步长为8,因此一个遥控器内部最多支持关联8个群组,localid为初始值依次+1,与之匹配的categoryCode从7001依次+1.
1752
+ * vendorIds 必传 可以为空字符串
1753
+ * devId 遥控器设备id
1754
+ */
1755
+ deviceId: string
1756
+ /** localId 群组本地标识 */
1757
+ localId: string
1758
+ /**
1759
+ * 遥控器群组本地版本,使用功能此参数,云端版本传空字符串
1760
+ * vendorIds 使用meshCategory进行设备列表筛选
1761
+ * 示例:vendorIds: "1F10,2F10"
1762
+ */
1763
+ vendorIds: string
1764
+ /**
1765
+ * 遥控器群组云端版本,使用此功能参数
1766
+ * type 筛选条件 0:pccs过滤,1:codes过滤
1767
+ */
1768
+ type?: string
1769
+ /**
1770
+ * 遥控器群组云端版本,使用此功能参数
1771
+ * pccs 使用meshCategory进行设备列表筛选
1772
+ * 示例:pccs: ["1F10","2F10"]
1773
+ */
1774
+ pccs?: string[]
1775
+ /**
1776
+ * 遥控器群组云端版本,使用此功能参数
1777
+ * codes 使用二级品类进行设备列表筛选
1778
+ * 示例:pccs: ["1F10","2F10"]
1779
+ */
1780
+ codes?: string[]
1781
+ /**
1782
+ * categoryCode 并非三级品类,与localId匹配范围为7001-7008;
1783
+ * localId 为云端分配,步长为8,因此一个遥控器内部最多支持关联8个群组,localid为初始值依次+1,与之匹配的categoryCode从7001依次+1.
1784
+ */
1785
+ categoryCode?: string
1786
+ /**
1787
+ * 是否支持低功耗,部分无线开关需要用到
1788
+ * 默认值:false
2270
1789
  */
2271
- deviceId: string
1790
+ isSupportLowPower?: boolean
2272
1791
  complete?: () => void
2273
- success?: (params: {
2274
- /** 服务列表 */
2275
- services: ThirdPartyService[]
2276
- }) => void
1792
+ success?: (params: null) => void
2277
1793
  fail?: (params: {
2278
1794
  errorMsg: string
2279
1795
  errorCode: string | number
@@ -2346,7 +1862,7 @@ declare namespace ty.device {
2346
1862
  /** The custom DP name. */
2347
1863
  dpName: {}
2348
1864
  /** The device list. */
2349
- deviceList: DeviceInfo_mScpag[]
1865
+ deviceList: DeviceInfo[]
2350
1866
  /** The local short address of groups. */
2351
1867
  localId: string
2352
1868
  /** The subclass. */
@@ -2468,6 +1984,49 @@ declare namespace ty.device {
2468
1984
  }) => void
2469
1985
  }): void
2470
1986
 
1987
+ /**
1988
+ * 通过nodeId获取子设备的设备Id
1989
+ */
1990
+ export function getMeshDeviceId(params: {
1991
+ /** nodeId */
1992
+ nodeId: string
1993
+ /** deviceId 网关id */
1994
+ deviceId: string
1995
+ complete?: () => void
1996
+ success?: (params: {
1997
+ /** 设备id */
1998
+ deviceId: string
1999
+ }) => void
2000
+ fail?: (params: {
2001
+ errorMsg: string
2002
+ errorCode: string | number
2003
+ innerError: {
2004
+ errorCode: string | number
2005
+ errorMsg: string
2006
+ }
2007
+ }) => void
2008
+ }): void
2009
+
2010
+ /**
2011
+ * 获取mesh子子设备的dp数据
2012
+ */
2013
+ export function getDpDataByMesh(params: {
2014
+ /** 设备模型 设备id */
2015
+ deviceId: string
2016
+ /** dpId */
2017
+ dpIds: Object[]
2018
+ complete?: () => void
2019
+ success?: (params: null) => void
2020
+ fail?: (params: {
2021
+ errorMsg: string
2022
+ errorCode: string | number
2023
+ innerError: {
2024
+ errorCode: string | number
2025
+ errorMsg: string
2026
+ }
2027
+ }) => void
2028
+ }): void
2029
+
2471
2030
  /**
2472
2031
  * 获取设备的固件版本状态
2473
2032
  */
@@ -2533,7 +2092,14 @@ declare namespace ty.device {
2533
2092
  initialProps?: Record<string, {}>
2534
2093
  complete?: () => void
2535
2094
  success?: (params: null) => void
2536
- fail?: (params: {}) => void
2095
+ fail?: (params: {
2096
+ errorMsg: string
2097
+ errorCode: string | number
2098
+ innerError: {
2099
+ errorCode: string | number
2100
+ errorMsg: string
2101
+ }
2102
+ }) => void
2537
2103
  }): void
2538
2104
 
2539
2105
  /**
@@ -2668,56 +2234,80 @@ declare namespace ty.device {
2668
2234
  }): void
2669
2235
 
2670
2236
  /**
2671
- * BLE(tuya)连接状态变更通知事件
2237
+ * 远离beacon设备的事件
2238
+ */
2239
+ export function onLeaveBeaconFence(listener: (params: LeaveBeaconFenceEvent) => void): void
2240
+
2241
+ /**
2242
+ * 取消监听:远离beacon设备的事件
2672
2243
  */
2673
- export function onTYBLEConnectStatusChange(
2674
- listener: (params: TYBLEConnectStatusEvent) => void
2244
+ export function offLeaveBeaconFence(listener: (params: LeaveBeaconFenceEvent) => void): void
2245
+
2246
+ /**
2247
+ * 传输文件的到蓝牙设备的进度事件
2248
+ */
2249
+ export function onFileTransferProgress(
2250
+ listener: (params: FileTransferProgressResult) => void
2675
2251
  ): void
2676
2252
 
2677
2253
  /**
2678
- * BLE(tuya)连接状态变更通知事件
2254
+ * 取消监听:传输文件的到蓝牙设备的进度事件
2679
2255
  */
2680
- export function offTYBLEConnectStatusChange(
2681
- listener: (params: TYBLEConnectStatusEvent) => void
2256
+ export function offFileTransferProgress(
2257
+ listener: (params: FileTransferProgressResult) => void
2682
2258
  ): void
2683
2259
 
2684
2260
  /**
2685
- * BLE(tuya)设备数据透传通道上报通知
2261
+ * BLE(thing)连接状态变更通知事件
2686
2262
  */
2687
- export function onTYBLETransparentDataReport(
2688
- listener: (params: TYBLETransparentDataBean) => void
2263
+ export function onBLEConnectStatusChange(
2264
+ listener: (params: ThingBLEConnectStatusEvent) => void
2689
2265
  ): void
2690
2266
 
2691
2267
  /**
2692
- * BLE(tuya)设备数据透传通道上报通知
2268
+ * 取消监听:BLE(thing)连接状态变更通知事件
2693
2269
  */
2694
- export function offTYBLETransparentDataReport(
2695
- listener: (params: TYBLETransparentDataBean) => void
2270
+ export function offBLEConnectStatusChange(
2271
+ listener: (params: ThingBLEConnectStatusEvent) => void
2696
2272
  ): void
2697
2273
 
2698
2274
  /**
2699
- * BLE(tuya)大数据通道传输进度
2275
+ * BLE(thing)设备数据透传通道上报通知
2700
2276
  */
2701
- export function onTYBLEBigDataChannelProgressEvent(
2702
- listener: (params: TYBLEBigDataProgressEvent) => void
2277
+ export function onBLETransparentDataReport(
2278
+ listener: (params: ThingBLETransparentDataBean) => void
2703
2279
  ): void
2704
2280
 
2705
2281
  /**
2706
- * BLE(tuya)大数据通道传输进度
2282
+ * 取消监听:BLE(thing)设备数据透传通道上报通知
2707
2283
  */
2708
- export function offTYBLEBigDataChannelProgressEvent(
2709
- listener: (params: TYBLEBigDataProgressEvent) => void
2284
+ export function offBLETransparentDataReport(
2285
+ listener: (params: ThingBLETransparentDataBean) => void
2710
2286
  ): void
2711
2287
 
2712
2288
  /**
2713
- * 扫描到设备后进行通知
2289
+ * BLE(thing)大数据通道传输进度
2714
2290
  */
2715
- export function onTYBLEScanBindDevice(listener: (params: TYBLEScanDeviceEvent) => void): void
2291
+ export function onBLEBigDataChannelProgressEvent(
2292
+ listener: (params: ThingBLEBigDataProgressEvent) => void
2293
+ ): void
2294
+
2295
+ /**
2296
+ * 取消监听:BLE(thing)大数据通道传输进度
2297
+ */
2298
+ export function offBLEBigDataChannelProgressEvent(
2299
+ listener: (params: ThingBLEBigDataProgressEvent) => void
2300
+ ): void
2716
2301
 
2717
2302
  /**
2718
2303
  * 扫描到设备后进行通知
2719
2304
  */
2720
- export function offTYBLEScanBindDevice(listener: (params: TYBLEScanDeviceEvent) => void): void
2305
+ export function onBLEScanBindDevice(listener: (params: ThingBLEScanDeviceEvent) => void): void
2306
+
2307
+ /**
2308
+ * 取消监听:扫描到设备后进行通知
2309
+ */
2310
+ export function offBLEScanBindDevice(listener: (params: ThingBLEScanDeviceEvent) => void): void
2721
2311
 
2722
2312
  /**
2723
2313
  * 大数据从设备传输到App成功的事件
@@ -2727,7 +2317,7 @@ declare namespace ty.device {
2727
2317
  ): void
2728
2318
 
2729
2319
  /**
2730
- * 大数据从设备传输到App成功的事件
2320
+ * 取消监听:大数据从设备传输到App成功的事件
2731
2321
  */
2732
2322
  export function offBLEBigDataChannelDeviceToAppSuccess(
2733
2323
  listener: (params: BLEBigDataChannelDeviceToAppSuccessResponse) => void
@@ -2737,25 +2327,25 @@ declare namespace ty.device {
2737
2327
  * 大数据上传到云端进度的事件
2738
2328
  */
2739
2329
  export function onBLEBigDataChannelUploadCloudProgress(
2740
- listener: (params: TYBLEBigDataProgressEvent) => void
2330
+ listener: (params: ThingBLEBigDataProgressEvent) => void
2741
2331
  ): void
2742
2332
 
2743
2333
  /**
2744
- * 大数据上传到云端进度的事件
2334
+ * 取消监听:大数据上传到云端进度的事件
2745
2335
  */
2746
2336
  export function offBLEBigDataChannelUploadCloudProgress(
2747
- listener: (params: TYBLEBigDataProgressEvent) => void
2337
+ listener: (params: ThingBLEBigDataProgressEvent) => void
2748
2338
  ): void
2749
2339
 
2750
2340
  /**
2751
2341
  * 子设备配网结果事件
2752
2342
  */
2753
- export function onSubDeviceInfoUpdateEvent(listener: (params: Device) => void): void
2343
+ export function onSubDeviceInfoUpdateEvent(listener: (params: GWActivationRespond) => void): void
2754
2344
 
2755
2345
  /**
2756
- * 子设备配网结果事件
2346
+ * 取消监听:子设备配网结果事件
2757
2347
  */
2758
- export function offSubDeviceInfoUpdateEvent(listener: (params: Device) => void): void
2348
+ export function offSubDeviceInfoUpdateEvent(listener: (params: GWActivationRespond) => void): void
2759
2349
 
2760
2350
  /**
2761
2351
  * 免配网-设备扫描结果事件
@@ -2765,81 +2355,41 @@ declare namespace ty.device {
2765
2355
  ): void
2766
2356
 
2767
2357
  /**
2768
- * 免配网-设备扫描结果事件
2358
+ * 取消监听:免配网-设备扫描结果事件
2769
2359
  */
2770
2360
  export function offDirectlyConnectedSearchDeviceEvent(
2771
2361
  listener: (params: DirectlyConnectedSearchRespond) => void
2772
2362
  ): void
2773
2363
 
2774
2364
  /**
2775
- * dp点变更
2776
- */
2777
- export function onDpDataChange(listener: (params: DpsChanged) => void): void
2778
-
2779
- /**
2780
- * dp点变更
2781
- */
2782
- export function offDpDataChange(listener: (params: DpsChanged) => void): void
2783
-
2784
- /**
2785
- * MQTT消息通道消息上报
2786
- */
2787
- export function onMqttMessageReceived(listener: (params: MqttResponse) => void): void
2788
-
2789
- /**
2790
- * MQTT消息通道消息上报
2791
- */
2792
- export function offMqttMessageReceived(listener: (params: MqttResponse) => void): void
2793
-
2794
- /**
2795
- * socket消息通道消息上报
2796
- */
2797
- export function onSocketMessageReceived(listener: (params: SocketResponse) => void): void
2798
-
2799
- /**
2800
- * socket消息通道消息上报
2801
- */
2802
- export function offSocketMessageReceived(listener: (params: SocketResponse) => void): void
2803
-
2804
- /**
2805
- * 设备上下线状态变更
2806
- */
2807
- export function onDeviceOnlineStatusUpdate(listener: (params: Online) => void): void
2808
-
2809
- /**
2810
- * 设备上下线状态变更
2811
- */
2812
- export function offDeviceOnlineStatusUpdate(listener: (params: Online) => void): void
2813
-
2814
- /**
2815
- * 设备 dp 名字和设备名字触发
2365
+ * 定时变化事件
2816
2366
  */
2817
- export function onDeviceInfoUpdated(listener: (params: Device_elDqwU) => void): void
2367
+ export function onTimerUpdate(listener: (params: {}) => void): void
2818
2368
 
2819
2369
  /**
2820
- * 设备 dp 名字和设备名字触发
2370
+ * 取消监听:定时变化事件
2821
2371
  */
2822
- export function offDeviceInfoUpdated(listener: (params: Device_elDqwU) => void): void
2372
+ export function offTimerUpdate(listener: (params: {}) => void): void
2823
2373
 
2824
2374
  /**
2825
- * 设备移除事件
2375
+ * 群组内增加/移除设备事件
2826
2376
  */
2827
- export function onDeviceRemoved(listener: (params: OnDeviceRemovedBody) => void): void
2377
+ export function onGroupInfoChange(listener: (params: GroupInfoResponse) => void): void
2828
2378
 
2829
2379
  /**
2830
- * 设备移除事件
2380
+ * 取消监听:群组内增加/移除设备事件
2831
2381
  */
2832
- export function offDeviceRemoved(listener: (params: OnDeviceRemovedBody) => void): void
2382
+ export function offGroupInfoChange(listener: (params: GroupInfoResponse) => void): void
2833
2383
 
2834
2384
  /**
2835
- * 定时变化事件
2385
+ * 群组dpCode变化事件
2836
2386
  */
2837
- export function onTimerUpdate(listener: (params: {}) => void): void
2387
+ export function onGroupDpCodeChange(listener: (params: GroupDpCodeBean) => void): void
2838
2388
 
2839
2389
  /**
2840
- * 定时变化事件
2390
+ * 取消监听:群组dpCode变化事件
2841
2391
  */
2842
- export function offTimerUpdate(listener: (params: {}) => void): void
2392
+ export function offGroupDpCodeChange(listener: (params: GroupDpCodeBean) => void): void
2843
2393
 
2844
2394
  /**
2845
2395
  * 群组移除事件
@@ -2847,7 +2397,7 @@ declare namespace ty.device {
2847
2397
  export function onGroupRemovedEvent(listener: (params: GroupBean) => void): void
2848
2398
 
2849
2399
  /**
2850
- * 群组移除事件
2400
+ * 取消监听:群组移除事件
2851
2401
  */
2852
2402
  export function offGroupRemovedEvent(listener: (params: GroupBean) => void): void
2853
2403
 
@@ -2857,7 +2407,7 @@ declare namespace ty.device {
2857
2407
  export function onGroupDpDataChangeEvent(listener: (params: GroupDpDataBean) => void): void
2858
2408
 
2859
2409
  /**
2860
- * 群组DP变更事件
2410
+ * 取消监听:群组DP变更事件
2861
2411
  */
2862
2412
  export function offGroupDpDataChangeEvent(listener: (params: GroupDpDataBean) => void): void
2863
2413
 
@@ -2869,7 +2419,7 @@ declare namespace ty.device {
2869
2419
  ): void
2870
2420
 
2871
2421
  /**
2872
- * 接收物模型消息事件。只有subscribeReceivedThingModelMessage订阅了,才会收到该事件。
2422
+ * 取消监听:接收物模型消息事件。只有subscribeReceivedThingModelMessage订阅了,才会收到该事件。
2873
2423
  */
2874
2424
  export function offReceivedThingModelMessage(
2875
2425
  listener: (params: OnReceivedThingModelMessageBody) => void
@@ -2880,168 +2430,16 @@ declare namespace ty.device {
2880
2430
  * 网关模型
2881
2431
  * gwId 网关设备Id
2882
2432
  */
2883
- gwId: string
2884
- }
2885
-
2886
- export type Device = {
2887
- /**
2888
- * 设备模型
2889
- * deviceId 设备Id
2890
- */
2891
- deviceId: string
2892
- }
2893
-
2894
- export type DeviceInfo = {
2895
- /** 产品信息,schema,功能定义都在里面 */
2896
- schema: {}[]
2897
- /**
2898
- * dps
2899
- * 设备的功能点状态,可以根据对应的 dpid 拿到具体的状态值去做业务逻辑
2900
- */
2901
- dps: Record<string, {}>
2902
- /**
2903
- * attribute
2904
- * 产品属性定义,在 backend-ng 平台上可查到对应配置,使用二进制位运算的方式进行管理
2905
- */
2906
- attribute: number
2907
- /**
2908
- * capability
2909
- * 产品能力值,在 backend-ng 平台上可以查询对应的勾选项,整体业务逻辑会根据该数据进行划分
2910
- * 区分设备类型也可以根据该属性进行调整,按二进制位运算的方式进行管理
2911
- */
2912
- capability: number
2913
- /**
2914
- * dpName
2915
- * 自定义 dp 的名字,通常在面板里会使用到
2916
- */
2917
- dpName: Record<string, string>
2918
- /**
2919
- * ability
2920
- * 目前业务很少使用,用于区分特殊类型的设备
2921
- */
2922
- ability: number
2923
- /**
2924
- * icon
2925
- * 设备的 icon url
2926
- */
2927
- icon: string
2928
- /**
2929
- * devId
2930
- * 设备的唯一 id
2931
- */
2932
- devId: string
2933
- /**
2934
- * verSw
2935
- * 设备固件版本号
2936
- */
2937
- verSw: string
2938
- /**
2939
- * isShare
2940
- * 是否为分享设备,true 则是分享设备
2941
- */
2942
- isShare: boolean
2943
- /**
2944
- * bv
2945
- * 设备的基线版本号
2946
- */
2947
- bv: string
2948
- /**
2949
- * uuid
2950
- * 设备的固件唯一标识
2951
- */
2952
- uuid: string
2953
- /**
2954
- * panelConfig
2955
- * 产品面板里的配置项,通常在 IoT 平台上可以查看到对应的配置
2956
- */
2957
- panelConfig: Record<string, {}>
2958
- /**
2959
- * activeTime
2960
- * 设备激活时间,时间戳
2961
- */
2962
- activeTime: number
2963
- /**
2964
- * devAttribute
2965
- * 设备的业务能力拓展,二进制位的方式进行运算
2966
- */
2967
- devAttribute: number
2968
- /**
2969
- * pcc
2970
- * 涂鸦自研蓝牙 mesh 产品的分类标识
2971
- */
2972
- pcc: string
2973
- /**
2974
- * nodeId
2975
- * 子设备的短地址
2976
- */
2977
- nodeId: string
2978
- /**
2979
- * parentId
2980
- * 上级节点 id,子设备/或蓝牙 mesh 设备通常会有该字段,用于内部寻找相关的网关或上级模型来进行业务处理
2981
- */
2982
- parentId: string
2983
- /**
2984
- * category
2985
- * 产品的分类
2986
- */
2987
- category: string
2988
- /**
2989
- * standSchemaModel
2990
- * 标准产品功能集定义模型
2991
- */
2992
- standSchemaModel: {}
2993
- /**
2994
- * productId
2995
- * 设备对应的产品 id
2996
- */
2997
- productId: string
2998
- /**
2999
- * bizAttribute
3000
- * 设备自主上报的能力位
3001
- */
3002
- bizAttribute: number
3003
- /**
3004
- * meshId
3005
- * 涂鸦自研的蓝牙 mesh id
3006
- */
3007
- meshId: string
3008
- /**
3009
- * sigmeshId
3010
- * 当前设备所属行业属性对应的蓝牙 mesh id
3011
- */
3012
- sigmeshId: string
3013
- /**
3014
- * meta
3015
- * 设备自定义配置元属性,用于存放业务数据
3016
- */
3017
- meta: Record<string, {}>
3018
- /**
3019
- * isLocalOnline
3020
- * 本地局域网是否在线
3021
- */
3022
- isLocalOnline: boolean
3023
- /**
3024
- * isOnline
3025
- * 设备总的在线情况,只要一个情况在线,就是在线,复合在线情况
3026
- */
3027
- isOnline: boolean
3028
- /**
3029
- * name
3030
- * 设备名称
3031
- */
3032
- name: string
3033
- /** groupId */
3034
- groupId: string
3035
- /**
3036
- * dpCodes
3037
- * 标准功能集 code
3038
- */
3039
- dpCodes: Record<string, {}>
3040
- /** 原始 json,业务来不及拓展更新的时候,可以根据这个来获取处理 */
3041
- originJson: Record<string, {}>
2433
+ gwId: string
3042
2434
  }
3043
2435
 
3044
- export type Object = {}
2436
+ export type Device = {
2437
+ /**
2438
+ * 设备模型
2439
+ * deviceId 设备Id
2440
+ */
2441
+ deviceId: string
2442
+ }
3045
2443
 
3046
2444
  export type TimerConfig = {
3047
2445
  /**
@@ -3194,7 +2592,7 @@ declare namespace ty.device {
3194
2592
  originJson: Record<string, {}>
3195
2593
  }
3196
2594
 
3197
- export type DeviceInfo_mScpag = {
2595
+ export type DeviceInfo = {
3198
2596
  /** 产品信息,schema,功能定义都在里面 */
3199
2597
  schema: {}[]
3200
2598
  /**
@@ -3270,7 +2668,7 @@ declare namespace ty.device {
3270
2668
  devAttribute: number
3271
2669
  /**
3272
2670
  * pcc
3273
- * 涂鸦自研蓝牙 mesh 产品的分类标识
2671
+ * Thing自研蓝牙 mesh 产品的分类标识
3274
2672
  */
3275
2673
  pcc: string
3276
2674
  /**
@@ -3305,7 +2703,7 @@ declare namespace ty.device {
3305
2703
  bizAttribute: number
3306
2704
  /**
3307
2705
  * meshId
3308
- * 涂鸦自研的蓝牙 mesh id
2706
+ * Thing自研的蓝牙 mesh id
3309
2707
  */
3310
2708
  meshId: string
3311
2709
  /**
@@ -3349,6 +2747,8 @@ declare namespace ty.device {
3349
2747
  dpsTime: {}
3350
2748
  }
3351
2749
 
2750
+ export type Object = {}
2751
+
3352
2752
  export type ServiceModel = {
3353
2753
  /** 属性列表 */
3354
2754
  properties: ThingProperty[]
@@ -3358,9 +2758,31 @@ declare namespace ty.device {
3358
2758
  events: ThingEvent[]
3359
2759
  }
3360
2760
 
3361
- export type TYBLEConnectStatusEvent = {
2761
+ export type LeaveBeaconFenceEvent = {
2762
+ /** 设备模型 设备id */
2763
+ deviceId: string
2764
+ /** 具体文案 */
2765
+ text: string
2766
+ }
2767
+
2768
+ export type FileTransferProgressResult = {
2769
+ /** 设备模型 设备id */
2770
+ deviceId: string
2771
+ /** 文件id */
2772
+ fileId: number
2773
+ /** 文件标识符 */
2774
+ fileIdentifier: string
2775
+ /** 文件版本 */
2776
+ fileVersion: number
2777
+ /** 文件地址 */
2778
+ filePath: string
2779
+ /** 传输进度 */
2780
+ progress: number
2781
+ }
2782
+
2783
+ export type ThingBLEConnectStatusEvent = {
3362
2784
  /**
3363
- * BLE(tuya)连接状态
2785
+ * BLE(thing)连接状态
3364
2786
  * deviceId: 设备 id
3365
2787
  */
3366
2788
  deviceId: string
@@ -3373,7 +2795,7 @@ declare namespace ty.device {
3373
2795
  status: string
3374
2796
  }
3375
2797
 
3376
- export type TYBLETransparentDataBean = {
2798
+ export type ThingBLETransparentDataBean = {
3377
2799
  /**
3378
2800
  * 蓝牙透传数据
3379
2801
  * deviceId: 设备 id
@@ -3383,7 +2805,7 @@ declare namespace ty.device {
3383
2805
  data: string
3384
2806
  }
3385
2807
 
3386
- export type TYBLEBigDataProgressEvent = {
2808
+ export type ThingBLEBigDataProgressEvent = {
3387
2809
  /**
3388
2810
  * 大数据通道传输进度
3389
2811
  * deviceId 设备 id
@@ -3393,7 +2815,7 @@ declare namespace ty.device {
3393
2815
  progress: number
3394
2816
  }
3395
2817
 
3396
- export type TYBLEScanDeviceEvent = {
2818
+ export type ThingBLEScanDeviceEvent = {
3397
2819
  /** 扫描到的设备ID */
3398
2820
  deviceId: string
3399
2821
  }
@@ -3403,81 +2825,40 @@ declare namespace ty.device {
3403
2825
  data: BLEBigDataChannelData[]
3404
2826
  }
3405
2827
 
3406
- export type DirectlyConnectedSearchRespond = {
2828
+ export type GWActivationRespond = {
3407
2829
  /**
3408
- * 设备是否激活
3409
- * isActive 激活结果
2830
+ * 设备模型
2831
+ * deviceId 设备Id
3410
2832
  */
3411
- isActive: boolean
3412
- }
3413
-
3414
- export type DpsChanged = {
3415
- /** dps 对应的设备 id */
3416
2833
  deviceId: string
3417
- /** 子设备对应的网关设备 id,可以根据此进行网关面板的状态刷新 */
3418
- gwId: string
3419
- /**
3420
- * dps
3421
- * 变化的数据
3422
- */
3423
- dps: Record<string, {}>
3424
2834
  /**
3425
- * options
3426
- * 预留的标记位,后续可以区分来源等
2835
+ * 网关模型
2836
+ * gwId 网关设备Id
3427
2837
  */
3428
- options: Record<string, {}>
3429
- }
3430
-
3431
- export type MqttResponse = {
3432
- /** 设备 id */
3433
- deviceId?: string
3434
- /** 原始消息数据 */
3435
- message: Record<string, {}>
3436
- /** 双端抹平后的消息数据 */
3437
- messageData: Record<string, {}>
3438
- /** 消息类型 */
3439
- type: string
3440
- /** 协议号 */
3441
- protocol: number
3442
- }
3443
-
3444
- export type SocketResponse = {
3445
- /** 消息内容 */
3446
- message: Record<string, {}>
3447
- /** 设备 id */
3448
- deviceId: string
3449
- /** 局域网消息 type */
3450
- type: number
2838
+ gwId: string
3451
2839
  }
3452
2840
 
3453
- export type Online = {
3454
- /** 在线状态 */
3455
- online: boolean
3456
- /** 设备 id */
3457
- deviceId: string
2841
+ export type DirectlyConnectedSearchRespond = {
3458
2842
  /**
3459
- * 设备在线类型(预留,后期使用)
3460
- * Wi-Fi online 1 << 0
3461
- * Local online 1 << 1
3462
- * Bluetooth LE online 1 << 2
3463
- * Bluetooth LE mesh online 1 << 3
2843
+ * 设备是否激活
2844
+ * isActive 激活结果
3464
2845
  */
3465
- onlineType: number
2846
+ isActive: boolean
3466
2847
  }
3467
2848
 
3468
- export type Device_elDqwU = {
3469
- /**
3470
- * deviceId 设备id
3471
- * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
3472
- */
3473
- deviceId: string
3474
- /** dps 科学变化的数据 */
3475
- dps?: Record<string, {}>
2849
+ export type GroupInfoResponse = {
2850
+ /** groupId 群组id */
2851
+ groupId: string
3476
2852
  }
3477
2853
 
3478
- export type OnDeviceRemovedBody = {
3479
- /** 设备id */
3480
- deviceId: string
2854
+ export type GroupDpCodeBean = {
2855
+ /** groupId 群组id */
2856
+ groupId: string
2857
+ /**
2858
+ * dp信息
2859
+ * 示例: dpCodes: {"switch" : true}
2860
+ */
2861
+ dpCodes: Record<string, Object>
3481
2862
  }
3482
2863
 
3483
2864
  export type GroupBean = {
@@ -3532,288 +2913,9 @@ declare namespace ty.device {
3532
2913
  timeout: number
3533
2914
  }
3534
2915
 
3535
- export type DeviceOnlineTypeResponse = {
3536
- /** 设备网络在线类型 */
3537
- onlineType: number
3538
- }
3539
-
3540
- export type Product = {
3541
- /** 产品id */
3542
- productId: string
3543
- }
3544
-
3545
- export type ProductInfo = {
3546
- /** 产品原始 json 信息 */
3547
- originJson: Record<string, {}>
3548
- /** 面板配置项,可以在平台进行配置 */
3549
- panelConfig: Record<string, {}>
3550
- /** 产品功能定义集合 */
3551
- schema: string
3552
- /** 产品功能定义集合拓展 */
3553
- schemaExt: string
3554
- /**
3555
- * capability
3556
- * 产品能力值,在 backend-ng 平台上可以查询对应的勾选项,整体业务逻辑会根据该数据进行划分
3557
- * 区分设备类型也可以根据该属性进行调整,按二进制位运算的方式进行管理
3558
- */
3559
- capability: number
3560
- /**
3561
- * attribute
3562
- * 产品属性定义,在 backend-ng 平台上可查到对应配置,使用二进制位运算的方式进行管理
3563
- */
3564
- attribute: number
3565
- /**
3566
- * productId
3567
- * 产品 id
3568
- */
3569
- productId: string
3570
- /**
3571
- * category
3572
- * 产品的分类
3573
- */
3574
- category: string
3575
- /**
3576
- * categoryCode
3577
- * 产品的二级分类
3578
- */
3579
- categoryCode: string
3580
- /**
3581
- * standard
3582
- * 是否为标准产品
3583
- */
3584
- standard: boolean
3585
- /**
3586
- * pcc
3587
- * 涂鸦自研蓝牙 mesh 产品的分类标识
3588
- */
3589
- pcc: string
3590
- /**
3591
- * vendorInfo
3592
- * 涂鸦自研蓝牙 mesh 产品的分类标识,融合类使用
3593
- */
3594
- vendorInfo: string
3595
- /**
3596
- * quickOpDps
3597
- * 快捷操作的 dp ids
3598
- */
3599
- quickOpDps: string[]
3600
- /**
3601
- * faultDps
3602
- * 告警/错误的显示 dp ids
3603
- */
3604
- faultDps: string[]
3605
- /**
3606
- * displayDps
3607
- * 快捷操作的 dp ids
3608
- */
3609
- displayDps: string[]
3610
- /**
3611
- * displayMsgs
3612
- * 快捷操作显示文案
3613
- */
3614
- displayMsgs: Record<string, {}>
3615
- /**
3616
- * uiPhase
3617
- * ui 包当前环境,预览包或线上包
3618
- */
3619
- uiPhase: string
3620
- /**
3621
- * uiId
3622
- * ui 包唯一包名识别
3623
- */
3624
- uiId: string
3625
- /**
3626
- * uiVersion
3627
- * ui 包版本号
3628
- */
3629
- uiVersion: string
3630
- /**
3631
- * ui
3632
- * ui 小标识
3633
- */
3634
- ui: string
3635
- /**
3636
- * rnFind
3637
- * 是否有包含 RN 包
3638
- */
3639
- rnFind: boolean
3640
- /**
3641
- * uiType
3642
- * ui 包类型
3643
- */
3644
- uiType: string
3645
- /**
3646
- * uiName
3647
- * ui 包名称
3648
- */
3649
- uiName: string
3650
- /**
3651
- * i18nTime
3652
- * 产品语言包最新更新时间
3653
- */
3654
- i18nTime: number
3655
- /**
3656
- * supportGroup
3657
- * 是否支持创建群组
3658
- */
3659
- supportGroup: boolean
3660
- /**
3661
- * supportSGroup
3662
- * 是否支持创建标准群组
3663
- */
3664
- supportSGroup: boolean
3665
- /**
3666
- * configMetas
3667
- * 产品特殊配置项,一些功能业务的特殊配置
3668
- */
3669
- configMetas: Record<string, {}>
3670
- /**
3671
- * productVer
3672
- * 产品版本
3673
- */
3674
- productVer: string
3675
- }
3676
-
3677
- export type Mesh = {
3678
- /** 网关设备id或上级节点id */
3679
- meshId: string
3680
- }
3681
-
3682
- export type DeviceOnline = {
3683
- /** 设备id */
3684
- deviceId: string
3685
- /**
3686
- * 设备在线类型,
3687
- * Wi-Fi online 1 << 0
3688
- * Local online 1 << 1
3689
- * Bluetooth LE online 1 << 2
3690
- * Bluetooth LE mesh online 1 << 3
3691
- */
3692
- onlineType: number
3693
- }
3694
-
3695
- export type DpsPublish = {
3696
- /** 设备id */
3697
- deviceId: string
3698
- /** dps */
3699
- dps: Record<string, {}>
3700
- /**
3701
- * 下发通道类型
3702
- * 0: 局域网
3703
- * 1: 网络
3704
- * 2: 自动
3705
- */
3706
- mode: number
3707
- /**
3708
- * 下发通道的优先级
3709
- * LAN = 0, // LAN
3710
- * MQTT = 1, // MQTT
3711
- * HTTP = 2, // Http
3712
- * BLE = 3, // Single Point Bluetooth
3713
- * SIGMesh = 4, // Sig Mesh
3714
- * BLEMesh = 5, // Tuya Private Mesh
3715
- * BLEBeacon = 6, // Beacon
3716
- */
3717
- pipelines: number[]
3718
- /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
3719
- options: Record<string, {}>
3720
- }
3721
-
3722
- export type QueryDps = {
3723
- /** 设备id */
3724
- deviceId: string
3725
- /** dpids 数组 */
3726
- dpIds: number[]
3727
- }
3728
-
3729
- export type MqttMessage = {
3730
- /** 消息内容 */
3731
- message: Record<string, {}>
3732
- /** 设备id */
3733
- deviceId: string
3734
- /** 协议号 */
3735
- protocol: number
3736
- /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
3737
- options: Record<string, {}>
3738
- }
3739
-
3740
- export type LanMessageParams = {
3741
- /** 消息内容 */
3742
- message: string
3743
- /** 设备id */
3744
- deviceId: string
3745
- /** 协议号 */
3746
- protocol: number
3747
- /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
3748
- options?: Record<string, {}>
3749
- }
3750
-
3751
- export type SocketMessage = {
3752
- /** 消息内容 */
3753
- message: Record<string, {}>
3754
- /** 设备id */
3755
- deviceId: string
3756
- /** 局域网消息 type */
3757
- type: number
3758
- /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
3759
- options: Record<string, {}>
3760
- }
3761
-
3762
- export type DeviceProperties = {
3763
- /** the properties map */
3764
- properties: Record<string, Object>
3765
- }
3766
-
3767
- export type DeviceProperty = {
3768
- /** deviceId */
3769
- deviceId: string
3770
- /** the custom data key */
3771
- code: string
3772
- /** the custom data value */
3773
- value: string
3774
- }
3775
-
3776
- export type DevicePropertyCB = {
3777
- /** deviceId */
3778
- deviceId: string
3779
- /** set DeviceProperty successfully */
3780
- result: boolean
3781
- }
3782
-
3783
- export type SyncDeviceInfoParams = {
3784
- /** 设备id */
3785
- deviceId: string
3786
- }
3787
-
3788
- export type SubscribeDeviceRemovedParams = {
3789
- /** 设备id */
3790
- deviceId: string
3791
- }
3792
-
3793
- export type UnSubscribeDeviceRemovedParams = {
3794
- /** 设备id */
3795
- deviceId: string
3796
- }
3797
-
3798
- export type MQTTDeviceListenerParams = {
3799
- /**
3800
- * deviceId 设备id
3801
- * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
3802
- */
3803
- deviceId: string
3804
- }
3805
-
3806
- export type MQTTProtocolListenerParams = {
3807
- /**
3808
- * protocol 协议号
3809
- * MQTT预定义的协议号
3810
- */
3811
- protocol: number
3812
- }
3813
-
3814
- export type DeviceListListenerParams = {
3815
- /** 需注册的设备列表 */
3816
- deviceIdList: string[]
2916
+ export type DeviceWifiActivatorResponse = {
2917
+ /** 设备是否WiFi激活 */
2918
+ wifiActivator: boolean
3817
2919
  }
3818
2920
 
3819
2921
  export type OTAUpdateInfoParams = {
@@ -4125,7 +3227,7 @@ declare namespace ty.device {
4125
3227
  warningText: string
4126
3228
  }
4127
3229
 
4128
- export type Device_iLmqmD = {
3230
+ export type Device_DS3KTV = {
4129
3231
  /**
4130
3232
  * deviceId
4131
3233
  * 设备 id
@@ -4170,6 +3272,109 @@ declare namespace ty.device {
4170
3272
  services: ThirdPartyService[]
4171
3273
  }
4172
3274
 
3275
+ export type DeviceListResponse = {
3276
+ /** groupId 群组id */
3277
+ groupId: string
3278
+ /** deviceList 设备列表 */
3279
+ deviceList: DeviceInfo[]
3280
+ }
3281
+
3282
+ export type DeviceNumResponse = {
3283
+ /** groupId 群组id */
3284
+ groupId: string
3285
+ /** devieNum 设备数量 */
3286
+ devieNum: number
3287
+ }
3288
+
3289
+ export type DpCodeParams = {
3290
+ /** groupId 群组id */
3291
+ groupId: string
3292
+ /** dpCode内容 */
3293
+ dpCode: string
3294
+ }
3295
+
3296
+ export type SigMeshMultiDpDataParams = {
3297
+ /** groupId 群组id */
3298
+ groupId: string
3299
+ /** localId 群组本地标识 */
3300
+ localId: string
3301
+ /**
3302
+ * dp信息
3303
+ * 示例: dps: {"1" : true}
3304
+ */
3305
+ dps: Record<string, {}>
3306
+ /** pcc mesh设备品类 */
3307
+ pcc: string
3308
+ }
3309
+
3310
+ export type MeshLocalGroupParams = {
3311
+ /**
3312
+ * 整体说明
3313
+ * 支持2个版本:
3314
+ * 1、本地版本仅支持根据vendorIds进行过滤,为本地逻辑,设备列表APP本地根据meshCategory进行比对过滤,群组结果保存在设备上,云端不参与群组的列表获取与保存。
3315
+ * 2、云端版本支持根据pccs或者codes进行过滤,为云端逻辑,设备列表获取及群组设备关系保存在云端。
3316
+ * 本地版本参数:
3317
+ * {
3318
+ * "localId": "203a",
3319
+ * "vendorIds": "1F10,2F10"
3320
+ * }
3321
+ * 云端版本参数:
3322
+ * 1、pcc过滤,相当于旧版本的vendorIds
3323
+ * {
3324
+ * "localId": "203a",
3325
+ * "type": "0",
3326
+ * "pccs": ["1210"],
3327
+ * "categoryCode": "7001"
3328
+ * }
3329
+ * 2、code过滤,根据二级品类进行过滤,目前云端只支持ykq和gykzq这两种遥控器
3330
+ * {
3331
+ * "localId": "203a",
3332
+ * "type": "1",
3333
+ * "codes": ["xxxx"],
3334
+ * "categoryCode": "7001"
3335
+ * }
3336
+ * 关于categoryCode:categoryCode 并非三级品类,与localId匹配范围为7001-7008;localId 为云端分配,步长为8,因此一个遥控器内部最多支持关联8个群组,localid为初始值依次+1,与之匹配的categoryCode从7001依次+1.
3337
+ * vendorIds 必传 可以为空字符串
3338
+ * devId 遥控器设备id
3339
+ */
3340
+ deviceId: string
3341
+ /** localId 群组本地标识 */
3342
+ localId: string
3343
+ /**
3344
+ * 遥控器群组本地版本,使用功能此参数,云端版本传空字符串
3345
+ * vendorIds 使用meshCategory进行设备列表筛选
3346
+ * 示例:vendorIds: "1F10,2F10"
3347
+ */
3348
+ vendorIds: string
3349
+ /**
3350
+ * 遥控器群组云端版本,使用此功能参数
3351
+ * type 筛选条件 0:pccs过滤,1:codes过滤
3352
+ */
3353
+ type?: string
3354
+ /**
3355
+ * 遥控器群组云端版本,使用此功能参数
3356
+ * pccs 使用meshCategory进行设备列表筛选
3357
+ * 示例:pccs: ["1F10","2F10"]
3358
+ */
3359
+ pccs?: string[]
3360
+ /**
3361
+ * 遥控器群组云端版本,使用此功能参数
3362
+ * codes 使用二级品类进行设备列表筛选
3363
+ * 示例:pccs: ["1F10","2F10"]
3364
+ */
3365
+ codes?: string[]
3366
+ /**
3367
+ * categoryCode 并非三级品类,与localId匹配范围为7001-7008;
3368
+ * localId 为云端分配,步长为8,因此一个遥控器内部最多支持关联8个群组,localid为初始值依次+1,与之匹配的categoryCode从7001依次+1.
3369
+ */
3370
+ categoryCode?: string
3371
+ /**
3372
+ * 是否支持低功耗,部分无线开关需要用到
3373
+ * 默认值:false
3374
+ */
3375
+ isSupportLowPower?: boolean
3376
+ }
3377
+
4173
3378
  export type GroupInfo = {
4174
3379
  /**
4175
3380
  * groupId
@@ -4225,7 +3430,7 @@ declare namespace ty.device {
4225
3430
  /** The custom DP name. */
4226
3431
  dpName: {}
4227
3432
  /** The device list. */
4228
- deviceList: DeviceInfo_mScpag[]
3433
+ deviceList: DeviceInfo[]
4229
3434
  /** The local short address of groups. */
4230
3435
  localId: string
4231
3436
  /** The subclass. */
@@ -4257,6 +3462,25 @@ declare namespace ty.device {
4257
3462
  groupIdList: string[]
4258
3463
  }
4259
3464
 
3465
+ export type NodeParams = {
3466
+ /** nodeId */
3467
+ nodeId: string
3468
+ /** deviceId 网关id */
3469
+ deviceId: string
3470
+ }
3471
+
3472
+ export type DeviceResult = {
3473
+ /** 设备id */
3474
+ deviceId: string
3475
+ }
3476
+
3477
+ export type DpDataParams = {
3478
+ /** 设备模型 设备id */
3479
+ deviceId: string
3480
+ /** dpId */
3481
+ dpIds: Object[]
3482
+ }
3483
+
4260
3484
  export type CheckOTAUpgradeStatusParams = {
4261
3485
  /**
4262
3486
  * deviceId