@ray-js/api 1.6.0-beta.8 → 1.6.0

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 (81) hide show
  1. package/@types/BaseKit.d.ts +837 -37
  2. package/@types/BizKit.d.ts +1831 -85
  3. package/@types/DeviceKit.d.ts +581 -58
  4. package/@types/HomeKit.d.ts +0 -74
  5. package/@types/MiniKit.d.ts +411 -8
  6. package/@types/api-cloud.d.ts +145 -0
  7. package/@types/api-extend.d.ts +42 -10
  8. package/@types/api.d.ts +3 -0
  9. package/@types/gateway.d.ts +146 -0
  10. package/@types/health.d.ts +309 -0
  11. package/lib/{BaseKit-3.11.0.d.ts → BaseKit-3.14.3.d.ts} +29 -1
  12. package/lib/{BaseKit-3.11.0.js → BaseKit-3.14.3.js} +32 -1
  13. package/lib/BizKit-4.10.4.d.ts +84 -0
  14. package/lib/{BizKit-3.2.7.js → BizKit-4.10.4.js} +46 -5
  15. package/lib/{DeviceKit-3.3.1.d.ts → DeviceKit-4.9.0.d.ts} +22 -1
  16. package/lib/{DeviceKit-3.3.1.js → DeviceKit-4.9.0.js} +66 -0
  17. package/lib/HomeKit-3.1.4.d.ts +0 -1
  18. package/lib/MapKit-3.4.13.d.ts +0 -1
  19. package/lib/{MiniKit-3.1.0.d.ts → MiniKit-3.12.1.d.ts} +11 -1
  20. package/lib/{MiniKit-3.1.0.js → MiniKit-3.12.1.js} +12 -1
  21. package/lib/OutdoorKit-1.0.4.d.ts +0 -1
  22. package/lib/P2PKit-2.0.3.d.ts +0 -1
  23. package/lib/PlayNetKit-1.1.3.d.ts +24 -24
  24. package/lib/all-kits.d.ts +5 -5
  25. package/lib/all-kits.js +5 -5
  26. package/lib/cloud/device.d.ts +3 -3
  27. package/lib/cloud/gateway.d.ts +11 -0
  28. package/lib/cloud/gateway.js +39 -0
  29. package/lib/cloud/health.d.ts +19 -0
  30. package/lib/cloud/health.js +71 -0
  31. package/lib/cloud/index.d.ts +3 -0
  32. package/lib/cloud/index.js +6 -1
  33. package/lib/cloud/interface.d.ts +40 -1
  34. package/lib/cloud/laser-clean/index.d.ts +3 -0
  35. package/lib/cloud/laser-clean/index.js +3 -0
  36. package/lib/cloud/laser-clean/map.d.ts +3 -0
  37. package/lib/cloud/laser-clean/map.js +4 -0
  38. package/lib/cloud/laser-clean/record.d.ts +3 -0
  39. package/lib/cloud/laser-clean/record.js +4 -0
  40. package/lib/cloud/laser-clean/voice.d.ts +2 -0
  41. package/lib/cloud/laser-clean/voice.js +3 -0
  42. package/lib/cloud/recipe/basket.js +1 -0
  43. package/lib/cloud/recipe/custom.js +1 -0
  44. package/lib/cloud/recipe/menu.js +1 -0
  45. package/lib/cloud/recipe/query.js +1 -0
  46. package/lib/cloud/recipe/score.js +1 -0
  47. package/lib/cloud/recipe/star.js +1 -0
  48. package/lib/getBoundingClientRect/index.thing.js +1 -0
  49. package/lib/getBoundingClientRect/index.wechat.js +1 -0
  50. package/lib/getCdnUrl/index.thing.js +13 -8
  51. package/lib/hideTabBar/index.d.ts +4 -5
  52. package/lib/index.d.ts +0 -1
  53. package/lib/navigateBack/index.d.ts +0 -1
  54. package/lib/navigateTo/index.d.ts +0 -1
  55. package/lib/panel/devInfo/index.js +7 -1
  56. package/lib/panel/i18n/index.js +4 -0
  57. package/lib/panel/i18n/index.wechat.js +4 -0
  58. package/lib/panel/publishDps.js +2 -0
  59. package/lib/reLaunch/index.d.ts +0 -1
  60. package/lib/redirectTo/index.d.ts +0 -1
  61. package/lib/redirectTo/index.js +1 -0
  62. package/lib/requestCloud/index.d.ts +0 -1
  63. package/lib/setNavigationBarColor/index.d.ts +0 -1
  64. package/lib/setNavigationBarTitle/index.d.ts +0 -1
  65. package/lib/showTabBar/index.d.ts +4 -5
  66. package/lib/switchTab/index.d.ts +0 -1
  67. package/lib/utils.wechat.js +1 -0
  68. package/lib/viewAPI.d.ts +1 -1
  69. package/lib/viewAPI.js +2 -1
  70. package/package.json +8 -8
  71. package/lib/BizKit-3.2.7.d.ts +0 -46
  72. package/lib/cloud/doorlock/README.md +0 -62
  73. package/lib/cloud/doorlock/auth.md +0 -323
  74. package/lib/cloud/doorlock/device.md +0 -265
  75. package/lib/cloud/doorlock/log.md +0 -153
  76. package/lib/cloud/doorlock/member-opmode.md +0 -279
  77. package/lib/cloud/doorlock/member.md +0 -276
  78. package/lib/cloud/doorlock/offline-pwd.md +0 -155
  79. package/lib/cloud/doorlock/temp-pwd.md +0 -362
  80. package/lib/cloud/doorlock/unlock-method.md +0 -121
  81. package/lib/cloud/doorlock/unlock.md +0 -222
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * DeviceKit
3
3
  *
4
- * @version 4.1.9
4
+ * @version 4.9.0
5
5
  */
6
6
  declare namespace ty.device {
7
7
  /**
@@ -795,6 +795,98 @@ declare namespace ty.device {
795
795
  }) => void
796
796
  }): void
797
797
 
798
+ /**
799
+ * 激活设备的扩展模块
800
+ */
801
+ export function activeDeviceExtendModule(params: {
802
+ /** 设备id */
803
+ deviceId: string
804
+ /** Wi-Fi的ssid */
805
+ ssid?: string
806
+ /** Wi-Fi的pwd */
807
+ password?: string
808
+ /**
809
+ * 激活的类型
810
+ * 0:普通双模设备的连云激活
811
+ * 1:ble+x设备的可插拔模块的连云激活
812
+ * 2:ble+Wi-Fi设备的 Wi-Fi模块的连云激活
813
+ * 区别:类型0、2需要传设备ID、Wi-Fi的ssid和pwd。类型位1只需传设备id
814
+ */
815
+ activeType: number
816
+ complete?: () => void
817
+ success?: (params: null) => void
818
+ fail?: (params: {
819
+ errorMsg: string
820
+ errorCode: string | number
821
+ innerError: {
822
+ errorCode: string | number
823
+ errorMsg: string
824
+ }
825
+ }) => void
826
+ }): void
827
+
828
+ /**
829
+ * 更新mesh设备proxy开关状态
830
+ */
831
+ export function updateMeshProxyState(params: {
832
+ /** 设备id */
833
+ deviceId: string
834
+ /** mesh设备的Proxy或relay功能是否开启 */
835
+ isOpen: boolean
836
+ complete?: () => void
837
+ success?: (params: null) => void
838
+ fail?: (params: {
839
+ errorMsg: string
840
+ errorCode: string | number
841
+ innerError: {
842
+ errorCode: string | number
843
+ errorMsg: string
844
+ }
845
+ }) => void
846
+ }): void
847
+
848
+ /**
849
+ * 更新mesh设备relay开关状态
850
+ */
851
+ export function updateMeshRelayState(params: {
852
+ /** 设备id */
853
+ deviceId: string
854
+ /** mesh设备的Proxy或relay功能是否开启 */
855
+ isOpen: boolean
856
+ complete?: () => void
857
+ success?: (params: null) => void
858
+ fail?: (params: {
859
+ errorMsg: string
860
+ errorCode: string | number
861
+ innerError: {
862
+ errorCode: string | number
863
+ errorMsg: string
864
+ }
865
+ }) => void
866
+ }): void
867
+
868
+ /**
869
+ * 操作蓝牙连接记录打点
870
+ */
871
+ export function recordBleConnectEvent(params: {
872
+ /** 设备id */
873
+ deviceId: string
874
+ /** 来源: 1: 门锁面板, 其他-暂未定义,后续可扩展 */
875
+ src: number
876
+ /** 操作动作id,用于关联其他埋点的信息id */
877
+ actId: string
878
+ complete?: () => void
879
+ success?: (params: null) => void
880
+ fail?: (params: {
881
+ errorMsg: string
882
+ errorCode: string | number
883
+ innerError: {
884
+ errorCode: string | number
885
+ errorMsg: string
886
+ }
887
+ }) => void
888
+ }): void
889
+
798
890
  /**
799
891
  * 使网关进入配网模式,对其子设备进行配网
800
892
  */
@@ -1016,6 +1108,101 @@ declare namespace ty.device {
1016
1108
  }) => void
1017
1109
  }): void
1018
1110
 
1111
+ /**
1112
+ * 查询设备Wi-Fi信号
1113
+ */
1114
+ export function requestWifiSignal(params: {
1115
+ /**
1116
+ * deviceId 设备id
1117
+ * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
1118
+ */
1119
+ deviceId: string
1120
+ /** dps */
1121
+ dps?: Record<string, {}>
1122
+ complete?: () => void
1123
+ success?: (params: string) => void
1124
+ fail?: (params: {
1125
+ errorMsg: string
1126
+ errorCode: string | number
1127
+ innerError: {
1128
+ errorCode: string | number
1129
+ errorMsg: string
1130
+ }
1131
+ }) => void
1132
+ }): void
1133
+
1134
+ /**
1135
+ * 大禹状态同步,让其他直连节点在线的设备状态同步到大禹
1136
+ */
1137
+ export function yuChannelSync(params?: {
1138
+ complete?: () => void
1139
+ success?: (params: null) => void
1140
+ fail?: (params: {
1141
+ errorMsg: string
1142
+ errorCode: string | number
1143
+ innerError: {
1144
+ errorCode: string | number
1145
+ errorMsg: string
1146
+ }
1147
+ }) => void
1148
+ }): void
1149
+
1150
+ /**
1151
+ * 大禹状态同步,让其他直连节点在线的设备状态同步到大禹
1152
+ */
1153
+ export function yuChannelSyncSync(): null
1154
+
1155
+ /**
1156
+ * 大禹在线状态
1157
+ */
1158
+ export function isYuDeviceOnline(params: {
1159
+ /**
1160
+ * deviceId 设备id
1161
+ * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
1162
+ */
1163
+ deviceId: string
1164
+ /** dps */
1165
+ dps?: Record<string, {}>
1166
+ complete?: () => void
1167
+ success?: (params: boolean) => void
1168
+ fail?: (params: {
1169
+ errorMsg: string
1170
+ errorCode: string | number
1171
+ innerError: {
1172
+ errorCode: string | number
1173
+ errorMsg: string
1174
+ }
1175
+ }) => void
1176
+ }): void
1177
+
1178
+ /**
1179
+ * 大禹在线状态
1180
+ */
1181
+ export function isYuDeviceOnlineSync(device?: Device_RSEpyu): boolean
1182
+
1183
+ /**
1184
+ * 同步Mesh设备的dps点
1185
+ */
1186
+ export function syncDeviceMeshDps(params: {
1187
+ /**
1188
+ * deviceId 设备id
1189
+ * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
1190
+ */
1191
+ deviceId: string
1192
+ /** dps */
1193
+ dps?: Record<string, {}>
1194
+ complete?: () => void
1195
+ success?: (params: null) => void
1196
+ fail?: (params: {
1197
+ errorMsg: string
1198
+ errorCode: string | number
1199
+ innerError: {
1200
+ errorCode: string | number
1201
+ errorMsg: string
1202
+ }
1203
+ }) => void
1204
+ }): void
1205
+
1019
1206
  /**
1020
1207
  * 修改设备名称
1021
1208
  */
@@ -1324,6 +1511,11 @@ declare namespace ty.device {
1324
1511
  * 设备对应的产品 id
1325
1512
  */
1326
1513
  productId: string
1514
+ /**
1515
+ * productVer
1516
+ * 设备对应的产品的版本号
1517
+ */
1518
+ productVer: string
1327
1519
  /**
1328
1520
  * bizAttribute
1329
1521
  * 业务属性能力
@@ -1425,6 +1617,19 @@ declare namespace ty.device {
1425
1617
  * 产品属性定义,在 backend-ng 平台上可查到对应配置,使用二进制位运算的方式进行管理
1426
1618
  */
1427
1619
  attributeString: string
1620
+ /**
1621
+ * 设备的扩展模块的类型
1622
+ * 0:无扩展模块
1623
+ * 1:表示存在扩展模块,即设备为ble+x的设备
1624
+ * 2:扩展模块为Wi-Fi模块。即设备为ble+Wi-Fi的设备
1625
+ */
1626
+ extModuleType: number
1627
+ /** mesh设备的relay功能是否开启 */
1628
+ isRelayOpen: boolean
1629
+ /** mesh设备的proxy功能是否开启 */
1630
+ isProxyOpen: boolean
1631
+ /** mesh设备是否支持proxy和relay功能 */
1632
+ isSupportProxyAndRelay: boolean
1428
1633
  }) => void
1429
1634
  fail?: (params: {
1430
1635
  errorMsg: string
@@ -1463,6 +1668,8 @@ declare namespace ty.device {
1463
1668
  export function getProductInfo(params: {
1464
1669
  /** 产品id */
1465
1670
  productId: string
1671
+ /** 产品版本号 */
1672
+ productVer?: string
1466
1673
  complete?: () => void
1467
1674
  success?: (params: {
1468
1675
  /** 面板配置项,可以在平台进行配置 */
@@ -1780,6 +1987,8 @@ declare namespace ty.device {
1780
1987
  deviceId: string
1781
1988
  /** dpids 数组 */
1782
1989
  dpIds: string[]
1990
+ /** 查询类型 0 */
1991
+ queryType?: number
1783
1992
  complete?: () => void
1784
1993
  success?: (params: boolean) => void
1785
1994
  fail?: (params: {
@@ -2240,6 +2449,29 @@ declare namespace ty.device {
2240
2449
  }) => void
2241
2450
  }): void
2242
2451
 
2452
+ /**
2453
+ * 获取固件升级信息
2454
+ */
2455
+ export function getOTAUpdateInfo(params: {
2456
+ /**
2457
+ * deviceId
2458
+ * 设备 id
2459
+ */
2460
+ deviceId: string
2461
+ /** 直连设备额外信息 */
2462
+ extra?: DirectlyDeviceExtraParams[]
2463
+ complete?: () => void
2464
+ success?: (params: OTAUpdateInfo[]) => void
2465
+ fail?: (params: {
2466
+ errorMsg: string
2467
+ errorCode: string | number
2468
+ innerError: {
2469
+ errorCode: string | number
2470
+ errorMsg: string
2471
+ }
2472
+ }) => void
2473
+ }): void
2474
+
2243
2475
  /**
2244
2476
  * 跳转设备详情
2245
2477
  */
@@ -3009,6 +3241,30 @@ declare namespace ty.device {
3009
3241
  }) => void
3010
3242
  }): void
3011
3243
 
3244
+ /**
3245
+ * 获取远程重启定时
3246
+ */
3247
+ export function getRemoteRebootTimers(params: {
3248
+ /**
3249
+ * deviceId
3250
+ * 设备 id
3251
+ */
3252
+ deviceId: string
3253
+ complete?: () => void
3254
+ success?: (params: {
3255
+ /** 定时列表 */
3256
+ timers: RemoteRebootTimers[]
3257
+ }) => void
3258
+ fail?: (params: {
3259
+ errorMsg: string
3260
+ errorCode: string | number
3261
+ innerError: {
3262
+ errorCode: string | number
3263
+ errorMsg: string
3264
+ }
3265
+ }) => void
3266
+ }): void
3267
+
3012
3268
  /**
3013
3269
  * 打开推荐场景详情页面
3014
3270
  */
@@ -3280,7 +3536,7 @@ declare namespace ty.device {
3280
3536
  /** groupId 群组id */
3281
3537
  groupId: string
3282
3538
  /** deviceList 设备列表 */
3283
- deviceList: DeviceInfo_GIIYoW[]
3539
+ deviceList: DeviceInfo_IKQtG9[]
3284
3540
  }) => void
3285
3541
  fail?: (params: {
3286
3542
  errorMsg: string
@@ -3533,7 +3789,7 @@ declare namespace ty.device {
3533
3789
  /** The custom DP name. */
3534
3790
  dpName: {}
3535
3791
  /** The device list. */
3536
- deviceList: DeviceInfo_GIIYoW[]
3792
+ deviceList: DeviceInfo_IKQtG9[]
3537
3793
  /** The local short address of groups. */
3538
3794
  localId: string
3539
3795
  /** The subclass. */
@@ -3685,7 +3941,7 @@ declare namespace ty.device {
3685
3941
  /** 设备模型 设备id */
3686
3942
  deviceId: string
3687
3943
  /** dpId */
3688
- dpIds: Object[]
3944
+ dpIds: string[]
3689
3945
  complete?: () => void
3690
3946
  success?: (params: null) => void
3691
3947
  fail?: (params: {
@@ -3699,7 +3955,7 @@ declare namespace ty.device {
3699
3955
  }): void
3700
3956
 
3701
3957
  /**
3702
- * 获取设备的固件版本状态
3958
+ * 获取设备的固件版本状态(即将废弃,请使用otaStatus)
3703
3959
  */
3704
3960
  export function checkOTAUpgradeStatus(params: {
3705
3961
  /**
@@ -3725,6 +3981,33 @@ declare namespace ty.device {
3725
3981
  }) => void
3726
3982
  }): void
3727
3983
 
3984
+ /**
3985
+ * 获取设备的固件版本状态
3986
+ */
3987
+ export function otaStatus(params: {
3988
+ /**
3989
+ * deviceId
3990
+ * 设备 id
3991
+ */
3992
+ deviceId: string
3993
+ complete?: () => void
3994
+ success?: (params: {
3995
+ /**
3996
+ * status
3997
+ * 设备的固件版本状态 0已是最新版本、1有待升级的固件、2正在升级、3成功、4失败、5等待唤醒、6下载、7超时、13排队中、100准备中
3998
+ */
3999
+ status: number
4000
+ }) => void
4001
+ fail?: (params: {
4002
+ errorMsg: string
4003
+ errorCode: string | number
4004
+ innerError: {
4005
+ errorCode: string | number
4006
+ errorMsg: string
4007
+ }
4008
+ }) => void
4009
+ }): void
4010
+
3728
4011
  /**
3729
4012
  * 跳转设备升级页面
3730
4013
  */
@@ -3746,6 +4029,22 @@ declare namespace ty.device {
3746
4029
  }) => void
3747
4030
  }): void
3748
4031
 
4032
+ /**
4033
+ * 注册ota升级监听
4034
+ */
4035
+ export function registerOTACompleted(params?: {
4036
+ complete?: () => void
4037
+ success?: (params: null) => void
4038
+ fail?: (params: {
4039
+ errorMsg: string
4040
+ errorCode: string | number
4041
+ innerError: {
4042
+ errorCode: string | number
4043
+ errorMsg: string
4044
+ }
4045
+ }) => void
4046
+ }): void
4047
+
3749
4048
  /**
3750
4049
  * 设备是否支持物模型
3751
4050
  */
@@ -3916,12 +4215,16 @@ declare namespace ty.device {
3916
4215
  /**
3917
4216
  * 远离beacon设备的事件
3918
4217
  */
3919
- export function onLeaveBeaconFence(listener: (params: LeaveBeaconFenceEvent) => void): void
4218
+ export function onLeaveBeaconFence(
4219
+ listener: (params: LeaveBeaconFenceEvent) => void
4220
+ ): void
3920
4221
 
3921
4222
  /**
3922
4223
  * 取消监听:远离beacon设备的事件
3923
4224
  */
3924
- export function offLeaveBeaconFence(listener: (params: LeaveBeaconFenceEvent) => void): void
4225
+ export function offLeaveBeaconFence(
4226
+ listener: (params: LeaveBeaconFenceEvent) => void
4227
+ ): void
3925
4228
 
3926
4229
  /**
3927
4230
  * 传输文件的到蓝牙设备的进度事件
@@ -3982,12 +4285,16 @@ declare namespace ty.device {
3982
4285
  /**
3983
4286
  * 扫描到设备后进行通知
3984
4287
  */
3985
- export function onBLEScanBindDevice(listener: (params: ThingBLEScanDeviceEvent) => void): void
4288
+ export function onBLEScanBindDevice(
4289
+ listener: (params: ThingBLEScanDeviceEvent) => void
4290
+ ): void
3986
4291
 
3987
4292
  /**
3988
4293
  * 取消监听:扫描到设备后进行通知
3989
4294
  */
3990
- export function offBLEScanBindDevice(listener: (params: ThingBLEScanDeviceEvent) => void): void
4295
+ export function offBLEScanBindDevice(
4296
+ listener: (params: ThingBLEScanDeviceEvent) => void
4297
+ ): void
3991
4298
 
3992
4299
  /**
3993
4300
  * 大数据从设备传输到App成功的事件
@@ -4020,12 +4327,16 @@ declare namespace ty.device {
4020
4327
  /**
4021
4328
  * 子设备配网结果事件
4022
4329
  */
4023
- export function onSubDeviceInfoUpdateEvent(listener: (params: GWActivationRespond) => void): void
4330
+ export function onSubDeviceInfoUpdateEvent(
4331
+ listener: (params: GWActivationRespond) => void
4332
+ ): void
4024
4333
 
4025
4334
  /**
4026
4335
  * 取消监听:子设备配网结果事件
4027
4336
  */
4028
- export function offSubDeviceInfoUpdateEvent(listener: (params: GWActivationRespond) => void): void
4337
+ export function offSubDeviceInfoUpdateEvent(
4338
+ listener: (params: GWActivationRespond) => void
4339
+ ): void
4029
4340
 
4030
4341
  /**
4031
4342
  * 免配网-设备扫描结果事件
@@ -4054,102 +4365,142 @@ declare namespace ty.device {
4054
4365
  /**
4055
4366
  * MQTT消息通道消息上报
4056
4367
  */
4057
- export function onMqttMessageReceived(listener: (params: MqttResponse) => void): void
4368
+ export function onMqttMessageReceived(
4369
+ listener: (params: MqttResponse) => void
4370
+ ): void
4058
4371
 
4059
4372
  /**
4060
4373
  * 取消监听:MQTT消息通道消息上报
4061
4374
  */
4062
- export function offMqttMessageReceived(listener: (params: MqttResponse) => void): void
4375
+ export function offMqttMessageReceived(
4376
+ listener: (params: MqttResponse) => void
4377
+ ): void
4063
4378
 
4064
4379
  /**
4065
4380
  * socket消息通道消息上报
4066
4381
  */
4067
- export function onSocketMessageReceived(listener: (params: SocketResponse) => void): void
4382
+ export function onSocketMessageReceived(
4383
+ listener: (params: SocketResponse) => void
4384
+ ): void
4068
4385
 
4069
4386
  /**
4070
4387
  * 取消监听:socket消息通道消息上报
4071
4388
  */
4072
- export function offSocketMessageReceived(listener: (params: SocketResponse) => void): void
4389
+ export function offSocketMessageReceived(
4390
+ listener: (params: SocketResponse) => void
4391
+ ): void
4073
4392
 
4074
4393
  /**
4075
4394
  * 设备上下线状态变更
4076
4395
  */
4077
- export function onDeviceOnlineStatusUpdate(listener: (params: Online) => void): void
4396
+ export function onDeviceOnlineStatusUpdate(
4397
+ listener: (params: Online) => void
4398
+ ): void
4078
4399
 
4079
4400
  /**
4080
4401
  * 取消监听:设备上下线状态变更
4081
4402
  */
4082
- export function offDeviceOnlineStatusUpdate(listener: (params: Online) => void): void
4403
+ export function offDeviceOnlineStatusUpdate(
4404
+ listener: (params: Online) => void
4405
+ ): void
4083
4406
 
4084
4407
  /**
4085
4408
  * 设备信息变化
4086
4409
  */
4087
- export function onDeviceInfoUpdated(listener: (params: Device_ZZifb8) => void): void
4410
+ export function onDeviceInfoUpdated(
4411
+ listener: (params: Device_RSEpyu) => void
4412
+ ): void
4088
4413
 
4089
4414
  /**
4090
4415
  * 取消监听:设备信息变化
4091
4416
  */
4092
- export function offDeviceInfoUpdated(listener: (params: Device_ZZifb8) => void): void
4417
+ export function offDeviceInfoUpdated(
4418
+ listener: (params: Device_RSEpyu) => void
4419
+ ): void
4093
4420
 
4094
4421
  /**
4095
4422
  * 设备移除事件
4096
4423
  */
4097
- export function onDeviceRemoved(listener: (params: OnDeviceRemovedBody) => void): void
4424
+ export function onDeviceRemoved(
4425
+ listener: (params: OnDeviceRemovedBody) => void
4426
+ ): void
4098
4427
 
4099
4428
  /**
4100
4429
  * 取消监听:设备移除事件
4101
4430
  */
4102
- export function offDeviceRemoved(listener: (params: OnDeviceRemovedBody) => void): void
4431
+ export function offDeviceRemoved(
4432
+ listener: (params: OnDeviceRemovedBody) => void
4433
+ ): void
4103
4434
 
4104
4435
  /**
4105
4436
  * mqtt连接状态变化事件
4106
4437
  */
4107
- export function onMqttConnectState(listener: (params: MqttConnectStateResponse) => void): void
4438
+ export function onMqttConnectState(
4439
+ listener: (params: MqttConnectStateResponse) => void
4440
+ ): void
4108
4441
 
4109
4442
  /**
4110
4443
  * 取消监听:mqtt连接状态变化事件
4111
4444
  */
4112
- export function offMqttConnectState(listener: (params: MqttConnectStateResponse) => void): void
4445
+ export function offMqttConnectState(
4446
+ listener: (params: MqttConnectStateResponse) => void
4447
+ ): void
4113
4448
 
4114
4449
  /**
4115
4450
  * 网关子设备dp信息变化事件
4116
4451
  */
4117
- export function onSubDeviceDpUpdate(listener: (params: Device_ZZifb8) => void): void
4452
+ export function onSubDeviceDpUpdate(
4453
+ listener: (params: Device_RSEpyu) => void
4454
+ ): void
4118
4455
 
4119
4456
  /**
4120
4457
  * 取消监听:网关子设备dp信息变化事件
4121
4458
  */
4122
- export function offSubDeviceDpUpdate(listener: (params: Device_ZZifb8) => void): void
4459
+ export function offSubDeviceDpUpdate(
4460
+ listener: (params: Device_RSEpyu) => void
4461
+ ): void
4123
4462
 
4124
4463
  /**
4125
4464
  * 网关子设备被移除事件
4126
4465
  */
4127
- export function onSubDeviceRemoved(listener: (params: Device_ZZifb8) => void): void
4466
+ export function onSubDeviceRemoved(
4467
+ listener: (params: Device_RSEpyu) => void
4468
+ ): void
4128
4469
 
4129
4470
  /**
4130
4471
  * 取消监听:网关子设备被移除事件
4131
4472
  */
4132
- export function offSubDeviceRemoved(listener: (params: Device_ZZifb8) => void): void
4473
+ export function offSubDeviceRemoved(
4474
+ listener: (params: Device_RSEpyu) => void
4475
+ ): void
4133
4476
 
4134
4477
  /**
4135
4478
  * 网关添加子设备的事件
4136
4479
  */
4137
- export function onSubDeviceAdded(listener: (params: Device_ZZifb8) => void): void
4480
+ export function onSubDeviceAdded(
4481
+ listener: (params: Device_RSEpyu) => void
4482
+ ): void
4138
4483
 
4139
4484
  /**
4140
4485
  * 取消监听:网关添加子设备的事件
4141
4486
  */
4142
- export function offSubDeviceAdded(listener: (params: Device_ZZifb8) => void): void
4487
+ export function offSubDeviceAdded(
4488
+ listener: (params: Device_RSEpyu) => void
4489
+ ): void
4143
4490
 
4144
4491
  /**
4145
4492
  * 网关子设备信息变化的事件
4146
4493
  */
4147
- export function onSubDeviceInfoUpdate(listener: (params: Device_ZZifb8) => void): void
4494
+ export function onSubDeviceInfoUpdate(
4495
+ listener: (params: Device_RSEpyu) => void
4496
+ ): void
4148
4497
 
4149
4498
  /**
4150
4499
  * 取消监听:网关子设备信息变化的事件
4151
4500
  */
4152
- export function offSubDeviceInfoUpdate(listener: (params: Device_ZZifb8) => void): void
4501
+ export function offSubDeviceInfoUpdate(
4502
+ listener: (params: Device_RSEpyu) => void
4503
+ ): void
4153
4504
 
4154
4505
  /**
4155
4506
  * 定时变化事件
@@ -4164,62 +4515,100 @@ declare namespace ty.device {
4164
4515
  /**
4165
4516
  * 子功能数据变化事件
4166
4517
  */
4167
- export function onSubFunctionDataChange(listener: (params: SubFunctionParams) => void): void
4518
+ export function onSubFunctionDataChange(
4519
+ listener: (params: SubFunctionParams) => void
4520
+ ): void
4168
4521
 
4169
4522
  /**
4170
4523
  * 取消监听:子功能数据变化事件
4171
4524
  */
4172
- export function offSubFunctionDataChange(listener: (params: SubFunctionParams) => void): void
4525
+ export function offSubFunctionDataChange(
4526
+ listener: (params: SubFunctionParams) => void
4527
+ ): void
4173
4528
 
4174
4529
  /**
4175
4530
  * 子功能分发事件
4176
4531
  */
4177
- export function onDispatchEvent(listener: (params: SubFunctionParams) => void): void
4532
+ export function onDispatchEvent(
4533
+ listener: (params: SubFunctionParams) => void
4534
+ ): void
4178
4535
 
4179
4536
  /**
4180
4537
  * 取消监听:子功能分发事件
4181
4538
  */
4182
- export function offDispatchEvent(listener: (params: SubFunctionParams) => void): void
4539
+ export function offDispatchEvent(
4540
+ listener: (params: SubFunctionParams) => void
4541
+ ): void
4183
4542
 
4184
4543
  /**
4185
4544
  * 群组内增加/移除设备事件
4186
4545
  */
4187
- export function onGroupInfoChange(listener: (params: GroupInfoResponse) => void): void
4546
+ export function onGroupInfoChange(
4547
+ listener: (params: GroupInfoResponse) => void
4548
+ ): void
4188
4549
 
4189
4550
  /**
4190
4551
  * 取消监听:群组内增加/移除设备事件
4191
4552
  */
4192
- export function offGroupInfoChange(listener: (params: GroupInfoResponse) => void): void
4553
+ export function offGroupInfoChange(
4554
+ listener: (params: GroupInfoResponse) => void
4555
+ ): void
4193
4556
 
4194
4557
  /**
4195
4558
  * 群组dpCode变化事件
4196
4559
  */
4197
- export function onGroupDpCodeChange(listener: (params: GroupDpCodeBean) => void): void
4560
+ export function onGroupDpCodeChange(
4561
+ listener: (params: GroupDpCodeBean) => void
4562
+ ): void
4198
4563
 
4199
4564
  /**
4200
4565
  * 取消监听:群组dpCode变化事件
4201
4566
  */
4202
- export function offGroupDpCodeChange(listener: (params: GroupDpCodeBean) => void): void
4567
+ export function offGroupDpCodeChange(
4568
+ listener: (params: GroupDpCodeBean) => void
4569
+ ): void
4203
4570
 
4204
4571
  /**
4205
4572
  * 群组移除事件
4206
4573
  */
4207
- export function onGroupRemovedEvent(listener: (params: GroupBean) => void): void
4574
+ export function onGroupRemovedEvent(
4575
+ listener: (params: GroupBean) => void
4576
+ ): void
4208
4577
 
4209
4578
  /**
4210
4579
  * 取消监听:群组移除事件
4211
4580
  */
4212
- export function offGroupRemovedEvent(listener: (params: GroupBean) => void): void
4581
+ export function offGroupRemovedEvent(
4582
+ listener: (params: GroupBean) => void
4583
+ ): void
4213
4584
 
4214
4585
  /**
4215
4586
  * 群组DP变更事件
4216
4587
  */
4217
- export function onGroupDpDataChangeEvent(listener: (params: GroupDpDataBean) => void): void
4588
+ export function onGroupDpDataChangeEvent(
4589
+ listener: (params: GroupDpDataBean) => void
4590
+ ): void
4218
4591
 
4219
4592
  /**
4220
4593
  * 取消监听:群组DP变更事件
4221
4594
  */
4222
- export function offGroupDpDataChangeEvent(listener: (params: GroupDpDataBean) => void): void
4595
+ export function offGroupDpDataChangeEvent(
4596
+ listener: (params: GroupDpDataBean) => void
4597
+ ): void
4598
+
4599
+ /**
4600
+ * ota升级结果
4601
+ */
4602
+ export function onOtaCompleted(
4603
+ listener: (params: OtaCompletedParams) => void
4604
+ ): void
4605
+
4606
+ /**
4607
+ * 取消监听:ota升级结果
4608
+ */
4609
+ export function offOtaCompleted(
4610
+ listener: (params: OtaCompletedParams) => void
4611
+ ): void
4223
4612
 
4224
4613
  /**
4225
4614
  * 接收物模型消息事件。只有subscribeReceivedThingModelMessage订阅了,才会收到该事件。
@@ -4251,6 +4640,16 @@ declare namespace ty.device {
4251
4640
  deviceId: string
4252
4641
  }
4253
4642
 
4643
+ export type Device_RSEpyu = {
4644
+ /**
4645
+ * deviceId 设备id
4646
+ * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
4647
+ */
4648
+ deviceId: string
4649
+ /** dps */
4650
+ dps?: Record<string, {}>
4651
+ }
4652
+
4254
4653
  export type DeviceInfo = {
4255
4654
  /** 设备所处房间名 */
4256
4655
  roomName?: string
@@ -4362,6 +4761,11 @@ declare namespace ty.device {
4362
4761
  * 设备对应的产品 id
4363
4762
  */
4364
4763
  productId: string
4764
+ /**
4765
+ * productVer
4766
+ * 设备对应的产品的版本号
4767
+ */
4768
+ productVer: string
4365
4769
  /**
4366
4770
  * bizAttribute
4367
4771
  * 业务属性能力
@@ -4463,6 +4867,19 @@ declare namespace ty.device {
4463
4867
  * 产品属性定义,在 backend-ng 平台上可查到对应配置,使用二进制位运算的方式进行管理
4464
4868
  */
4465
4869
  attributeString: string
4870
+ /**
4871
+ * 设备的扩展模块的类型
4872
+ * 0:无扩展模块
4873
+ * 1:表示存在扩展模块,即设备为ble+x的设备
4874
+ * 2:扩展模块为Wi-Fi模块。即设备为ble+Wi-Fi的设备
4875
+ */
4876
+ extModuleType: number
4877
+ /** mesh设备的relay功能是否开启 */
4878
+ isRelayOpen: boolean
4879
+ /** mesh设备的proxy功能是否开启 */
4880
+ isProxyOpen: boolean
4881
+ /** mesh设备是否支持proxy和relay功能 */
4882
+ isSupportProxyAndRelay: boolean
4466
4883
  }
4467
4884
 
4468
4885
  export type Object = {}
@@ -4485,6 +4902,61 @@ declare namespace ty.device {
4485
4902
  unit: string
4486
4903
  }
4487
4904
 
4905
+ export type DirectlyDeviceExtraParams = {
4906
+ /** 固件类型 */
4907
+ type: string
4908
+ /** 版本 */
4909
+ version: string
4910
+ }
4911
+
4912
+ export type OTAUpdateInfo = {
4913
+ /** 升级文案 */
4914
+ desc: string
4915
+ /** 模组文案 */
4916
+ typeDesc: string
4917
+ /**
4918
+ * 升级状态
4919
+ * 0: 不需要升级. 1: 有新的固件可以升级. 2: 升级中. 5: 等待设备唤醒
4920
+ */
4921
+ upgradeStatus: number
4922
+ /** 固件版本 */
4923
+ version: string
4924
+ /** 设备当前固件版本 */
4925
+ currentVersion: string
4926
+ /** 升级超时时间,单位秒 */
4927
+ timeout: number
4928
+ /**
4929
+ * 升级提醒类型
4930
+ * 0: 提醒升级、2: 强制升级、3: 检测升级
4931
+ */
4932
+ upgradeType: number
4933
+ /** 固件类型 */
4934
+ type: number
4935
+ /**
4936
+ * 设备类型
4937
+ * 0: 普通设备. 1: 低功耗设备
4938
+ */
4939
+ devType: number
4940
+ /**
4941
+ * 升级过程中设备是否可控
4942
+ * 1: 可控. 0: 不可控
4943
+ */
4944
+ controlType: boolean
4945
+ /** 设备等待唤醒描述 */
4946
+ waitingDesc: string
4947
+ /** 升级描述 */
4948
+ upgradingDesc: string
4949
+ /** 设备是否可以升级 */
4950
+ canUpgrade: boolean
4951
+ /** 设备不能升级的原因 */
4952
+ remind: string
4953
+ /**
4954
+ * 固件升级模式
4955
+ * 0: 正常升级. 1: pid 版本升级
4956
+ */
4957
+ upgradeMode: number
4958
+ }
4959
+
4488
4960
  export type TimerConfig = {
4489
4961
  /**
4490
4962
  * background
@@ -4645,6 +5117,17 @@ declare namespace ty.device {
4645
5117
  isShow: boolean
4646
5118
  }
4647
5119
 
5120
+ export type RemoteRebootTimers = {
5121
+ /** 定时id */
5122
+ tid: string
5123
+ /** 定时时间 */
5124
+ time: string
5125
+ /** 定时循环 */
5126
+ loops: string
5127
+ /** 定时状态 */
5128
+ status: boolean
5129
+ }
5130
+
4648
5131
  export type SceneAction = {
4649
5132
  /** 条件 ID */
4650
5133
  id?: string
@@ -4698,6 +5181,8 @@ declare namespace ty.device {
4698
5181
  /** 条件默认图标 */
4699
5182
  defaultIconUrl?: string
4700
5183
  /** 动作展示信息 */
5184
+ actionDisplay?: string
5185
+ /** 动作展示信息 */
4701
5186
  actionDisplayNew?: Record<string, {}>
4702
5187
  /** 执行状态 */
4703
5188
  status?: boolean
@@ -4722,7 +5207,7 @@ declare namespace ty.device {
4722
5207
  cityName: string
4723
5208
  }
4724
5209
 
4725
- export type DeviceInfo_GIIYoW = {
5210
+ export type DeviceInfo_IKQtG9 = {
4726
5211
  /** 产品信息,schema,功能定义都在里面 */
4727
5212
  schema: {}[]
4728
5213
  /**
@@ -5030,16 +5515,6 @@ declare namespace ty.device {
5030
5515
  onlineType: number
5031
5516
  }
5032
5517
 
5033
- export type Device_ZZifb8 = {
5034
- /**
5035
- * deviceId 设备id
5036
- * 支持跨面板获取其他的设备信息,当前面板可以传当前设备的 id 来进行获取
5037
- */
5038
- deviceId: string
5039
- /** dps */
5040
- dps?: Record<string, {}>
5041
- }
5042
-
5043
5518
  export type OnDeviceRemovedBody = {
5044
5519
  /** 设备id */
5045
5520
  deviceId: string
@@ -5103,6 +5578,19 @@ declare namespace ty.device {
5103
5578
  dps: {}
5104
5579
  }
5105
5580
 
5581
+ export type OtaCompletedParams = {
5582
+ /**
5583
+ * deviceId
5584
+ * 设备 id
5585
+ */
5586
+ deviceId: string
5587
+ /**
5588
+ * result
5589
+ * 结果 0成功、1失败、2超时
5590
+ */
5591
+ result: number
5592
+ }
5593
+
5106
5594
  export type OnReceivedThingModelMessageBody = {
5107
5595
  /**
5108
5596
  * 类型
@@ -5170,6 +5658,8 @@ declare namespace ty.device {
5170
5658
  export type Product = {
5171
5659
  /** 产品id */
5172
5660
  productId: string
5661
+ /** 产品版本号 */
5662
+ productVer?: string
5173
5663
  }
5174
5664
 
5175
5665
  export type ProductInfo = {
@@ -5357,6 +5847,8 @@ declare namespace ty.device {
5357
5847
  deviceId: string
5358
5848
  /** dpids 数组 */
5359
5849
  dpIds: string[]
5850
+ /** 查询类型 0 */
5851
+ queryType?: number
5360
5852
  }
5361
5853
 
5362
5854
  export type MqttMessage = {
@@ -5487,6 +5979,16 @@ declare namespace ty.device {
5487
5979
  deviceId: string
5488
5980
  }
5489
5981
 
5982
+ export type GetOTAUpdateInfoParams = {
5983
+ /**
5984
+ * deviceId
5985
+ * 设备 id
5986
+ */
5987
+ deviceId: string
5988
+ /** 直连设备额外信息 */
5989
+ extra?: DirectlyDeviceExtraParams[]
5990
+ }
5991
+
5490
5992
  export type DeviceDetailParams = {
5491
5993
  /**
5492
5994
  * deviceId
@@ -5788,7 +6290,7 @@ declare namespace ty.device {
5788
6290
  warningText: string
5789
6291
  }
5790
6292
 
5791
- export type Device_ACEDBp = {
6293
+ export type Device_iNOIrs = {
5792
6294
  /**
5793
6295
  * deviceId
5794
6296
  * 设备 id
@@ -5861,6 +6363,19 @@ declare namespace ty.device {
5861
6363
  data?: Record<string, {}>
5862
6364
  }
5863
6365
 
6366
+ export type GetRemoteRebootTimersParams = {
6367
+ /**
6368
+ * deviceId
6369
+ * 设备 id
6370
+ */
6371
+ deviceId: string
6372
+ }
6373
+
6374
+ export type GetRemoteRebootTimersResult = {
6375
+ /** 定时列表 */
6376
+ timers: RemoteRebootTimers[]
6377
+ }
6378
+
5864
6379
  export type UiComponent = {
5865
6380
  /** 组件code */
5866
6381
  code: string
@@ -6066,7 +6581,7 @@ declare namespace ty.device {
6066
6581
  /** groupId 群组id */
6067
6582
  groupId: string
6068
6583
  /** deviceList 设备列表 */
6069
- deviceList: DeviceInfo_GIIYoW[]
6584
+ deviceList: DeviceInfo_IKQtG9[]
6070
6585
  }
6071
6586
 
6072
6587
  export type DeviceNumResponse = {
@@ -6220,7 +6735,7 @@ declare namespace ty.device {
6220
6735
  /** The custom DP name. */
6221
6736
  dpName: {}
6222
6737
  /** The device list. */
6223
- deviceList: DeviceInfo_GIIYoW[]
6738
+ deviceList: DeviceInfo_IKQtG9[]
6224
6739
  /** The local short address of groups. */
6225
6740
  localId: string
6226
6741
  /** The subclass. */
@@ -6268,7 +6783,7 @@ declare namespace ty.device {
6268
6783
  /** 设备模型 设备id */
6269
6784
  deviceId: string
6270
6785
  /** dpId */
6271
- dpIds: Object[]
6786
+ dpIds: string[]
6272
6787
  }
6273
6788
 
6274
6789
  export type CheckOTAUpgradeStatusParams = {
@@ -6287,6 +6802,14 @@ declare namespace ty.device {
6287
6802
  status: number
6288
6803
  }
6289
6804
 
6805
+ export type OtaStatusResponse = {
6806
+ /**
6807
+ * status
6808
+ * 设备的固件版本状态 0已是最新版本、1有待升级的固件、2正在升级、3成功、4失败、5等待唤醒、6下载、7超时、13排队中、100准备中
6809
+ */
6810
+ status: number
6811
+ }
6812
+
6290
6813
  export type OpenOTAUpgradeParams = {
6291
6814
  /**
6292
6815
  * deviceId