@ray-js/api 0.5.6-beta-1 → 0.5.7-beta-2

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 (48) hide show
  1. package/@types/BaseKit.d.ts +1 -25
  2. package/@types/BizKit.d.ts +38 -2
  3. package/@types/DeviceKit.d.ts +2197 -85
  4. package/@types/MiniKit.d.ts +1 -1
  5. package/lib/{BaseKit-2.5.1-anonymize.2.d.ts → BaseKit-3.0.0.d.ts} +0 -1
  6. package/lib/{BaseKit-2.5.1-anonymize.2.js → BaseKit-3.0.0.js} +0 -1
  7. package/lib/BizKit-3.0.1.d.ts +41 -0
  8. package/lib/{BizKit-2.4.6-rc.101.js → BizKit-3.0.1.js} +1 -0
  9. package/lib/{DeviceKit-2.5.2-anonymize.1.d.ts → DeviceKit-3.0.0.d.ts} +54 -1
  10. package/lib/{DeviceKit-2.5.2-anonymize.1.js → DeviceKit-3.0.0.js} +162 -3
  11. package/lib/{MiniKit-4.4.0-anonymize.4.d.ts → MiniKit-3.0.0.d.ts} +0 -0
  12. package/lib/{MiniKit-4.4.0-anonymize.4.js → MiniKit-3.0.0.js} +0 -0
  13. package/lib/all-kits.d.ts +5 -5
  14. package/lib/all-kits.js +5 -5
  15. package/lib/getApp/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  16. package/lib/getApp/{index.tuya.js → index.thing.js} +0 -0
  17. package/lib/getBoundingClientRect/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  18. package/lib/getBoundingClientRect/{index.tuya.js → index.thing.js} +0 -0
  19. package/lib/getCurrentPages/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  20. package/lib/getCurrentPages/{index.tuya.js → index.thing.js} +0 -0
  21. package/lib/getElementById/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  22. package/lib/getElementById/{index.tuya.js → index.thing.js} +0 -0
  23. package/lib/getI18nInfo/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  24. package/lib/getI18nInfo/{index.tuya.js → index.thing.js} +0 -0
  25. package/lib/hideTabBar/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  26. package/lib/hideTabBar/{index.tuya.js → index.thing.js} +0 -0
  27. package/lib/navigateBack/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  28. package/lib/navigateBack/{index.tuya.js → index.thing.js} +0 -0
  29. package/lib/navigateTo/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  30. package/lib/navigateTo/{index.tuya.js → index.thing.js} +0 -0
  31. package/lib/reLaunch/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  32. package/lib/reLaunch/{index.tuya.js → index.thing.js} +0 -0
  33. package/lib/readFileSync/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  34. package/lib/readFileSync/{index.tuya.js → index.thing.js} +0 -0
  35. package/lib/redirectTo/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  36. package/lib/redirectTo/{index.tuya.js → index.thing.js} +0 -0
  37. package/lib/requestCloud/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  38. package/lib/requestCloud/{index.tuya.js → index.thing.js} +0 -0
  39. package/lib/setNavigationBarColor/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  40. package/lib/setNavigationBarColor/{index.tuya.js → index.thing.js} +0 -0
  41. package/lib/setNavigationBarTitle/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  42. package/lib/setNavigationBarTitle/{index.tuya.js → index.thing.js} +0 -0
  43. package/lib/showTabBar/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  44. package/lib/showTabBar/{index.tuya.js → index.thing.js} +0 -0
  45. package/lib/switchTab/{index.tuya.d.ts → index.thing.d.ts} +0 -0
  46. package/lib/switchTab/{index.tuya.js → index.thing.js} +0 -0
  47. package/package.json +8 -12
  48. package/lib/BizKit-2.4.6-rc.101.d.ts +0 -40
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * DeviceKit
3
3
  *
4
- * @version 2.5.2-anonymize.1
4
+ * @version 3.0.0
5
5
  */
6
6
  declare namespace ty.device {
7
7
  /**
@@ -943,6 +943,1014 @@ declare namespace ty.device {
943
943
  }) => void
944
944
  }): void
945
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
+
966
+ /**
967
+ * 重置设备并恢复出厂设置。
968
+ *设备数据会被清除并进入待配网状态。
969
+ */
970
+ export function resetFactory(params: {
971
+ /**
972
+ * deviceId 设备id
973
+ * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
974
+ */
975
+ deviceId: string
976
+ /** dps 科学变化的数据 */
977
+ dps?: Record<string, {}>
978
+ complete?: () => void
979
+ success?: (params: null) => void
980
+ fail?: (params: {
981
+ errorMsg: string
982
+ errorCode: string | number
983
+ innerError: {
984
+ errorCode: string | number
985
+ errorMsg: string
986
+ }
987
+ }) => void
988
+ }): void
989
+
990
+ /**
991
+ * 移除设备
992
+ */
993
+ export function removeDevice(params: {
994
+ /**
995
+ * deviceId 设备id
996
+ * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
997
+ */
998
+ deviceId: string
999
+ /** dps 科学变化的数据 */
1000
+ dps?: Record<string, {}>
1001
+ complete?: () => void
1002
+ success?: (params: null) => void
1003
+ fail?: (params: {
1004
+ errorMsg: string
1005
+ errorCode: string | number
1006
+ innerError: {
1007
+ errorCode: string | number
1008
+ errorMsg: string
1009
+ }
1010
+ }) => void
1011
+ }): void
1012
+
1013
+ /**
1014
+ * 注册Zigbee网关子设备监听器
1015
+ */
1016
+ export function registerZigbeeGateWaySubDeviceListener(params: {
1017
+ /**
1018
+ * deviceId 设备id
1019
+ * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
1020
+ */
1021
+ deviceId: string
1022
+ /** dps 科学变化的数据 */
1023
+ dps?: Record<string, {}>
1024
+ complete?: () => void
1025
+ success?: (params: null) => void
1026
+ fail?: (params: {
1027
+ errorMsg: string
1028
+ errorCode: string | number
1029
+ innerError: {
1030
+ errorCode: string | number
1031
+ errorMsg: string
1032
+ }
1033
+ }) => void
1034
+ }): void
1035
+
1036
+ /**
1037
+ * 注销Zigbee网关子设备监听器
1038
+ */
1039
+ export function unregisterZigbeeGateWaySubDeviceListener(params: {
1040
+ /**
1041
+ * deviceId 设备id
1042
+ * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
1043
+ */
1044
+ deviceId: string
1045
+ /** dps 科学变化的数据 */
1046
+ dps?: Record<string, {}>
1047
+ complete?: () => void
1048
+ success?: (params: null) => void
1049
+ fail?: (params: {
1050
+ errorMsg: string
1051
+ errorCode: string | number
1052
+ innerError: {
1053
+ errorCode: string | number
1054
+ errorMsg: string
1055
+ }
1056
+ }) => void
1057
+ }): void
1058
+
1059
+ /**
1060
+ * 检查设备某个通道是否在线
1061
+ */
1062
+ export function getDeviceOnlineType(params: {
1063
+ /**
1064
+ * deviceId 设备id
1065
+ * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
1066
+ */
1067
+ deviceId: string
1068
+ /** dps 科学变化的数据 */
1069
+ dps?: Record<string, {}>
1070
+ complete?: () => void
1071
+ success?: (params: {
1072
+ /** 设备网络在线类型 */
1073
+ onlineType: number
1074
+ }) => void
1075
+ fail?: (params: {
1076
+ errorMsg: string
1077
+ errorCode: string | number
1078
+ innerError: {
1079
+ errorCode: string | number
1080
+ errorMsg: string
1081
+ }
1082
+ }) => void
1083
+ }): void
1084
+
1085
+ /**
1086
+ * 获取设备的设备信息
1087
+ */
1088
+ export function getDeviceInfo(params: {
1089
+ /**
1090
+ * deviceId 设备id
1091
+ * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
1092
+ */
1093
+ deviceId: string
1094
+ /** dps 科学变化的数据 */
1095
+ dps?: Record<string, {}>
1096
+ complete?: () => void
1097
+ success?: (params: {
1098
+ /** 产品信息,schema,功能定义都在里面 */
1099
+ schema: {}[]
1100
+ /**
1101
+ * dps
1102
+ * 设备的功能点状态,可以根据对应的 dpid 拿到具体的状态值去做业务逻辑
1103
+ */
1104
+ dps: Record<string, {}>
1105
+ /**
1106
+ * attribute
1107
+ * 产品属性定义,在 backend-ng 平台上可查到对应配置,使用二进制位运算的方式进行管理
1108
+ */
1109
+ attribute: number
1110
+ /**
1111
+ * capability
1112
+ * 产品能力值,在 backend-ng 平台上可以查询对应的勾选项,整体业务逻辑会根据该数据进行划分
1113
+ * 区分设备类型也可以根据该属性进行调整,按二进制位运算的方式进行管理
1114
+ */
1115
+ capability: number
1116
+ /**
1117
+ * dpName
1118
+ * 自定义 dp 的名字,通常在面板里会使用到
1119
+ */
1120
+ dpName: Record<string, string>
1121
+ /**
1122
+ * ability
1123
+ * 目前业务很少使用,用于区分特殊类型的设备
1124
+ */
1125
+ ability: number
1126
+ /**
1127
+ * icon
1128
+ * 设备的 icon url
1129
+ */
1130
+ icon: string
1131
+ /**
1132
+ * devId
1133
+ * 设备的唯一 id
1134
+ */
1135
+ devId: string
1136
+ /**
1137
+ * verSw
1138
+ * 设备固件版本号
1139
+ */
1140
+ verSw: string
1141
+ /**
1142
+ * isShare
1143
+ * 是否为分享设备,true 则是分享设备
1144
+ */
1145
+ isShare: boolean
1146
+ /**
1147
+ * bv
1148
+ * 设备的基线版本号
1149
+ */
1150
+ bv: string
1151
+ /**
1152
+ * uuid
1153
+ * 设备的固件唯一标识
1154
+ */
1155
+ uuid: string
1156
+ /**
1157
+ * panelConfig
1158
+ * 产品面板里的配置项,通常在 IoT 平台上可以查看到对应的配置
1159
+ */
1160
+ panelConfig: Record<string, {}>
1161
+ /**
1162
+ * activeTime
1163
+ * 设备激活时间,时间戳
1164
+ */
1165
+ activeTime: number
1166
+ /**
1167
+ * devAttribute
1168
+ * 设备的业务能力拓展,二进制位的方式进行运算
1169
+ */
1170
+ devAttribute: number
1171
+ /**
1172
+ * pcc
1173
+ * Thing自研蓝牙 mesh 产品的分类标识
1174
+ */
1175
+ pcc: string
1176
+ /**
1177
+ * nodeId
1178
+ * 子设备的短地址
1179
+ */
1180
+ nodeId: string
1181
+ /**
1182
+ * parentId
1183
+ * 上级节点 id,子设备/或蓝牙 mesh 设备通常会有该字段,用于内部寻找相关的网关或上级模型来进行业务处理
1184
+ */
1185
+ parentId: string
1186
+ /**
1187
+ * category
1188
+ * 产品的分类
1189
+ */
1190
+ category: string
1191
+ /**
1192
+ * standSchemaModel
1193
+ * 标准产品功能集定义模型
1194
+ */
1195
+ standSchemaModel: {}
1196
+ /**
1197
+ * productId
1198
+ * 设备对应的产品 id
1199
+ */
1200
+ productId: string
1201
+ /**
1202
+ * bizAttribute
1203
+ * 设备自主上报的能力位
1204
+ */
1205
+ bizAttribute: number
1206
+ /**
1207
+ * meshId
1208
+ * Thing自研的蓝牙 mesh id
1209
+ */
1210
+ meshId: string
1211
+ /**
1212
+ * sigmeshId
1213
+ * 当前设备所属行业属性对应的蓝牙 mesh id
1214
+ */
1215
+ sigmeshId: string
1216
+ /**
1217
+ * meta
1218
+ * 设备自定义配置元属性,用于存放业务数据
1219
+ */
1220
+ meta: Record<string, {}>
1221
+ /**
1222
+ * isLocalOnline
1223
+ * 本地局域网是否在线
1224
+ */
1225
+ isLocalOnline: boolean
1226
+ /** 设备云端在线情况 */
1227
+ isCloudOnline: boolean
1228
+ /**
1229
+ * isOnline
1230
+ * 设备总的在线情况,只要一个情况在线,就是在线,复合在线情况
1231
+ */
1232
+ isOnline: boolean
1233
+ /**
1234
+ * name
1235
+ * 设备名称
1236
+ */
1237
+ name: string
1238
+ /** groupId */
1239
+ groupId: string
1240
+ /**
1241
+ * dpCodes
1242
+ * 标准功能集 code
1243
+ */
1244
+ dpCodes: 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
1259
+ }) => void
1260
+ fail?: (params: {
1261
+ errorMsg: string
1262
+ errorCode: string | number
1263
+ innerError: {
1264
+ errorCode: string | number
1265
+ errorMsg: string
1266
+ }
1267
+ }) => void
1268
+ }): void
1269
+
1270
+ /**
1271
+ * 获取产品信息
1272
+ */
1273
+ export function getProductInfo(params: {
1274
+ /** 产品id */
1275
+ productId: string
1276
+ complete?: () => void
1277
+ success?: (params: {
1278
+ /** 面板配置项,可以在平台进行配置 */
1279
+ panelConfig: Record<string, {}>
1280
+ /** 产品功能定义集合 */
1281
+ schema: string
1282
+ /** 产品功能定义集合拓展 */
1283
+ schemaExt: string
1284
+ /**
1285
+ * capability
1286
+ * 产品能力值,在 backend-ng 平台上可以查询对应的勾选项,整体业务逻辑会根据该数据进行划分
1287
+ * 区分设备类型也可以根据该属性进行调整,按二进制位运算的方式进行管理
1288
+ */
1289
+ capability: number
1290
+ /**
1291
+ * attribute
1292
+ * 产品属性定义,在 backend-ng 平台上可查到对应配置,使用二进制位运算的方式进行管理
1293
+ */
1294
+ attribute: number
1295
+ /**
1296
+ * productId
1297
+ * 产品 id
1298
+ */
1299
+ productId: string
1300
+ /**
1301
+ * category
1302
+ * 产品的分类
1303
+ */
1304
+ category: string
1305
+ /**
1306
+ * categoryCode
1307
+ * 产品的二级分类
1308
+ */
1309
+ categoryCode: string
1310
+ /**
1311
+ * standard
1312
+ * 是否为标准产品
1313
+ */
1314
+ standard: boolean
1315
+ /**
1316
+ * pcc
1317
+ * Thing自研蓝牙 mesh 产品的分类标识
1318
+ */
1319
+ pcc: string
1320
+ /**
1321
+ * vendorInfo
1322
+ * Thing自研蓝牙 mesh 产品的分类标识,融合类使用
1323
+ */
1324
+ vendorInfo: string
1325
+ /**
1326
+ * quickOpDps
1327
+ * 快捷操作的 dp ids
1328
+ */
1329
+ quickOpDps: string[]
1330
+ /**
1331
+ * faultDps
1332
+ * 告警/错误的显示 dp ids
1333
+ */
1334
+ faultDps: string[]
1335
+ /**
1336
+ * displayDps
1337
+ * 快捷操作的 dp ids
1338
+ */
1339
+ displayDps: string[]
1340
+ /**
1341
+ * displayMsgs
1342
+ * 快捷操作显示文案
1343
+ */
1344
+ displayMsgs: Record<string, {}>
1345
+ /**
1346
+ * uiPhase
1347
+ * ui 包当前环境,预览包或线上包
1348
+ */
1349
+ uiPhase: string
1350
+ /**
1351
+ * uiId
1352
+ * ui 包唯一包名识别
1353
+ */
1354
+ uiId: string
1355
+ /**
1356
+ * uiVersion
1357
+ * ui 包版本号
1358
+ */
1359
+ uiVersion: string
1360
+ /**
1361
+ * ui
1362
+ * ui 小标识
1363
+ */
1364
+ ui: string
1365
+ /**
1366
+ * rnFind
1367
+ * 是否有包含 RN 包
1368
+ */
1369
+ rnFind: boolean
1370
+ /**
1371
+ * uiType
1372
+ * ui 包类型
1373
+ */
1374
+ uiType: string
1375
+ /**
1376
+ * uiName
1377
+ * ui 包名称
1378
+ */
1379
+ uiName: string
1380
+ /**
1381
+ * i18nTime
1382
+ * 产品语言包最新更新时间
1383
+ */
1384
+ i18nTime: number
1385
+ /**
1386
+ * supportGroup
1387
+ * 是否支持创建群组
1388
+ */
1389
+ supportGroup: boolean
1390
+ /**
1391
+ * supportSGroup
1392
+ * 是否支持创建标准群组
1393
+ */
1394
+ supportSGroup: boolean
1395
+ /**
1396
+ * configMetas
1397
+ * 产品特殊配置项,一些功能业务的特殊配置
1398
+ */
1399
+ configMetas: Record<string, {}>
1400
+ /**
1401
+ * productVer
1402
+ * 产品版本
1403
+ */
1404
+ productVer: string
1405
+ }) => void
1406
+ fail?: (params: {
1407
+ errorMsg: string
1408
+ errorCode: string | number
1409
+ innerError: {
1410
+ errorCode: string | number
1411
+ errorMsg: string
1412
+ }
1413
+ }) => void
1414
+ }): void
1415
+
1416
+ /**
1417
+ * 获取子设备信息
1418
+ */
1419
+ export function getSubDeviceInfoList(params: {
1420
+ /** 网关设备id或上级节点id */
1421
+ meshId: string
1422
+ complete?: () => void
1423
+ success?: (params: DeviceInfo[]) => void
1424
+ fail?: (params: {
1425
+ errorMsg: string
1426
+ errorCode: string | number
1427
+ innerError: {
1428
+ errorCode: string | number
1429
+ errorMsg: string
1430
+ }
1431
+ }) => void
1432
+ }): void
1433
+
1434
+ /**
1435
+ * 判断设备上网类型是否与deviceModel物模型一致
1436
+ */
1437
+ export function validDeviceOnlineType(params: {
1438
+ /** 设备id */
1439
+ deviceId: string
1440
+ /**
1441
+ * 设备在线类型,
1442
+ * Wi-Fi online 1 << 0
1443
+ * Local online 1 << 1
1444
+ * Bluetooth LE online 1 << 2
1445
+ * Bluetooth LE mesh online 1 << 3
1446
+ */
1447
+ onlineType: number
1448
+ complete?: () => void
1449
+ success?: (params: boolean) => 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
+ * 发送 dps
1462
+ */
1463
+ export function publishDps(params: {
1464
+ /** 设备id */
1465
+ deviceId: string
1466
+ /** dps */
1467
+ dps: Record<string, {}>
1468
+ /**
1469
+ * 下发通道类型
1470
+ * 0: 局域网
1471
+ * 1: 网络
1472
+ * 2: 自动
1473
+ */
1474
+ mode: number
1475
+ /**
1476
+ * 下发通道的优先级
1477
+ * LAN = 0, // LAN
1478
+ * MQTT = 1, // MQTT
1479
+ * HTTP = 2, // Http
1480
+ * BLE = 3, // Single Point Bluetooth
1481
+ * SIGMesh = 4, // Sig Mesh
1482
+ * BLEMesh = 5, // Thing Private Mesh
1483
+ * BLEBeacon = 6, // Beacon
1484
+ */
1485
+ pipelines: number[]
1486
+ /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
1487
+ options: Record<string, {}>
1488
+ complete?: () => void
1489
+ success?: (params: boolean) => void
1490
+ fail?: (params: {
1491
+ errorMsg: string
1492
+ errorCode: string | number
1493
+ innerError: {
1494
+ errorCode: string | number
1495
+ errorMsg: string
1496
+ }
1497
+ }) => void
1498
+ }): void
1499
+
1500
+ /**
1501
+ * 发送 标准dp
1502
+ */
1503
+ export function publishCommands(params: {
1504
+ /** 设备id */
1505
+ deviceId: string
1506
+ /** dps */
1507
+ dps: Record<string, {}>
1508
+ /**
1509
+ * 下发通道类型
1510
+ * 0: 局域网
1511
+ * 1: 网络
1512
+ * 2: 自动
1513
+ */
1514
+ mode: number
1515
+ /**
1516
+ * 下发通道的优先级
1517
+ * LAN = 0, // LAN
1518
+ * MQTT = 1, // MQTT
1519
+ * HTTP = 2, // Http
1520
+ * BLE = 3, // Single Point Bluetooth
1521
+ * SIGMesh = 4, // Sig Mesh
1522
+ * BLEMesh = 5, // Thing Private Mesh
1523
+ * BLEBeacon = 6, // Beacon
1524
+ */
1525
+ pipelines: number[]
1526
+ /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
1527
+ options: Record<string, {}>
1528
+ complete?: () => void
1529
+ success?: (params: boolean) => void
1530
+ fail?: (params: {
1531
+ errorMsg: string
1532
+ errorCode: string | number
1533
+ innerError: {
1534
+ errorCode: string | number
1535
+ errorMsg: string
1536
+ }
1537
+ }) => void
1538
+ }): void
1539
+
1540
+ /**
1541
+ * 指定通道发送dps控制指令
1542
+ */
1543
+ export function publishDpsWithPipeType(params: {
1544
+ /** 设备id */
1545
+ deviceId: string
1546
+ /** dps */
1547
+ dps: Record<string, {}>
1548
+ /**
1549
+ * 下发通道类型
1550
+ * 0: 局域网
1551
+ * 1: 网络
1552
+ * 2: 自动
1553
+ */
1554
+ mode: number
1555
+ /**
1556
+ * 下发通道的优先级
1557
+ * LAN = 0, // LAN
1558
+ * MQTT = 1, // MQTT
1559
+ * HTTP = 2, // Http
1560
+ * BLE = 3, // Single Point Bluetooth
1561
+ * SIGMesh = 4, // Sig Mesh
1562
+ * BLEMesh = 5, // Thing Private Mesh
1563
+ * BLEBeacon = 6, // Beacon
1564
+ */
1565
+ pipelines: number[]
1566
+ /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
1567
+ options: Record<string, {}>
1568
+ complete?: () => void
1569
+ success?: (params: boolean) => void
1570
+ fail?: (params: {
1571
+ errorMsg: string
1572
+ errorCode: string | number
1573
+ innerError: {
1574
+ errorCode: string | number
1575
+ errorMsg: string
1576
+ }
1577
+ }) => void
1578
+ }): void
1579
+
1580
+ /**
1581
+ * 查询 dps
1582
+ */
1583
+ export function queryDps(params: {
1584
+ /** 设备id */
1585
+ deviceId: string
1586
+ /** dpids 数组 */
1587
+ dpIds: number[]
1588
+ complete?: () => void
1589
+ success?: (params: boolean) => void
1590
+ fail?: (params: {
1591
+ errorMsg: string
1592
+ errorCode: string | number
1593
+ innerError: {
1594
+ errorCode: string | number
1595
+ errorMsg: string
1596
+ }
1597
+ }) => void
1598
+ }): void
1599
+
1600
+ /**
1601
+ * 通过 MQTT 消息通道下发消息
1602
+ */
1603
+ export function publishMqttMessage(params: {
1604
+ /** 消息内容 */
1605
+ message: Record<string, {}>
1606
+ /** 设备id */
1607
+ deviceId: string
1608
+ /** 协议号 */
1609
+ protocol: number
1610
+ /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
1611
+ options: Record<string, {}>
1612
+ complete?: () => void
1613
+ success?: (params: boolean) => 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 publishLanMessage(params: {
1628
+ /** 消息内容 */
1629
+ message: string
1630
+ /** 设备id */
1631
+ deviceId: string
1632
+ /** 协议号 */
1633
+ protocol: number
1634
+ /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
1635
+ options?: Record<string, {}>
1636
+ complete?: () => void
1637
+ success?: (params: boolean) => void
1638
+ fail?: (params: {
1639
+ errorMsg: string
1640
+ errorCode: string | number
1641
+ innerError: {
1642
+ errorCode: string | number
1643
+ errorMsg: string
1644
+ }
1645
+ }) => void
1646
+ }): void
1647
+
1648
+ /**
1649
+ * 通过 Socket 消息通道下发消息
1650
+ */
1651
+ export function publishSocketMessage(params: {
1652
+ /** 消息内容 */
1653
+ message: Record<string, {}>
1654
+ /** 设备id */
1655
+ deviceId: string
1656
+ /** 局域网消息 type */
1657
+ type: number
1658
+ /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
1659
+ options: Record<string, {}>
1660
+ complete?: () => void
1661
+ success?: (params: boolean) => 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
+ * 获取设备属性
1674
+ */
1675
+ export function getDeviceProperty(params: {
1676
+ /**
1677
+ * deviceId 设备id
1678
+ * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
1679
+ */
1680
+ deviceId: string
1681
+ /** dps 科学变化的数据 */
1682
+ dps?: Record<string, {}>
1683
+ complete?: () => void
1684
+ success?: (params: {
1685
+ /** the properties map */
1686
+ properties: Record<string, Object>
1687
+ }) => void
1688
+ fail?: (params: {
1689
+ errorMsg: string
1690
+ errorCode: string | number
1691
+ innerError: {
1692
+ errorCode: string | number
1693
+ errorMsg: string
1694
+ }
1695
+ }) => void
1696
+ }): void
1697
+
1698
+ /**
1699
+ * 设置设备属性
1700
+ */
1701
+ export function setDeviceProperty(params: {
1702
+ /** deviceId */
1703
+ deviceId: string
1704
+ /** the custom data key */
1705
+ code: string
1706
+ /** the custom data value */
1707
+ value: string
1708
+ complete?: () => void
1709
+ success?: (params: {
1710
+ /** deviceId */
1711
+ deviceId: string
1712
+ /** set DeviceProperty successfully */
1713
+ result: boolean
1714
+ }) => void
1715
+ fail?: (params: {
1716
+ errorMsg: string
1717
+ errorCode: string | number
1718
+ innerError: {
1719
+ errorCode: string | number
1720
+ errorMsg: string
1721
+ }
1722
+ }) => void
1723
+ }): void
1724
+
1725
+ /**
1726
+ * 同步设备信息
1727
+ */
1728
+ export function syncDeviceInfo(params: {
1729
+ /** 设备id */
1730
+ deviceId: string
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
+ * 订阅设备移除事件 (430版本之后,请用registerDeviceListListener接口替换)
1745
+ */
1746
+ export function subscribeDeviceRemoved(params: {
1747
+ /** 设备id */
1748
+ deviceId: string
1749
+ complete?: () => void
1750
+ success?: (params: null) => void
1751
+ fail?: (params: {
1752
+ errorMsg: string
1753
+ errorCode: string | number
1754
+ innerError: {
1755
+ errorCode: string | number
1756
+ errorMsg: string
1757
+ }
1758
+ }) => void
1759
+ }): void
1760
+
1761
+ /**
1762
+ * 取消订阅设备移除事件 (430版本之后,请用unregisterDeviceListListener接口替换)
1763
+ */
1764
+ export function unSubscribeDeviceRemoved(params: {
1765
+ /** 设备id */
1766
+ deviceId: string
1767
+ complete?: () => void
1768
+ success?: (params: null) => void
1769
+ fail?: (params: {
1770
+ errorMsg: string
1771
+ errorCode: string | number
1772
+ innerError: {
1773
+ errorCode: string | number
1774
+ errorMsg: string
1775
+ }
1776
+ }) => void
1777
+ }): void
1778
+
1779
+ /**
1780
+ * 注册设备的MQTT信息监听
1781
+ */
1782
+ export function registerMQTTDeviceListener(params: {
1783
+ /**
1784
+ * deviceId 设备id
1785
+ * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
1786
+ */
1787
+ deviceId: string
1788
+ complete?: () => void
1789
+ success?: (params: null) => void
1790
+ fail?: (params: {
1791
+ errorMsg: string
1792
+ errorCode: string | number
1793
+ innerError: {
1794
+ errorCode: string | number
1795
+ errorMsg: string
1796
+ }
1797
+ }) => void
1798
+ }): void
1799
+
1800
+ /**
1801
+ * 注销设备的MQTT信息监听
1802
+ */
1803
+ export function unregisterMQTTDeviceListener(params: {
1804
+ /**
1805
+ * deviceId 设备id
1806
+ * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
1807
+ */
1808
+ deviceId: string
1809
+ complete?: () => void
1810
+ success?: (params: null) => void
1811
+ fail?: (params: {
1812
+ errorMsg: string
1813
+ errorCode: string | number
1814
+ innerError: {
1815
+ errorCode: string | number
1816
+ errorMsg: string
1817
+ }
1818
+ }) => void
1819
+ }): void
1820
+
1821
+ /**
1822
+ * 注册MQTT协议监听
1823
+ */
1824
+ export function registerMQTTProtocolListener(params: {
1825
+ /**
1826
+ * protocol 协议号
1827
+ * MQTT预定义的协议号
1828
+ */
1829
+ protocol: number
1830
+ complete?: () => void
1831
+ success?: (params: null) => void
1832
+ fail?: (params: {
1833
+ errorMsg: string
1834
+ errorCode: string | number
1835
+ innerError: {
1836
+ errorCode: string | number
1837
+ errorMsg: string
1838
+ }
1839
+ }) => void
1840
+ }): void
1841
+
1842
+ /**
1843
+ * 注销MQTT协议监听
1844
+ */
1845
+ export function unregisterMQTTProtocolListener(params: {
1846
+ /**
1847
+ * protocol 协议号
1848
+ * MQTT预定义的协议号
1849
+ */
1850
+ protocol: number
1851
+ complete?: () => void
1852
+ success?: (params: null) => void
1853
+ fail?: (params: {
1854
+ errorMsg: string
1855
+ errorCode: string | number
1856
+ innerError: {
1857
+ errorCode: string | number
1858
+ errorMsg: string
1859
+ }
1860
+ }) => void
1861
+ }): void
1862
+
1863
+ /**
1864
+ * 注册需要监听的设备列表的监听器
1865
+ */
1866
+ export function registerDeviceListListener(params: {
1867
+ /** 需注册的设备列表 */
1868
+ deviceIdList: string[]
1869
+ complete?: () => void
1870
+ success?: (params: null) => void
1871
+ fail?: (params: {
1872
+ errorMsg: string
1873
+ errorCode: string | number
1874
+ innerError: {
1875
+ errorCode: string | number
1876
+ errorMsg: string
1877
+ }
1878
+ }) => void
1879
+ }): void
1880
+
1881
+ /**
1882
+ * 注销需要监听的设备列表的监听器
1883
+ */
1884
+ export function unregisterDeviceListListener(params?: {
1885
+ complete?: () => void
1886
+ success?: (params: null) => void
1887
+ fail?: (params: {
1888
+ errorMsg: string
1889
+ errorCode: string | number
1890
+ innerError: {
1891
+ errorCode: string | number
1892
+ errorMsg: string
1893
+ }
1894
+ }) => void
1895
+ }): void
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
+
946
1954
  /**
947
1955
  * 检查固件升级信息
948
1956
  */
@@ -1500,7 +2508,233 @@ declare namespace ty.device {
1500
2508
  */
1501
2509
  deviceId: string
1502
2510
  complete?: () => void
1503
- success?: (params: null) => void
2511
+ success?: (params: null) => void
2512
+ fail?: (params: {
2513
+ errorMsg: string
2514
+ errorCode: string | number
2515
+ innerError: {
2516
+ errorCode: string | number
2517
+ errorMsg: string
2518
+ }
2519
+ }) => void
2520
+ }): void
2521
+
2522
+ /**
2523
+ * 跳转共享设备页面
2524
+ */
2525
+ export function openShareDevice(params: {
2526
+ /**
2527
+ * deviceId
2528
+ * 设备 id
2529
+ */
2530
+ deviceId: string
2531
+ complete?: () => void
2532
+ success?: (params: null) => void
2533
+ fail?: (params: {
2534
+ errorMsg: string
2535
+ errorCode: string | number
2536
+ innerError: {
2537
+ errorCode: string | number
2538
+ errorMsg: string
2539
+ }
2540
+ }) => void
2541
+ }): void
2542
+
2543
+ /**
2544
+ * 添加设备到桌面
2545
+ */
2546
+ export function addDeviceToDesk(params: {
2547
+ /**
2548
+ * deviceId
2549
+ * 设备 id
2550
+ */
2551
+ deviceId: string
2552
+ complete?: () => void
2553
+ success?: (params: null) => void
2554
+ fail?: (params: {
2555
+ errorMsg: string
2556
+ errorCode: string | number
2557
+ innerError: {
2558
+ errorCode: string | number
2559
+ errorMsg: string
2560
+ }
2561
+ }) => void
2562
+ }): void
2563
+
2564
+ /**
2565
+ * 移除共享设备
2566
+ */
2567
+ export function removeShareDevice(params: {
2568
+ /**
2569
+ * deviceId
2570
+ * 设备 id
2571
+ */
2572
+ deviceId: string
2573
+ complete?: () => void
2574
+ success?: (params: null) => void
2575
+ fail?: (params: {
2576
+ errorMsg: string
2577
+ errorCode: string | number
2578
+ innerError: {
2579
+ errorCode: string | number
2580
+ errorMsg: string
2581
+ }
2582
+ }) => void
2583
+ }): void
2584
+
2585
+ /**
2586
+ * 获取设备支持的三方服务
2587
+ */
2588
+ export function getSupportedThirdPartyServices(params: {
2589
+ /**
2590
+ * deviceId
2591
+ * 设备 id
2592
+ */
2593
+ deviceId: string
2594
+ complete?: () => void
2595
+ success?: (params: {
2596
+ /** 服务列表 */
2597
+ services: ThirdPartyService[]
2598
+ }) => void
2599
+ fail?: (params: {
2600
+ errorMsg: string
2601
+ errorCode: string | number
2602
+ innerError: {
2603
+ errorCode: string | number
2604
+ errorMsg: string
2605
+ }
2606
+ }) => void
2607
+ }): void
2608
+
2609
+ /**
2610
+ * 打开推荐场景详情页面
2611
+ *详细文档链接:https://wiki.tuya-inc.com:7799/page/1456192108871295013
2612
+ */
2613
+ export function openRecommendSceneDetail(params: {
2614
+ /** 来源 */
2615
+ source: string
2616
+ /** 场景模型 */
2617
+ sceneModel: Record<string, {}>
2618
+ complete?: () => void
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
1504
2738
  fail?: (params: {
1505
2739
  errorMsg: string
1506
2740
  errorCode: string | number
@@ -1512,16 +2746,30 @@ declare namespace ty.device {
1512
2746
  }): void
1513
2747
 
1514
2748
  /**
1515
- * 跳转共享设备页面
2749
+ * 展示场景的风格弹窗
1516
2750
  */
1517
- export function openShareDevice(params: {
1518
- /**
1519
- * deviceId
1520
- * 设备 id
1521
- */
1522
- deviceId: string
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
1523
2764
  complete?: () => void
1524
- success?: (params: null) => void
2765
+ success?: (params: {
2766
+ /** 颜色 */
2767
+ color?: string
2768
+ /** 图标 */
2769
+ icon?: string
2770
+ /** 图片 */
2771
+ image?: string
2772
+ }) => void
1525
2773
  fail?: (params: {
1526
2774
  errorMsg: string
1527
2775
  errorCode: string | number
@@ -1533,16 +2781,24 @@ declare namespace ty.device {
1533
2781
  }): void
1534
2782
 
1535
2783
  /**
1536
- * 添加设备到桌面
2784
+ * 打开生效时间段页面
1537
2785
  */
1538
- export function addDeviceToDesk(params: {
1539
- /**
1540
- * deviceId
1541
- * 设备 id
1542
- */
1543
- deviceId: string
2786
+ export function openPreConditionPage(params?: {
2787
+ /** id */
2788
+ id?: string
2789
+ /** 固定值 timeCheck */
2790
+ condType?: string
2791
+ /** 规则 */
2792
+ expr?: Expr
1544
2793
  complete?: () => void
1545
- success?: (params: null) => void
2794
+ success?: (params: {
2795
+ /** id */
2796
+ id: string
2797
+ /** 固定值 timeCheck */
2798
+ condType: string
2799
+ /** 规则 */
2800
+ expr: Expr
2801
+ }) => void
1546
2802
  fail?: (params: {
1547
2803
  errorMsg: string
1548
2804
  errorCode: string | number
@@ -1554,16 +2810,24 @@ declare namespace ty.device {
1554
2810
  }): void
1555
2811
 
1556
2812
  /**
1557
- * 移除共享设备
2813
+ * 创建条件
1558
2814
  */
1559
- export function removeShareDevice(params: {
1560
- /**
1561
- * deviceId
1562
- * 设备 id
1563
- */
1564
- deviceId: string
2815
+ export function createCondition(params: {
2816
+ /** 条件类型 */
2817
+ type: string
2818
+ /** 条件内容 */
2819
+ condition?: string
2820
+ /** 索引 */
2821
+ index?: number
1565
2822
  complete?: () => void
1566
- success?: (params: null) => void
2823
+ success?: (params: {
2824
+ /** 条件类型 */
2825
+ type?: string
2826
+ /** 条件内容 */
2827
+ condition?: string
2828
+ /** 索引 */
2829
+ index?: number
2830
+ }) => void
1567
2831
  fail?: (params: {
1568
2832
  errorMsg: string
1569
2833
  errorCode: string | number
@@ -1575,18 +2839,23 @@ declare namespace ty.device {
1575
2839
  }): void
1576
2840
 
1577
2841
  /**
1578
- * 获取设备支持的三方服务
2842
+ * 编辑条件
1579
2843
  */
1580
- export function getSupportedThirdPartyServices(params: {
1581
- /**
1582
- * deviceId
1583
- * 设备 id
1584
- */
1585
- deviceId: string
2844
+ export function editCondition(params: {
2845
+ /** 条件类型 */
2846
+ type: string
2847
+ /** 条件内容 */
2848
+ condition?: string
2849
+ /** 索引 */
2850
+ index?: number
1586
2851
  complete?: () => void
1587
2852
  success?: (params: {
1588
- /** 服务列表 */
1589
- services: ThirdPartyService[]
2853
+ /** 条件类型 */
2854
+ type?: string
2855
+ /** 条件内容 */
2856
+ condition?: string
2857
+ /** 索引 */
2858
+ index?: number
1590
2859
  }) => void
1591
2860
  fail?: (params: {
1592
2861
  errorMsg: string
@@ -1609,7 +2878,7 @@ declare namespace ty.device {
1609
2878
  /** groupId 群组id */
1610
2879
  groupId: string
1611
2880
  /** deviceList 设备列表 */
1612
- deviceList: DeviceInfo[]
2881
+ deviceList: DeviceInfo_SLAb2e[]
1613
2882
  }) => void
1614
2883
  fail?: (params: {
1615
2884
  errorMsg: string
@@ -1862,7 +3131,7 @@ declare namespace ty.device {
1862
3131
  /** The custom DP name. */
1863
3132
  dpName: {}
1864
3133
  /** The device list. */
1865
- deviceList: DeviceInfo[]
3134
+ deviceList: DeviceInfo_SLAb2e[]
1866
3135
  /** The local short address of groups. */
1867
3136
  localId: string
1868
3137
  /** The subclass. */
@@ -2075,33 +3344,6 @@ declare namespace ty.device {
2075
3344
  }) => void
2076
3345
  }): void
2077
3346
 
2078
- /**
2079
- * 打开一个指定的RN面板
2080
- */
2081
- export function pushRNPanel(params: {
2082
- /**
2083
- * RN设备面板属性
2084
- * 设备模型
2085
- * deviceId 设备Id
2086
- */
2087
- deviceId: string
2088
- /**
2089
- * 面板初始化参数
2090
- * initialProps 初始化参数
2091
- */
2092
- initialProps?: Record<string, {}>
2093
- complete?: () => void
2094
- success?: (params: null) => void
2095
- fail?: (params: {
2096
- errorMsg: string
2097
- errorCode: string | number
2098
- innerError: {
2099
- errorCode: string | number
2100
- errorMsg: string
2101
- }
2102
- }) => void
2103
- }): void
2104
-
2105
3347
  /**
2106
3348
  * 设备是否支持物模型
2107
3349
  */
@@ -2361,6 +3603,76 @@ declare namespace ty.device {
2361
3603
  listener: (params: DirectlyConnectedSearchRespond) => void
2362
3604
  ): void
2363
3605
 
3606
+ /**
3607
+ * dp点变更
3608
+ */
3609
+ export function onDpDataChange(listener: (params: DpsChanged) => void): void
3610
+
3611
+ /**
3612
+ * 取消监听:dp点变更
3613
+ */
3614
+ export function offDpDataChange(listener: (params: DpsChanged) => void): void
3615
+
3616
+ /**
3617
+ * MQTT消息通道消息上报
3618
+ */
3619
+ export function onMqttMessageReceived(listener: (params: MqttResponse) => void): void
3620
+
3621
+ /**
3622
+ * 取消监听:MQTT消息通道消息上报
3623
+ */
3624
+ export function offMqttMessageReceived(listener: (params: MqttResponse) => void): void
3625
+
3626
+ /**
3627
+ * socket消息通道消息上报
3628
+ */
3629
+ export function onSocketMessageReceived(listener: (params: SocketResponse) => void): void
3630
+
3631
+ /**
3632
+ * 取消监听:socket消息通道消息上报
3633
+ */
3634
+ export function offSocketMessageReceived(listener: (params: SocketResponse) => void): void
3635
+
3636
+ /**
3637
+ * 设备上下线状态变更
3638
+ */
3639
+ export function onDeviceOnlineStatusUpdate(listener: (params: Online) => void): void
3640
+
3641
+ /**
3642
+ * 取消监听:设备上下线状态变更
3643
+ */
3644
+ export function offDeviceOnlineStatusUpdate(listener: (params: Online) => void): void
3645
+
3646
+ /**
3647
+ * 设备 dp 名字和设备名字触发
3648
+ */
3649
+ export function onDeviceInfoUpdated(listener: (params: Device_KeiZSq) => void): void
3650
+
3651
+ /**
3652
+ * 取消监听:设备 dp 名字和设备名字触发
3653
+ */
3654
+ export function offDeviceInfoUpdated(listener: (params: Device_KeiZSq) => void): void
3655
+
3656
+ /**
3657
+ * 设备移除事件
3658
+ */
3659
+ export function onDeviceRemoved(listener: (params: OnDeviceRemovedBody) => void): void
3660
+
3661
+ /**
3662
+ * 取消监听:设备移除事件
3663
+ */
3664
+ export function offDeviceRemoved(listener: (params: OnDeviceRemovedBody) => void): void
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
+
2364
3676
  /**
2365
3677
  * 定时变化事件
2366
3678
  */
@@ -2438,9 +3750,175 @@ declare namespace ty.device {
2438
3750
  * 设备模型
2439
3751
  * deviceId 设备Id
2440
3752
  */
2441
- deviceId: string
3753
+ deviceId: string
3754
+ }
3755
+
3756
+ export type DeviceInfo = {
3757
+ /** 产品信息,schema,功能定义都在里面 */
3758
+ schema: {}[]
3759
+ /**
3760
+ * dps
3761
+ * 设备的功能点状态,可以根据对应的 dpid 拿到具体的状态值去做业务逻辑
3762
+ */
3763
+ dps: Record<string, {}>
3764
+ /**
3765
+ * attribute
3766
+ * 产品属性定义,在 backend-ng 平台上可查到对应配置,使用二进制位运算的方式进行管理
3767
+ */
3768
+ attribute: number
3769
+ /**
3770
+ * capability
3771
+ * 产品能力值,在 backend-ng 平台上可以查询对应的勾选项,整体业务逻辑会根据该数据进行划分
3772
+ * 区分设备类型也可以根据该属性进行调整,按二进制位运算的方式进行管理
3773
+ */
3774
+ capability: number
3775
+ /**
3776
+ * dpName
3777
+ * 自定义 dp 的名字,通常在面板里会使用到
3778
+ */
3779
+ dpName: Record<string, string>
3780
+ /**
3781
+ * ability
3782
+ * 目前业务很少使用,用于区分特殊类型的设备
3783
+ */
3784
+ ability: number
3785
+ /**
3786
+ * icon
3787
+ * 设备的 icon url
3788
+ */
3789
+ icon: string
3790
+ /**
3791
+ * devId
3792
+ * 设备的唯一 id
3793
+ */
3794
+ devId: string
3795
+ /**
3796
+ * verSw
3797
+ * 设备固件版本号
3798
+ */
3799
+ verSw: string
3800
+ /**
3801
+ * isShare
3802
+ * 是否为分享设备,true 则是分享设备
3803
+ */
3804
+ isShare: boolean
3805
+ /**
3806
+ * bv
3807
+ * 设备的基线版本号
3808
+ */
3809
+ bv: string
3810
+ /**
3811
+ * uuid
3812
+ * 设备的固件唯一标识
3813
+ */
3814
+ uuid: string
3815
+ /**
3816
+ * panelConfig
3817
+ * 产品面板里的配置项,通常在 IoT 平台上可以查看到对应的配置
3818
+ */
3819
+ panelConfig: Record<string, {}>
3820
+ /**
3821
+ * activeTime
3822
+ * 设备激活时间,时间戳
3823
+ */
3824
+ activeTime: number
3825
+ /**
3826
+ * devAttribute
3827
+ * 设备的业务能力拓展,二进制位的方式进行运算
3828
+ */
3829
+ devAttribute: number
3830
+ /**
3831
+ * pcc
3832
+ * Thing自研蓝牙 mesh 产品的分类标识
3833
+ */
3834
+ pcc: string
3835
+ /**
3836
+ * nodeId
3837
+ * 子设备的短地址
3838
+ */
3839
+ nodeId: string
3840
+ /**
3841
+ * parentId
3842
+ * 上级节点 id,子设备/或蓝牙 mesh 设备通常会有该字段,用于内部寻找相关的网关或上级模型来进行业务处理
3843
+ */
3844
+ parentId: string
3845
+ /**
3846
+ * category
3847
+ * 产品的分类
3848
+ */
3849
+ category: string
3850
+ /**
3851
+ * standSchemaModel
3852
+ * 标准产品功能集定义模型
3853
+ */
3854
+ standSchemaModel: {}
3855
+ /**
3856
+ * productId
3857
+ * 设备对应的产品 id
3858
+ */
3859
+ productId: string
3860
+ /**
3861
+ * bizAttribute
3862
+ * 设备自主上报的能力位
3863
+ */
3864
+ bizAttribute: number
3865
+ /**
3866
+ * meshId
3867
+ * Thing自研的蓝牙 mesh id
3868
+ */
3869
+ meshId: string
3870
+ /**
3871
+ * sigmeshId
3872
+ * 当前设备所属行业属性对应的蓝牙 mesh id
3873
+ */
3874
+ sigmeshId: string
3875
+ /**
3876
+ * meta
3877
+ * 设备自定义配置元属性,用于存放业务数据
3878
+ */
3879
+ meta: Record<string, {}>
3880
+ /**
3881
+ * isLocalOnline
3882
+ * 本地局域网是否在线
3883
+ */
3884
+ isLocalOnline: boolean
3885
+ /** 设备云端在线情况 */
3886
+ isCloudOnline: boolean
3887
+ /**
3888
+ * isOnline
3889
+ * 设备总的在线情况,只要一个情况在线,就是在线,复合在线情况
3890
+ */
3891
+ isOnline: boolean
3892
+ /**
3893
+ * name
3894
+ * 设备名称
3895
+ */
3896
+ name: string
3897
+ /** groupId */
3898
+ groupId: string
3899
+ /**
3900
+ * dpCodes
3901
+ * 标准功能集 code
3902
+ */
3903
+ dpCodes: 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
2442
3918
  }
2443
3919
 
3920
+ export type Object = {}
3921
+
2444
3922
  export type TimerConfig = {
2445
3923
  /**
2446
3924
  * background
@@ -2592,7 +4070,82 @@ declare namespace ty.device {
2592
4070
  originJson: Record<string, {}>
2593
4071
  }
2594
4072
 
2595
- export type DeviceInfo = {
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 = {
2596
4149
  /** 产品信息,schema,功能定义都在里面 */
2597
4150
  schema: {}[]
2598
4151
  /**
@@ -2747,8 +4300,6 @@ declare namespace ty.device {
2747
4300
  dpsTime: {}
2748
4301
  }
2749
4302
 
2750
- export type Object = {}
2751
-
2752
4303
  export type ServiceModel = {
2753
4304
  /** 属性列表 */
2754
4305
  properties: ThingProperty[]
@@ -2846,6 +4397,86 @@ declare namespace ty.device {
2846
4397
  isActive: boolean
2847
4398
  }
2848
4399
 
4400
+ export type DpsChanged = {
4401
+ /** dps 对应的设备 id */
4402
+ deviceId: string
4403
+ /** 子设备对应的网关设备 id,可以根据此进行网关面板的状态刷新 */
4404
+ gwId: string
4405
+ /**
4406
+ * dps
4407
+ * 变化的数据
4408
+ */
4409
+ dps: Record<string, {}>
4410
+ /**
4411
+ * options
4412
+ * 预留的标记位,后续可以区分来源等
4413
+ */
4414
+ options: Record<string, {}>
4415
+ }
4416
+
4417
+ export type MqttResponse = {
4418
+ /** 设备 id */
4419
+ deviceId?: string
4420
+ /** 原始消息数据 */
4421
+ message: Record<string, {}>
4422
+ /** 双端抹平后的消息数据 */
4423
+ messageData: Record<string, {}>
4424
+ /** 消息类型 */
4425
+ type: string
4426
+ /** 协议号 */
4427
+ protocol: number
4428
+ /** topic */
4429
+ topic?: string
4430
+ }
4431
+
4432
+ export type SocketResponse = {
4433
+ /** 消息内容 */
4434
+ message: Record<string, {}>
4435
+ /** 设备 id */
4436
+ deviceId: string
4437
+ /** 局域网消息 type */
4438
+ type: number
4439
+ }
4440
+
4441
+ export type Online = {
4442
+ /** 在线状态 */
4443
+ online: boolean
4444
+ /** 设备 id */
4445
+ deviceId: string
4446
+ /**
4447
+ * 设备在线类型(预留,后期使用)
4448
+ * Wi-Fi online 1 << 0
4449
+ * Local online 1 << 1
4450
+ * Bluetooth LE online 1 << 2
4451
+ * Bluetooth LE mesh online 1 << 3
4452
+ */
4453
+ onlineType: number
4454
+ }
4455
+
4456
+ export type Device_KeiZSq = {
4457
+ /**
4458
+ * deviceId 设备id
4459
+ * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
4460
+ */
4461
+ deviceId: string
4462
+ /** dps 科学变化的数据 */
4463
+ dps?: Record<string, {}>
4464
+ }
4465
+
4466
+ export type OnDeviceRemovedBody = {
4467
+ /** 设备id */
4468
+ deviceId: string
4469
+ }
4470
+
4471
+ export type MqttConnectStateResponse = {
4472
+ /**
4473
+ * mqtt连接状态
4474
+ * 0 连接失败
4475
+ * 1 连接成功
4476
+ */
4477
+ connectState: number
4478
+ }
4479
+
2849
4480
  export type GroupInfoResponse = {
2850
4481
  /** groupId 群组id */
2851
4482
  groupId: string
@@ -2918,6 +4549,300 @@ declare namespace ty.device {
2918
4549
  wifiActivator: boolean
2919
4550
  }
2920
4551
 
4552
+ export type DeviceNameParams = {
4553
+ /** deviceId 设备id */
4554
+ deviceId: string
4555
+ /** name 设备名称 */
4556
+ name: string
4557
+ }
4558
+
4559
+ export type DeviceOnlineTypeResponse = {
4560
+ /** 设备网络在线类型 */
4561
+ onlineType: number
4562
+ }
4563
+
4564
+ export type Product = {
4565
+ /** 产品id */
4566
+ productId: string
4567
+ }
4568
+
4569
+ export type ProductInfo = {
4570
+ /** 面板配置项,可以在平台进行配置 */
4571
+ panelConfig: Record<string, {}>
4572
+ /** 产品功能定义集合 */
4573
+ schema: string
4574
+ /** 产品功能定义集合拓展 */
4575
+ schemaExt: string
4576
+ /**
4577
+ * capability
4578
+ * 产品能力值,在 backend-ng 平台上可以查询对应的勾选项,整体业务逻辑会根据该数据进行划分
4579
+ * 区分设备类型也可以根据该属性进行调整,按二进制位运算的方式进行管理
4580
+ */
4581
+ capability: number
4582
+ /**
4583
+ * attribute
4584
+ * 产品属性定义,在 backend-ng 平台上可查到对应配置,使用二进制位运算的方式进行管理
4585
+ */
4586
+ attribute: number
4587
+ /**
4588
+ * productId
4589
+ * 产品 id
4590
+ */
4591
+ productId: string
4592
+ /**
4593
+ * category
4594
+ * 产品的分类
4595
+ */
4596
+ category: string
4597
+ /**
4598
+ * categoryCode
4599
+ * 产品的二级分类
4600
+ */
4601
+ categoryCode: string
4602
+ /**
4603
+ * standard
4604
+ * 是否为标准产品
4605
+ */
4606
+ standard: boolean
4607
+ /**
4608
+ * pcc
4609
+ * Thing自研蓝牙 mesh 产品的分类标识
4610
+ */
4611
+ pcc: string
4612
+ /**
4613
+ * vendorInfo
4614
+ * Thing自研蓝牙 mesh 产品的分类标识,融合类使用
4615
+ */
4616
+ vendorInfo: string
4617
+ /**
4618
+ * quickOpDps
4619
+ * 快捷操作的 dp ids
4620
+ */
4621
+ quickOpDps: string[]
4622
+ /**
4623
+ * faultDps
4624
+ * 告警/错误的显示 dp ids
4625
+ */
4626
+ faultDps: string[]
4627
+ /**
4628
+ * displayDps
4629
+ * 快捷操作的 dp ids
4630
+ */
4631
+ displayDps: string[]
4632
+ /**
4633
+ * displayMsgs
4634
+ * 快捷操作显示文案
4635
+ */
4636
+ displayMsgs: Record<string, {}>
4637
+ /**
4638
+ * uiPhase
4639
+ * ui 包当前环境,预览包或线上包
4640
+ */
4641
+ uiPhase: string
4642
+ /**
4643
+ * uiId
4644
+ * ui 包唯一包名识别
4645
+ */
4646
+ uiId: string
4647
+ /**
4648
+ * uiVersion
4649
+ * ui 包版本号
4650
+ */
4651
+ uiVersion: string
4652
+ /**
4653
+ * ui
4654
+ * ui 小标识
4655
+ */
4656
+ ui: string
4657
+ /**
4658
+ * rnFind
4659
+ * 是否有包含 RN 包
4660
+ */
4661
+ rnFind: boolean
4662
+ /**
4663
+ * uiType
4664
+ * ui 包类型
4665
+ */
4666
+ uiType: string
4667
+ /**
4668
+ * uiName
4669
+ * ui 包名称
4670
+ */
4671
+ uiName: string
4672
+ /**
4673
+ * i18nTime
4674
+ * 产品语言包最新更新时间
4675
+ */
4676
+ i18nTime: number
4677
+ /**
4678
+ * supportGroup
4679
+ * 是否支持创建群组
4680
+ */
4681
+ supportGroup: boolean
4682
+ /**
4683
+ * supportSGroup
4684
+ * 是否支持创建标准群组
4685
+ */
4686
+ supportSGroup: boolean
4687
+ /**
4688
+ * configMetas
4689
+ * 产品特殊配置项,一些功能业务的特殊配置
4690
+ */
4691
+ configMetas: Record<string, {}>
4692
+ /**
4693
+ * productVer
4694
+ * 产品版本
4695
+ */
4696
+ productVer: string
4697
+ }
4698
+
4699
+ export type Mesh = {
4700
+ /** 网关设备id或上级节点id */
4701
+ meshId: string
4702
+ }
4703
+
4704
+ export type DeviceOnline = {
4705
+ /** 设备id */
4706
+ deviceId: string
4707
+ /**
4708
+ * 设备在线类型,
4709
+ * Wi-Fi online 1 << 0
4710
+ * Local online 1 << 1
4711
+ * Bluetooth LE online 1 << 2
4712
+ * Bluetooth LE mesh online 1 << 3
4713
+ */
4714
+ onlineType: number
4715
+ }
4716
+
4717
+ export type DpsPublish = {
4718
+ /** 设备id */
4719
+ deviceId: string
4720
+ /** dps */
4721
+ dps: Record<string, {}>
4722
+ /**
4723
+ * 下发通道类型
4724
+ * 0: 局域网
4725
+ * 1: 网络
4726
+ * 2: 自动
4727
+ */
4728
+ mode: number
4729
+ /**
4730
+ * 下发通道的优先级
4731
+ * LAN = 0, // LAN
4732
+ * MQTT = 1, // MQTT
4733
+ * HTTP = 2, // Http
4734
+ * BLE = 3, // Single Point Bluetooth
4735
+ * SIGMesh = 4, // Sig Mesh
4736
+ * BLEMesh = 5, // Thing Private Mesh
4737
+ * BLEBeacon = 6, // Beacon
4738
+ */
4739
+ pipelines: number[]
4740
+ /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
4741
+ options: Record<string, {}>
4742
+ }
4743
+
4744
+ export type QueryDps = {
4745
+ /** 设备id */
4746
+ deviceId: string
4747
+ /** dpids 数组 */
4748
+ dpIds: number[]
4749
+ }
4750
+
4751
+ export type MqttMessage = {
4752
+ /** 消息内容 */
4753
+ message: Record<string, {}>
4754
+ /** 设备id */
4755
+ deviceId: string
4756
+ /** 协议号 */
4757
+ protocol: number
4758
+ /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
4759
+ options: Record<string, {}>
4760
+ }
4761
+
4762
+ export type LanMessageParams = {
4763
+ /** 消息内容 */
4764
+ message: string
4765
+ /** 设备id */
4766
+ deviceId: string
4767
+ /** 协议号 */
4768
+ protocol: number
4769
+ /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
4770
+ options?: Record<string, {}>
4771
+ }
4772
+
4773
+ export type SocketMessage = {
4774
+ /** 消息内容 */
4775
+ message: Record<string, {}>
4776
+ /** 设备id */
4777
+ deviceId: string
4778
+ /** 局域网消息 type */
4779
+ type: number
4780
+ /** 预留下发逻辑配置标记,后续可以拓展,例如下发声音,下发操作后续动作等等 */
4781
+ options: Record<string, {}>
4782
+ }
4783
+
4784
+ export type DeviceProperties = {
4785
+ /** the properties map */
4786
+ properties: Record<string, Object>
4787
+ }
4788
+
4789
+ export type DeviceProperty = {
4790
+ /** deviceId */
4791
+ deviceId: string
4792
+ /** the custom data key */
4793
+ code: string
4794
+ /** the custom data value */
4795
+ value: string
4796
+ }
4797
+
4798
+ export type DevicePropertyCB = {
4799
+ /** deviceId */
4800
+ deviceId: string
4801
+ /** set DeviceProperty successfully */
4802
+ result: boolean
4803
+ }
4804
+
4805
+ export type SyncDeviceInfoParams = {
4806
+ /** 设备id */
4807
+ deviceId: string
4808
+ }
4809
+
4810
+ export type SubscribeDeviceRemovedParams = {
4811
+ /** 设备id */
4812
+ deviceId: string
4813
+ }
4814
+
4815
+ export type UnSubscribeDeviceRemovedParams = {
4816
+ /** 设备id */
4817
+ deviceId: string
4818
+ }
4819
+
4820
+ export type MQTTDeviceListenerParams = {
4821
+ /**
4822
+ * deviceId 设备id
4823
+ * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
4824
+ */
4825
+ deviceId: string
4826
+ }
4827
+
4828
+ export type MQTTProtocolListenerParams = {
4829
+ /**
4830
+ * protocol 协议号
4831
+ * MQTT预定义的协议号
4832
+ */
4833
+ protocol: number
4834
+ }
4835
+
4836
+ export type DeviceListListenerParams = {
4837
+ /** 需注册的设备列表 */
4838
+ deviceIdList: string[]
4839
+ }
4840
+
4841
+ export type TopicListListenerParams = {
4842
+ /** 需监听的topic列表 */
4843
+ topicList: string[]
4844
+ }
4845
+
2921
4846
  export type OTAUpdateInfoParams = {
2922
4847
  /**
2923
4848
  * deviceId
@@ -3227,7 +5152,7 @@ declare namespace ty.device {
3227
5152
  warningText: string
3228
5153
  }
3229
5154
 
3230
- export type Device_DS3KTV = {
5155
+ export type Device_2Szsn0 = {
3231
5156
  /**
3232
5157
  * deviceId
3233
5158
  * 设备 id
@@ -3272,11 +5197,212 @@ declare namespace ty.device {
3272
5197
  services: ThirdPartyService[]
3273
5198
  }
3274
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
+
3275
5401
  export type DeviceListResponse = {
3276
5402
  /** groupId 群组id */
3277
5403
  groupId: string
3278
5404
  /** deviceList 设备列表 */
3279
- deviceList: DeviceInfo[]
5405
+ deviceList: DeviceInfo_SLAb2e[]
3280
5406
  }
3281
5407
 
3282
5408
  export type DeviceNumResponse = {
@@ -3430,7 +5556,7 @@ declare namespace ty.device {
3430
5556
  /** The custom DP name. */
3431
5557
  dpName: {}
3432
5558
  /** The device list. */
3433
- deviceList: DeviceInfo[]
5559
+ deviceList: DeviceInfo_SLAb2e[]
3434
5560
  /** The local short address of groups. */
3435
5561
  localId: string
3436
5562
  /** The subclass. */
@@ -3505,20 +5631,6 @@ declare namespace ty.device {
3505
5631
  deviceId: string
3506
5632
  }
3507
5633
 
3508
- export type RNPanelInfoBean = {
3509
- /**
3510
- * RN设备面板属性
3511
- * 设备模型
3512
- * deviceId 设备Id
3513
- */
3514
- deviceId: string
3515
- /**
3516
- * 面板初始化参数
3517
- * initialProps 初始化参数
3518
- */
3519
- initialProps?: Record<string, {}>
3520
- }
3521
-
3522
5634
  export type ThingProperty = {
3523
5635
  /** 属性id */
3524
5636
  abilityId: number