@ray-js/api 1.7.70 → 1.7.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/AIKit.d.ts +5509 -610
- package/@types/AIStreamKit.d.ts +2641 -0
- package/@types/AVideoKit.d.ts +1827 -0
- package/@types/BaseKit.d.ts +8682 -1893
- package/@types/BizKit.d.ts +6639 -1038
- package/@types/CategoryCommonBizKit.d.ts +1459 -0
- package/@types/CommunityKit.d.ts +154 -0
- package/@types/DeviceKit.d.ts +18475 -5662
- package/@types/GroupCITestKit.d.ts +651 -0
- package/@types/HealthKit.d.ts +2290 -357
- package/@types/HomeKit.d.ts +4068 -182
- package/@types/IPCKit.d.ts +4327 -1227
- package/@types/LightKit.d.ts +125 -0
- package/@types/MapKit.d.ts +1560 -204
- package/@types/MediaKit.d.ts +136 -16
- package/@types/MediaPlayerKit.d.ts +47 -0
- package/@types/MiniKit.d.ts +2976 -628
- package/@types/OutdoorKit.d.ts +1337 -24
- package/@types/P2PKit.d.ts +622 -103
- package/@types/PayKit.d.ts +115 -0
- package/@types/PlayNetKit.d.ts +3454 -1309
- package/@types/SweeperKit.d.ts +154 -0
- package/@types/ThirdAuthKit.d.ts +324 -0
- package/@types/ThirdPartyDeviceKit.d.ts +410 -0
- package/@types/WearKit.d.ts +10177 -375
- package/@types/gateway.d.ts +349 -61
- package/@types/health.d.ts +486 -304
- package/lib/AIKit-1.6.0.d.ts +265 -41
- package/lib/AIKit-1.6.0.js +374 -120
- package/lib/BaseKit-3.17.7.d.ts +704 -0
- package/lib/BaseKit-3.17.7.js +720 -1
- package/lib/BizKit-4.10.4.d.ts +336 -0
- package/lib/BizKit-4.10.4.js +342 -5
- package/lib/DeviceKit-4.13.1.d.ts +996 -0
- package/lib/DeviceKit-4.13.1.js +1247 -249
- package/lib/HealthKit-6.5.0.d.ts +210 -44
- package/lib/HealthKit-6.5.0.js +295 -128
- package/lib/HomeKit-3.1.4.d.ts +20 -6
- package/lib/HomeKit-3.1.4.js +29 -14
- package/lib/IPCKit-6.4.5.d.ts +375 -77
- package/lib/IPCKit-6.4.5.js +525 -228
- package/lib/MapKit-3.4.13.d.ts +70 -16
- package/lib/MapKit-3.4.13.js +98 -47
- package/lib/MediaKit-3.4.1.d.ts +5 -3
- package/lib/MediaKit-3.4.1.js +7 -6
- package/lib/MiniKit-3.14.1.d.ts +300 -0
- package/lib/MiniKit-3.14.1.js +302 -0
- package/lib/OutdoorKit-1.0.4.d.ts +55 -13
- package/lib/OutdoorKit-1.0.4.js +78 -35
- package/lib/P2PKit-2.0.3.d.ts +125 -27
- package/lib/P2PKit-2.0.3.js +175 -78
- package/lib/PlayNetKit-1.3.30.d.ts +290 -60
- package/lib/PlayNetKit-1.3.30.js +407 -176
- package/lib/WearKit-1.1.6.d.ts +125 -27
- package/lib/WearKit-1.1.6.js +176 -77
- package/lib/all-kits.d.ts +10 -10
- package/lib/all-kits.js +10 -10
- package/lib/cloud/core.d.ts +31 -1
- package/lib/cloud/core.js +31 -1
- package/lib/cloud/device.d.ts +155 -24
- package/lib/cloud/device.js +153 -22
- package/lib/cloud/gateway.d.ts +254 -0
- package/lib/cloud/gateway.js +269 -9
- package/lib/cloud/health.d.ts +1 -0
- package/lib/cloud/health.js +121 -0
- package/lib/cloud/interface.d.ts +222 -44
- package/lib/cloud/interface.js +15 -2
- package/lib/cloud/laser-clean/deleteCleaningRecord/index.d.ts +27 -0
- package/lib/cloud/laser-clean/deleteCleaningRecord/index.js +28 -0
- package/lib/cloud/laser-clean/deleteCleaningRecord/type.d.ts +7 -0
- package/lib/cloud/laser-clean/deleteCleaningRecord/type.js +1 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/index.d.ts +27 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/index.js +28 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/type.d.ts +7 -0
- package/lib/cloud/laser-clean/deleteGyroCleanRecord/type.js +1 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/index.d.ts +27 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/index.js +28 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/type.d.ts +7 -0
- package/lib/cloud/laser-clean/deleteMultipleMapFiles/type.js +1 -0
- package/lib/cloud/laser-clean/getCleaningRecords/index.d.ts +30 -0
- package/lib/cloud/laser-clean/getCleaningRecords/index.js +31 -0
- package/lib/cloud/laser-clean/getCleaningRecords/type.d.ts +39 -0
- package/lib/cloud/laser-clean/getCleaningRecords/type.js +1 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/index.d.ts +29 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/index.js +30 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/type.d.ts +30 -0
- package/lib/cloud/laser-clean/getGyroCleanRecordDetail/type.js +1 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/index.d.ts +29 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/index.js +30 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/type.d.ts +35 -0
- package/lib/cloud/laser-clean/getGyroCleanRecords/type.js +1 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/index.d.ts +28 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/index.js +29 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/type.d.ts +28 -0
- package/lib/cloud/laser-clean/getGyroLatestCleanMap/type.js +1 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/index.d.ts +24 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/index.js +25 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/type.d.ts +29 -0
- package/lib/cloud/laser-clean/getMultipleMapFiles/type.js +1 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/index.d.ts +24 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/index.js +25 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/type.d.ts +26 -0
- package/lib/cloud/laser-clean/getSweeperStorageConfig/type.js +1 -0
- package/lib/cloud/laser-clean/getVoiceList/index.d.ts +28 -0
- package/lib/cloud/laser-clean/getVoiceList/index.js +29 -0
- package/lib/cloud/laser-clean/getVoiceList/type.d.ts +48 -0
- package/lib/cloud/laser-clean/getVoiceList/type.js +1 -0
- package/lib/cloud/laser-clean/index.d.ts +1 -1
- package/lib/cloud/laser-clean/index.js +1 -1
- package/lib/cloud/laser-clean/map.d.ts +5 -7
- package/lib/cloud/laser-clean/map.js +5 -9
- package/lib/cloud/laser-clean/record.d.ts +5 -6
- package/lib/cloud/laser-clean/record.js +5 -7
- package/lib/cloud/laser-clean/renameHistoryMap/index.d.ts +28 -0
- package/lib/cloud/laser-clean/renameHistoryMap/index.js +29 -0
- package/lib/cloud/laser-clean/renameHistoryMap/type.d.ts +9 -0
- package/lib/cloud/laser-clean/renameHistoryMap/type.js +1 -0
- package/lib/cloud/laser-clean/voice.d.ts +1 -3
- package/lib/cloud/laser-clean/voice.js +1 -4
- package/lib/cloud/linkage.d.ts +271 -53
- package/lib/cloud/linkage.js +256 -51
- package/lib/cloud/remoteGroup.d.ts +37 -0
- package/lib/cloud/remoteGroup.js +37 -0
- package/lib/cloud/timer.d.ts +104 -26
- package/lib/cloud/timer.js +104 -26
- package/lib/getApp/index.thing.d.ts +47 -1
- package/lib/getApp/index.thing.js +40 -2
- package/lib/getBoundingClientRect/index.thing.d.ts +101 -1
- package/lib/getBoundingClientRect/index.thing.js +59 -0
- package/lib/getCurrentPages/index.thing.d.ts +40 -15
- package/lib/getCurrentPages/index.thing.js +36 -15
- package/lib/getCustomConfig/index.d.ts +5 -2
- package/lib/getCustomConfig/index.thing.d.ts +68 -2
- package/lib/getCustomConfig/index.thing.js +62 -0
- package/lib/getCustomConfig/index.wechat.d.ts +5 -2
- package/lib/getCustomConfig/type.d.ts +26 -15
- package/lib/getElementById/index.thing.d.ts +42 -1
- package/lib/getElementById/index.thing.js +40 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +4 -2
- package/lib/nativeRouters/common.d.ts +8 -0
- package/lib/nativeRouters/device.d.ts +137 -5
- package/lib/nativeRouters/device.js +138 -6
- package/lib/nativeRouters/gw.d.ts +58 -8
- package/lib/nativeRouters/gw.js +57 -8
- package/lib/nativeRouters/outdoors.d.ts +16 -3
- package/lib/nativeRouters/outdoors.js +16 -3
- package/lib/nativeRouters/remoteGroup.d.ts +23 -0
- package/lib/nativeRouters/remoteGroup.js +23 -0
- package/lib/nativeRouters/root.d.ts +19 -0
- package/lib/nativeRouters/root.js +17 -0
- package/lib/openGroupCreate/index.d.ts +45 -0
- package/lib/openGroupCreate/index.js +32 -0
- package/package.json +5 -5
package/@types/HomeKit.d.ts
CHANGED
|
@@ -1,85 +1,173 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* HomeKit
|
|
3
3
|
*
|
|
4
|
-
* @version 3.
|
|
4
|
+
* @version 3.17.3
|
|
5
5
|
*/
|
|
6
6
|
declare namespace ty.home {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
7
|
+
/**
|
|
8
|
+
* 获取本地设备的时区配置信息
|
|
9
|
+
* @public
|
|
10
|
+
* @since HomeKit 2.0.4
|
|
11
|
+
* @platform iOS Android
|
|
12
|
+
*/
|
|
13
|
+
export function getLocalDeviceConfigWithDevId(params: {
|
|
14
|
+
/**
|
|
15
|
+
* 设备ID
|
|
16
|
+
* @since HomeKit 2.0.4
|
|
17
|
+
*/
|
|
18
|
+
devId: string
|
|
19
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
20
|
+
complete?: () => void
|
|
21
|
+
/** 接口调用成功的回调函数 */
|
|
22
|
+
success?: (params: null) => void
|
|
23
|
+
/** 接口调用失败的回调函数 */
|
|
24
|
+
fail?: (params: {
|
|
25
|
+
/** 错误信息 */
|
|
26
|
+
errorMsg: string
|
|
27
|
+
/** 错误码 */
|
|
28
|
+
errorCode: string | number
|
|
29
|
+
/** 错误扩展 */
|
|
30
|
+
innerError: {
|
|
31
|
+
/** 错误扩展码 */
|
|
32
|
+
errorCode: string | number
|
|
33
|
+
/** 错误扩展信息 */
|
|
34
|
+
errorMsg: string
|
|
35
|
+
}
|
|
36
|
+
}) => void
|
|
37
|
+
}): void
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 修改家庭信息
|
|
41
|
+
* @public
|
|
42
|
+
* @since HomeKit 1.0.4
|
|
43
|
+
* @platform iOS Android
|
|
44
|
+
*/
|
|
45
|
+
export function updateHomeInfoData(params: {
|
|
46
|
+
/**
|
|
47
|
+
* 家庭名称
|
|
48
|
+
* @since HomeKit 3.0.1
|
|
49
|
+
*/
|
|
50
|
+
homeName: string
|
|
51
|
+
/**
|
|
52
|
+
* 家庭id
|
|
53
|
+
* @since HomeKit 1.0.4
|
|
54
|
+
*/
|
|
55
|
+
homeId: string
|
|
56
|
+
/**
|
|
57
|
+
* 经度
|
|
58
|
+
* @since HomeKit 1.0.4
|
|
59
|
+
*/
|
|
60
|
+
longitude: string
|
|
61
|
+
/**
|
|
62
|
+
* 维度
|
|
63
|
+
* @since HomeKit 1.0.4
|
|
64
|
+
*/
|
|
65
|
+
latitude: string
|
|
66
|
+
/**
|
|
67
|
+
* 详细地址
|
|
68
|
+
* @since HomeKit 1.0.4
|
|
69
|
+
*/
|
|
70
|
+
address: string
|
|
71
|
+
/**
|
|
72
|
+
* 是否是管理员
|
|
73
|
+
* true 是管理员; false 非管理员
|
|
74
|
+
* @since HomeKit 1.0.4
|
|
75
|
+
*/
|
|
76
|
+
admin: boolean
|
|
77
|
+
/**
|
|
78
|
+
* 家庭模式,取值自 ThingSmartHomeMode
|
|
79
|
+
* @since HomeKit 3.7.8
|
|
80
|
+
*/
|
|
81
|
+
mode: number
|
|
82
|
+
/**
|
|
83
|
+
* 家庭角色,取值自 ThingSmartHomeRole
|
|
84
|
+
* @since HomeKit 3.7.12
|
|
85
|
+
*/
|
|
86
|
+
role: number
|
|
87
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
88
|
+
complete?: () => void
|
|
89
|
+
/** 接口调用成功的回调函数 */
|
|
90
|
+
success?: (params: null) => void
|
|
91
|
+
/** 接口调用失败的回调函数 */
|
|
92
|
+
fail?: (params: {
|
|
93
|
+
/** 错误信息 */
|
|
94
|
+
errorMsg: string
|
|
95
|
+
/** 错误码 */
|
|
96
|
+
errorCode: string | number
|
|
97
|
+
/** 错误扩展 */
|
|
98
|
+
innerError: {
|
|
99
|
+
/** 错误扩展码 */
|
|
100
|
+
errorCode: string | number
|
|
101
|
+
/** 错误扩展信息 */
|
|
102
|
+
errorMsg: string
|
|
103
|
+
}
|
|
104
|
+
}) => void
|
|
105
|
+
}): void
|
|
55
106
|
|
|
56
107
|
/**
|
|
57
108
|
* 获取当前家庭信息
|
|
109
|
+
* @public
|
|
110
|
+
* @since HomeKit 1.0.4
|
|
111
|
+
* @platform iOS Android
|
|
58
112
|
*/
|
|
59
113
|
export function getCurrentHomeInfo(params?: {
|
|
114
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
60
115
|
complete?: () => void
|
|
116
|
+
/** 接口调用成功的回调函数 */
|
|
61
117
|
success?: (params: {
|
|
62
|
-
/**
|
|
118
|
+
/**
|
|
119
|
+
* 家庭名称
|
|
120
|
+
* @since HomeKit 3.0.3
|
|
121
|
+
*/
|
|
63
122
|
homeName: string
|
|
64
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* 家庭id
|
|
125
|
+
* @since HomeKit 3.0.3
|
|
126
|
+
*/
|
|
65
127
|
homeId: string
|
|
66
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* 经度
|
|
130
|
+
* @since HomeKit 3.0.3
|
|
131
|
+
*/
|
|
67
132
|
longitude: string
|
|
68
|
-
/**
|
|
133
|
+
/**
|
|
134
|
+
* 维度
|
|
135
|
+
* @since HomeKit 3.0.3
|
|
136
|
+
*/
|
|
69
137
|
latitude: string
|
|
70
|
-
/**
|
|
138
|
+
/**
|
|
139
|
+
* 详细地址
|
|
140
|
+
* @since HomeKit 3.0.3
|
|
141
|
+
*/
|
|
71
142
|
address: string
|
|
72
143
|
/**
|
|
73
144
|
* 是否是管理员
|
|
74
145
|
* true 是管理员; false 非管理员
|
|
146
|
+
* @since HomeKit 3.0.3
|
|
75
147
|
*/
|
|
76
148
|
admin: boolean
|
|
149
|
+
/**
|
|
150
|
+
* 家庭模式,取值自 ThingSmartHomeMode
|
|
151
|
+
* @since HomeKit 3.7.8
|
|
152
|
+
*/
|
|
153
|
+
mode: number
|
|
154
|
+
/**
|
|
155
|
+
* 家庭角色,取值自 ThingSmartHomeRole
|
|
156
|
+
* @since HomeKit 3.7.12
|
|
157
|
+
*/
|
|
158
|
+
role: number
|
|
77
159
|
}) => void
|
|
160
|
+
/** 接口调用失败的回调函数 */
|
|
78
161
|
fail?: (params: {
|
|
162
|
+
/** 错误信息 */
|
|
79
163
|
errorMsg: string
|
|
164
|
+
/** 错误码 */
|
|
80
165
|
errorCode: string | number
|
|
166
|
+
/** 错误扩展 */
|
|
81
167
|
innerError: {
|
|
168
|
+
/** 错误扩展码 */
|
|
82
169
|
errorCode: string | number
|
|
170
|
+
/** 错误扩展信息 */
|
|
83
171
|
errorMsg: string
|
|
84
172
|
}
|
|
85
173
|
}) => void
|
|
@@ -87,198 +175,3996 @@ declare namespace ty.home {
|
|
|
87
175
|
|
|
88
176
|
/**
|
|
89
177
|
* 获取设备房间信息
|
|
178
|
+
* @public
|
|
179
|
+
* @since HomeKit 3.0.1
|
|
180
|
+
* @platform iOS Android
|
|
90
181
|
*/
|
|
91
182
|
export function getDeviceRoomInfo(params: {
|
|
92
183
|
/**
|
|
93
|
-
*
|
|
94
|
-
*
|
|
184
|
+
* 设备 ID
|
|
185
|
+
* @since HomeKit 3.0.1
|
|
95
186
|
*/
|
|
96
187
|
deviceId: string
|
|
188
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
97
189
|
complete?: () => void
|
|
190
|
+
/** 接口调用成功的回调函数 */
|
|
98
191
|
success?: (params: {
|
|
99
|
-
/**
|
|
192
|
+
/**
|
|
193
|
+
* 房间 ID
|
|
194
|
+
* @since HomeKit 3.0.3
|
|
195
|
+
*/
|
|
100
196
|
roomId: number
|
|
101
|
-
/**
|
|
197
|
+
/**
|
|
198
|
+
* 房间名称
|
|
199
|
+
* @since HomeKit 3.0.3
|
|
200
|
+
*/
|
|
102
201
|
name: string
|
|
103
202
|
}) => void
|
|
203
|
+
/** 接口调用失败的回调函数 */
|
|
104
204
|
fail?: (params: {
|
|
205
|
+
/** 错误信息 */
|
|
105
206
|
errorMsg: string
|
|
207
|
+
/** 错误码 */
|
|
106
208
|
errorCode: string | number
|
|
209
|
+
/** 错误扩展 */
|
|
107
210
|
innerError: {
|
|
211
|
+
/** 错误扩展码 */
|
|
108
212
|
errorCode: string | number
|
|
213
|
+
/** 错误扩展信息 */
|
|
109
214
|
errorMsg: string
|
|
110
215
|
}
|
|
111
216
|
}) => void
|
|
112
217
|
}): void
|
|
113
218
|
|
|
114
|
-
// /**
|
|
115
|
-
// * 获取群组房间信息
|
|
116
|
-
// */
|
|
117
|
-
// export function getGroupRoomInfo(params: {
|
|
118
|
-
// /**
|
|
119
|
-
// * groupId
|
|
120
|
-
// * 群组 id
|
|
121
|
-
// */
|
|
122
|
-
// groupId: string
|
|
123
|
-
// complete?: () => void
|
|
124
|
-
// success?: (params: {
|
|
125
|
-
// /** The room ID. */
|
|
126
|
-
// roomId: number
|
|
127
|
-
// /** The room name. */
|
|
128
|
-
// name: string
|
|
129
|
-
// }) => void
|
|
130
|
-
// fail?: (params: {
|
|
131
|
-
// errorMsg: string
|
|
132
|
-
// errorCode: string | number
|
|
133
|
-
// innerError: {
|
|
134
|
-
// errorCode: string | number
|
|
135
|
-
// errorMsg: string
|
|
136
|
-
// }
|
|
137
|
-
// }) => void
|
|
138
|
-
// }): void
|
|
139
|
-
|
|
140
219
|
/**
|
|
141
|
-
*
|
|
220
|
+
* 获取群组房间信息
|
|
221
|
+
* @public
|
|
222
|
+
* @since HomeKit 3.1.4
|
|
223
|
+
* @platform iOS Android
|
|
142
224
|
*/
|
|
143
|
-
export function
|
|
144
|
-
/**
|
|
145
|
-
|
|
225
|
+
export function getGroupRoomInfo(params: {
|
|
226
|
+
/**
|
|
227
|
+
* 群组 ID
|
|
228
|
+
* @since HomeKit 3.1.4
|
|
229
|
+
*/
|
|
230
|
+
groupId: string
|
|
231
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
146
232
|
complete?: () => void
|
|
233
|
+
/** 接口调用成功的回调函数 */
|
|
147
234
|
success?: (params: {
|
|
148
|
-
/**
|
|
149
|
-
|
|
235
|
+
/**
|
|
236
|
+
* 房间 ID
|
|
237
|
+
* @since HomeKit 3.1.4
|
|
238
|
+
*/
|
|
239
|
+
roomId: number
|
|
240
|
+
/**
|
|
241
|
+
* 房间名称
|
|
242
|
+
* @since HomeKit 3.1.4
|
|
243
|
+
*/
|
|
244
|
+
name: string
|
|
150
245
|
}) => void
|
|
246
|
+
/** 接口调用失败的回调函数 */
|
|
151
247
|
fail?: (params: {
|
|
248
|
+
/** 错误信息 */
|
|
152
249
|
errorMsg: string
|
|
250
|
+
/** 错误码 */
|
|
153
251
|
errorCode: string | number
|
|
252
|
+
/** 错误扩展 */
|
|
154
253
|
innerError: {
|
|
254
|
+
/** 错误扩展码 */
|
|
155
255
|
errorCode: string | number
|
|
256
|
+
/** 错误扩展信息 */
|
|
156
257
|
errorMsg: string
|
|
157
258
|
}
|
|
158
259
|
}) => void
|
|
159
260
|
}): void
|
|
160
261
|
|
|
161
262
|
/**
|
|
162
|
-
*
|
|
263
|
+
* 展示切换家庭浮层,注: iOS下非Tab小程序使用时切换家庭后会自动跳转到首页
|
|
264
|
+
* @public
|
|
265
|
+
* @since HomeKit 3.2.0
|
|
266
|
+
* @platform iOS Android
|
|
163
267
|
*/
|
|
164
|
-
export function
|
|
165
|
-
/**
|
|
166
|
-
ownerId: number
|
|
268
|
+
export function switchHome(params?: {
|
|
269
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
167
270
|
complete?: () => void
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}) => void
|
|
271
|
+
/** 接口调用成功的回调函数 */
|
|
272
|
+
success?: (params: null) => void
|
|
273
|
+
/** 接口调用失败的回调函数 */
|
|
172
274
|
fail?: (params: {
|
|
275
|
+
/** 错误信息 */
|
|
173
276
|
errorMsg: string
|
|
277
|
+
/** 错误码 */
|
|
174
278
|
errorCode: string | number
|
|
279
|
+
/** 错误扩展 */
|
|
175
280
|
innerError: {
|
|
281
|
+
/** 错误扩展码 */
|
|
176
282
|
errorCode: string | number
|
|
283
|
+
/** 错误扩展信息 */
|
|
177
284
|
errorMsg: string
|
|
178
285
|
}
|
|
179
286
|
}) => void
|
|
180
287
|
}): void
|
|
181
288
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
289
|
+
/**
|
|
290
|
+
* 切换家庭
|
|
291
|
+
* @public
|
|
292
|
+
* @since HomeKit 3.7.15
|
|
293
|
+
* @platform iOS Android
|
|
294
|
+
*/
|
|
295
|
+
export function switchHomeWithHomeId(params: {
|
|
296
|
+
/**
|
|
297
|
+
* 家庭id
|
|
298
|
+
* @since HomeKit 3.7.15
|
|
299
|
+
*/
|
|
300
|
+
homeId: string
|
|
301
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
302
|
+
complete?: () => void
|
|
303
|
+
/** 接口调用成功的回调函数 */
|
|
304
|
+
success?: (params: null) => void
|
|
305
|
+
/** 接口调用失败的回调函数 */
|
|
306
|
+
fail?: (params: {
|
|
307
|
+
/** 错误信息 */
|
|
308
|
+
errorMsg: string
|
|
309
|
+
/** 错误码 */
|
|
310
|
+
errorCode: string | number
|
|
311
|
+
/** 错误扩展 */
|
|
312
|
+
innerError: {
|
|
313
|
+
/** 错误扩展码 */
|
|
314
|
+
errorCode: string | number
|
|
315
|
+
/** 错误扩展信息 */
|
|
316
|
+
errorMsg: string
|
|
317
|
+
}
|
|
318
|
+
}) => void
|
|
319
|
+
}): void
|
|
190
320
|
|
|
191
|
-
|
|
192
|
-
|
|
321
|
+
/**
|
|
322
|
+
* 新建家庭
|
|
323
|
+
* @public
|
|
324
|
+
* @since HomeKit 3.7.15
|
|
325
|
+
* @platform iOS Android
|
|
326
|
+
*/
|
|
327
|
+
export function createHome(params: {
|
|
328
|
+
/**
|
|
329
|
+
* 家庭名称,必填
|
|
330
|
+
* @since HomeKit 3.7.15
|
|
331
|
+
*/
|
|
193
332
|
homeName: string
|
|
194
|
-
/** 家庭id */
|
|
195
|
-
homeId: string
|
|
196
|
-
/** 经度 */
|
|
197
|
-
longitude: string
|
|
198
|
-
/** 维度 */
|
|
199
|
-
latitude: string
|
|
200
|
-
/** 详细地址 */
|
|
201
|
-
address: string
|
|
202
333
|
/**
|
|
203
|
-
*
|
|
204
|
-
*
|
|
334
|
+
* 家庭模式,取值自 ThingSmartHomeMode, default: 0
|
|
335
|
+
* @since HomeKit 3.7.15
|
|
205
336
|
*/
|
|
206
|
-
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
export type GetDeviceRoomInfoParams = {
|
|
337
|
+
mode: number
|
|
210
338
|
/**
|
|
211
|
-
*
|
|
212
|
-
*
|
|
339
|
+
* 经度,可选
|
|
340
|
+
* @since HomeKit 3.7.15
|
|
213
341
|
*/
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
export type GetDeviceRoomInfoResponse = {
|
|
218
|
-
/** The room ID. */
|
|
219
|
-
roomId: number
|
|
220
|
-
/** The room name. */
|
|
221
|
-
name: string
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export type GroupRoomInfoParams = {
|
|
342
|
+
longitude?: string
|
|
225
343
|
/**
|
|
226
|
-
*
|
|
227
|
-
*
|
|
344
|
+
* 维度,可选
|
|
345
|
+
* @since HomeKit 3.7.15
|
|
228
346
|
*/
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
|
|
242
|
-
|
|
347
|
+
latitude?: string
|
|
348
|
+
/**
|
|
349
|
+
* 详细地址,可选
|
|
350
|
+
* @since HomeKit 3.7.15
|
|
351
|
+
*/
|
|
352
|
+
address?: string
|
|
353
|
+
/**
|
|
354
|
+
* 房间列表,可选
|
|
355
|
+
* @since HomeKit 3.7.15
|
|
356
|
+
*/
|
|
357
|
+
rooms?: string[]
|
|
358
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
359
|
+
complete?: () => void
|
|
360
|
+
/** 接口调用成功的回调函数 */
|
|
361
|
+
success?: (params: {
|
|
362
|
+
/**
|
|
363
|
+
* 家庭id
|
|
364
|
+
* @since HomeKit 3.7.15
|
|
365
|
+
*/
|
|
366
|
+
homeId: string
|
|
367
|
+
}) => void
|
|
368
|
+
/** 接口调用失败的回调函数 */
|
|
369
|
+
fail?: (params: {
|
|
370
|
+
/** 错误信息 */
|
|
371
|
+
errorMsg: string
|
|
372
|
+
/** 错误码 */
|
|
373
|
+
errorCode: string | number
|
|
374
|
+
/** 错误扩展 */
|
|
375
|
+
innerError: {
|
|
376
|
+
/** 错误扩展码 */
|
|
377
|
+
errorCode: string | number
|
|
378
|
+
/** 错误扩展信息 */
|
|
379
|
+
errorMsg: string
|
|
380
|
+
}
|
|
381
|
+
}) => void
|
|
382
|
+
}): void
|
|
243
383
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
384
|
+
/**
|
|
385
|
+
* 切换家庭dialog,注: iOS下非Tab小程序使用时切换家庭后会自动跳转到首页
|
|
386
|
+
* @public
|
|
387
|
+
* @since HomeKit 3.7.14
|
|
388
|
+
* @platform iOS Android
|
|
389
|
+
*/
|
|
390
|
+
export function switchHomeDialog(params: {
|
|
391
|
+
/**
|
|
392
|
+
* 是否需要隐藏家庭管理
|
|
393
|
+
* @since HomeKit 3.7.14
|
|
394
|
+
*/
|
|
395
|
+
hiddenHouseManager: boolean
|
|
396
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
397
|
+
complete?: () => void
|
|
398
|
+
/** 接口调用成功的回调函数 */
|
|
399
|
+
success?: (params: null) => void
|
|
400
|
+
/** 接口调用失败的回调函数 */
|
|
401
|
+
fail?: (params: {
|
|
402
|
+
/** 错误信息 */
|
|
403
|
+
errorMsg: string
|
|
404
|
+
/** 错误码 */
|
|
405
|
+
errorCode: string | number
|
|
406
|
+
/** 错误扩展 */
|
|
407
|
+
innerError: {
|
|
408
|
+
/** 错误扩展码 */
|
|
409
|
+
errorCode: string | number
|
|
410
|
+
/** 错误扩展信息 */
|
|
411
|
+
errorMsg: string
|
|
412
|
+
}
|
|
413
|
+
}) => void
|
|
414
|
+
}): void
|
|
248
415
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
416
|
+
/**
|
|
417
|
+
* 获取家庭列表信息
|
|
418
|
+
* @public
|
|
419
|
+
* @since HomeKit 3.5.4
|
|
420
|
+
* @platform iOS Android
|
|
421
|
+
*/
|
|
422
|
+
export function getHomeListInfo(params?: {
|
|
423
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
424
|
+
complete?: () => void
|
|
425
|
+
/** 接口调用成功的回调函数 */
|
|
426
|
+
success?: (params: {
|
|
427
|
+
/**
|
|
428
|
+
* 家庭列表信息
|
|
429
|
+
* @since HomeKit 3.5.4
|
|
430
|
+
*/
|
|
431
|
+
homeList: HomeInfoData[]
|
|
432
|
+
}) => void
|
|
433
|
+
/** 接口调用失败的回调函数 */
|
|
434
|
+
fail?: (params: {
|
|
435
|
+
/** 错误信息 */
|
|
436
|
+
errorMsg: string
|
|
437
|
+
/** 错误码 */
|
|
438
|
+
errorCode: string | number
|
|
439
|
+
/** 错误扩展 */
|
|
440
|
+
innerError: {
|
|
441
|
+
/** 错误扩展码 */
|
|
442
|
+
errorCode: string | number
|
|
443
|
+
/** 错误扩展信息 */
|
|
444
|
+
errorMsg: string
|
|
445
|
+
}
|
|
446
|
+
}) => void
|
|
447
|
+
}): void
|
|
253
448
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
449
|
+
/**
|
|
450
|
+
* 注册家庭变换监听
|
|
451
|
+
* @public
|
|
452
|
+
* @since HomeKit 3.5.4
|
|
453
|
+
* @platform iOS Android
|
|
454
|
+
*/
|
|
455
|
+
export function registerHomeChangeListener(params?: {
|
|
456
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
457
|
+
complete?: () => void
|
|
458
|
+
/** 接口调用成功的回调函数 */
|
|
459
|
+
success?: (params: null) => void
|
|
460
|
+
/** 接口调用失败的回调函数 */
|
|
461
|
+
fail?: (params: {
|
|
462
|
+
/** 错误信息 */
|
|
463
|
+
errorMsg: string
|
|
464
|
+
/** 错误码 */
|
|
465
|
+
errorCode: string | number
|
|
466
|
+
/** 错误扩展 */
|
|
467
|
+
innerError: {
|
|
468
|
+
/** 错误扩展码 */
|
|
469
|
+
errorCode: string | number
|
|
470
|
+
/** 错误扩展信息 */
|
|
471
|
+
errorMsg: string
|
|
472
|
+
}
|
|
473
|
+
}) => void
|
|
474
|
+
}): void
|
|
258
475
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
476
|
+
/**
|
|
477
|
+
* 解除注册家庭变换监听
|
|
478
|
+
* @public
|
|
479
|
+
* @since HomeKit 3.5.4
|
|
480
|
+
* @platform iOS Android
|
|
481
|
+
*/
|
|
482
|
+
export function unregisterHomeChangeListener(params?: {
|
|
483
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
484
|
+
complete?: () => void
|
|
485
|
+
/** 接口调用成功的回调函数 */
|
|
486
|
+
success?: (params: null) => void
|
|
487
|
+
/** 接口调用失败的回调函数 */
|
|
488
|
+
fail?: (params: {
|
|
489
|
+
/** 错误信息 */
|
|
490
|
+
errorMsg: string
|
|
491
|
+
/** 错误码 */
|
|
492
|
+
errorCode: string | number
|
|
493
|
+
/** 错误扩展 */
|
|
494
|
+
innerError: {
|
|
495
|
+
/** 错误扩展码 */
|
|
496
|
+
errorCode: string | number
|
|
497
|
+
/** 错误扩展信息 */
|
|
498
|
+
errorMsg: string
|
|
499
|
+
}
|
|
500
|
+
}) => void
|
|
501
|
+
}): void
|
|
265
502
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
503
|
+
/**
|
|
504
|
+
* 刷新当前家庭下的数据
|
|
505
|
+
* @public
|
|
506
|
+
* @since HomeKit 3.5.4
|
|
507
|
+
* @platform iOS Android
|
|
508
|
+
*/
|
|
509
|
+
export function refreshCurrentHome(params?: {
|
|
510
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
511
|
+
complete?: () => void
|
|
512
|
+
/** 接口调用成功的回调函数 */
|
|
513
|
+
success?: (params: null) => void
|
|
514
|
+
/** 接口调用失败的回调函数 */
|
|
515
|
+
fail?: (params: {
|
|
516
|
+
/** 错误信息 */
|
|
517
|
+
errorMsg: string
|
|
518
|
+
/** 错误码 */
|
|
519
|
+
errorCode: string | number
|
|
520
|
+
/** 错误扩展 */
|
|
521
|
+
innerError: {
|
|
522
|
+
/** 错误扩展码 */
|
|
523
|
+
errorCode: string | number
|
|
524
|
+
/** 错误扩展信息 */
|
|
525
|
+
errorMsg: string
|
|
526
|
+
}
|
|
527
|
+
}) => void
|
|
528
|
+
}): void
|
|
274
529
|
|
|
275
|
-
|
|
530
|
+
/**
|
|
531
|
+
* 获取分享邀请信息
|
|
532
|
+
* @public
|
|
533
|
+
* @since HomeKit 3.7.2
|
|
534
|
+
* @platform iOS Android
|
|
535
|
+
*/
|
|
536
|
+
export function inviteMember(params: {
|
|
276
537
|
/**
|
|
277
|
-
*
|
|
278
|
-
*
|
|
538
|
+
* 家庭 ID
|
|
539
|
+
* @since HomeKit 3.7.2
|
|
540
|
+
*/
|
|
541
|
+
homeId: number
|
|
542
|
+
/**
|
|
543
|
+
* 成员角色
|
|
544
|
+
* 0 - 普通成员
|
|
545
|
+
* 1 - 管理员
|
|
546
|
+
* 2 - 家庭所有者
|
|
547
|
+
* -1 - 自定义成员角色
|
|
548
|
+
* -999 - 非法成员
|
|
549
|
+
* @since HomeKit 3.7.2
|
|
550
|
+
*/
|
|
551
|
+
role?: number
|
|
552
|
+
/**
|
|
553
|
+
* only use role == MemberRole.ROLE_CUSTOM
|
|
554
|
+
* @since HomeKit 3.7.2
|
|
555
|
+
*/
|
|
556
|
+
customRoleId?: number
|
|
557
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
558
|
+
complete?: () => void
|
|
559
|
+
/** 接口调用成功的回调函数 */
|
|
560
|
+
success?: (params: {
|
|
561
|
+
/**
|
|
562
|
+
* 邀请信息
|
|
563
|
+
* @since HomeKit 3.7.2
|
|
564
|
+
*/
|
|
565
|
+
invitationMsgContent: string
|
|
566
|
+
/**
|
|
567
|
+
* 邀请码
|
|
568
|
+
* @since HomeKit 3.7.2
|
|
569
|
+
*/
|
|
570
|
+
invitationCode: string
|
|
571
|
+
}) => void
|
|
572
|
+
/** 接口调用失败的回调函数 */
|
|
573
|
+
fail?: (params: {
|
|
574
|
+
/** 错误信息 */
|
|
575
|
+
errorMsg: string
|
|
576
|
+
/** 错误码 */
|
|
577
|
+
errorCode: string | number
|
|
578
|
+
/** 错误扩展 */
|
|
579
|
+
innerError: {
|
|
580
|
+
/** 错误扩展码 */
|
|
581
|
+
errorCode: string | number
|
|
582
|
+
/** 错误扩展信息 */
|
|
583
|
+
errorMsg: string
|
|
584
|
+
}
|
|
585
|
+
}) => void
|
|
586
|
+
}): void
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* 入口管控业务
|
|
590
|
+
* @public
|
|
591
|
+
* @since HomeKit 3.7.5
|
|
592
|
+
* @platform iOS Android
|
|
593
|
+
*/
|
|
594
|
+
export function paymentControlEntry(params: {
|
|
595
|
+
/**
|
|
596
|
+
* 入口标识
|
|
597
|
+
* @since HomeKit 3.7.5
|
|
598
|
+
*/
|
|
599
|
+
entryID: string
|
|
600
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
601
|
+
complete?: () => void
|
|
602
|
+
/** 接口调用成功的回调函数 */
|
|
603
|
+
success?: (params: {
|
|
604
|
+
/**
|
|
605
|
+
* 入口标识
|
|
606
|
+
* @since HomeKit 3.7.5
|
|
607
|
+
*/
|
|
608
|
+
entryID: string
|
|
609
|
+
/**
|
|
610
|
+
* true:显示入口
|
|
611
|
+
* @since HomeKit 3.7.5
|
|
612
|
+
*/
|
|
613
|
+
isDisplayed: boolean
|
|
614
|
+
/**
|
|
615
|
+
* 入口携带的扩展信息
|
|
616
|
+
* @since HomeKit 3.7.5
|
|
617
|
+
*/
|
|
618
|
+
entryExtensionInfo?: Record<string, any>
|
|
619
|
+
/**
|
|
620
|
+
* 入口名称
|
|
621
|
+
* @since HomeKit 3.7.5
|
|
622
|
+
*/
|
|
623
|
+
entryName: string
|
|
624
|
+
/**
|
|
625
|
+
* true:当前入口必须要有 IAP 开启
|
|
626
|
+
* @since HomeKit 3.7.5
|
|
627
|
+
*/
|
|
628
|
+
isIAPForced: boolean
|
|
629
|
+
}) => void
|
|
630
|
+
/** 接口调用失败的回调函数 */
|
|
631
|
+
fail?: (params: {
|
|
632
|
+
/** 错误信息 */
|
|
633
|
+
errorMsg: string
|
|
634
|
+
/** 错误码 */
|
|
635
|
+
errorCode: string | number
|
|
636
|
+
/** 错误扩展 */
|
|
637
|
+
innerError: {
|
|
638
|
+
/** 错误扩展码 */
|
|
639
|
+
errorCode: string | number
|
|
640
|
+
/** 错误扩展信息 */
|
|
641
|
+
errorMsg: string
|
|
642
|
+
}
|
|
643
|
+
}) => void
|
|
644
|
+
}): void
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* 注册家庭成员管理监听
|
|
648
|
+
* @public
|
|
649
|
+
* @since HomeKit 3.10.1
|
|
650
|
+
* @platform iOS Android
|
|
651
|
+
*/
|
|
652
|
+
export function registerHomeMemberManagerListener(params?: {
|
|
653
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
654
|
+
complete?: () => void
|
|
655
|
+
/** 接口调用成功的回调函数 */
|
|
656
|
+
success?: (params: null) => void
|
|
657
|
+
/** 接口调用失败的回调函数 */
|
|
658
|
+
fail?: (params: {
|
|
659
|
+
/** 错误信息 */
|
|
660
|
+
errorMsg: string
|
|
661
|
+
/** 错误码 */
|
|
662
|
+
errorCode: string | number
|
|
663
|
+
/** 错误扩展 */
|
|
664
|
+
innerError: {
|
|
665
|
+
/** 错误扩展码 */
|
|
666
|
+
errorCode: string | number
|
|
667
|
+
/** 错误扩展信息 */
|
|
668
|
+
errorMsg: string
|
|
669
|
+
}
|
|
670
|
+
}) => void
|
|
671
|
+
}): void
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* 解除注册家庭成员管理监听
|
|
675
|
+
* @public
|
|
676
|
+
* @since HomeKit 3.10.1
|
|
677
|
+
* @platform iOS Android
|
|
678
|
+
*/
|
|
679
|
+
export function unregisterHomeMemberManagerListener(params?: {
|
|
680
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
681
|
+
complete?: () => void
|
|
682
|
+
/** 接口调用成功的回调函数 */
|
|
683
|
+
success?: (params: null) => void
|
|
684
|
+
/** 接口调用失败的回调函数 */
|
|
685
|
+
fail?: (params: {
|
|
686
|
+
/** 错误信息 */
|
|
687
|
+
errorMsg: string
|
|
688
|
+
/** 错误码 */
|
|
689
|
+
errorCode: string | number
|
|
690
|
+
/** 错误扩展 */
|
|
691
|
+
innerError: {
|
|
692
|
+
/** 错误扩展码 */
|
|
693
|
+
errorCode: string | number
|
|
694
|
+
/** 错误扩展信息 */
|
|
695
|
+
errorMsg: string
|
|
696
|
+
}
|
|
697
|
+
}) => void
|
|
698
|
+
}): void
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* 判断卡片是否可以显示到首页
|
|
702
|
+
* @public
|
|
703
|
+
* @since HomeKit 3.11.0
|
|
704
|
+
* @platform iOS Android
|
|
705
|
+
*/
|
|
706
|
+
export function canDisplayDIYHomeCard(params: {
|
|
707
|
+
/**
|
|
708
|
+
* 卡片
|
|
709
|
+
* @since HomeKit 3.11.0
|
|
710
|
+
*/
|
|
711
|
+
card: DIYHomeCard
|
|
712
|
+
/**
|
|
713
|
+
* 家庭id
|
|
714
|
+
* @since HomeKit 3.11.0
|
|
715
|
+
*/
|
|
716
|
+
gid: number
|
|
717
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
718
|
+
complete?: () => void
|
|
719
|
+
/** 接口调用成功的回调函数 */
|
|
720
|
+
success?: (params: {
|
|
721
|
+
/**
|
|
722
|
+
* 是否可以展示
|
|
723
|
+
* @since HomeKit 3.11.0
|
|
724
|
+
*/
|
|
725
|
+
result: boolean
|
|
726
|
+
}) => void
|
|
727
|
+
/** 接口调用失败的回调函数 */
|
|
728
|
+
fail?: (params: {
|
|
729
|
+
/** 错误信息 */
|
|
730
|
+
errorMsg: string
|
|
731
|
+
/** 错误码 */
|
|
732
|
+
errorCode: string | number
|
|
733
|
+
/** 错误扩展 */
|
|
734
|
+
innerError: {
|
|
735
|
+
/** 错误扩展码 */
|
|
736
|
+
errorCode: string | number
|
|
737
|
+
/** 错误扩展信息 */
|
|
738
|
+
errorMsg: string
|
|
739
|
+
}
|
|
740
|
+
}) => void
|
|
741
|
+
}): void
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* 判断卡片是否已经显示到首页
|
|
745
|
+
* @public
|
|
746
|
+
* @since HomeKit 3.11.0
|
|
747
|
+
* @platform iOS Android
|
|
748
|
+
*/
|
|
749
|
+
export function didDisplayDIYHomeCard(params: {
|
|
750
|
+
/**
|
|
751
|
+
* 卡片
|
|
752
|
+
* @since HomeKit 3.11.0
|
|
753
|
+
*/
|
|
754
|
+
card: DIYHomeCard
|
|
755
|
+
/**
|
|
756
|
+
* 家庭id
|
|
757
|
+
* @since HomeKit 3.11.0
|
|
758
|
+
*/
|
|
759
|
+
gid: number
|
|
760
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
761
|
+
complete?: () => void
|
|
762
|
+
/** 接口调用成功的回调函数 */
|
|
763
|
+
success?: (params: {
|
|
764
|
+
/**
|
|
765
|
+
* 是否可以展示
|
|
766
|
+
* @since HomeKit 3.11.0
|
|
767
|
+
*/
|
|
768
|
+
result: boolean
|
|
769
|
+
}) => void
|
|
770
|
+
/** 接口调用失败的回调函数 */
|
|
771
|
+
fail?: (params: {
|
|
772
|
+
/** 错误信息 */
|
|
773
|
+
errorMsg: string
|
|
774
|
+
/** 错误码 */
|
|
775
|
+
errorCode: string | number
|
|
776
|
+
/** 错误扩展 */
|
|
777
|
+
innerError: {
|
|
778
|
+
/** 错误扩展码 */
|
|
779
|
+
errorCode: string | number
|
|
780
|
+
/** 错误扩展信息 */
|
|
781
|
+
errorMsg: string
|
|
782
|
+
}
|
|
783
|
+
}) => void
|
|
784
|
+
}): void
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* 添加卡片到首页
|
|
788
|
+
* @public
|
|
789
|
+
* @since HomeKit 3.11.0
|
|
790
|
+
* @platform iOS Android
|
|
791
|
+
*/
|
|
792
|
+
export function addDIYHomeCard(params: {
|
|
793
|
+
/**
|
|
794
|
+
* 卡片
|
|
795
|
+
* @since HomeKit 3.11.0
|
|
796
|
+
*/
|
|
797
|
+
card: DIYHomeCardWithStyle
|
|
798
|
+
/**
|
|
799
|
+
* 家庭id
|
|
800
|
+
* @since HomeKit 3.11.0
|
|
801
|
+
*/
|
|
802
|
+
gid: number
|
|
803
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
804
|
+
complete?: () => void
|
|
805
|
+
/** 接口调用成功的回调函数 */
|
|
806
|
+
success?: (params: null) => void
|
|
807
|
+
/** 接口调用失败的回调函数 */
|
|
808
|
+
fail?: (params: {
|
|
809
|
+
/** 错误信息 */
|
|
810
|
+
errorMsg: string
|
|
811
|
+
/** 错误码 */
|
|
812
|
+
errorCode: string | number
|
|
813
|
+
/** 错误扩展 */
|
|
814
|
+
innerError: {
|
|
815
|
+
/** 错误扩展码 */
|
|
816
|
+
errorCode: string | number
|
|
817
|
+
/** 错误扩展信息 */
|
|
818
|
+
errorMsg: string
|
|
819
|
+
}
|
|
820
|
+
}) => void
|
|
821
|
+
}): void
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* 从首页移除卡片
|
|
825
|
+
* @public
|
|
826
|
+
* @since HomeKit 3.11.0
|
|
827
|
+
* @platform iOS Android
|
|
828
|
+
*/
|
|
829
|
+
export function removeDIYHomeCard(params: {
|
|
830
|
+
/**
|
|
831
|
+
* 卡片
|
|
832
|
+
* @since HomeKit 3.11.0
|
|
833
|
+
*/
|
|
834
|
+
card: DIYHomeCard
|
|
835
|
+
/**
|
|
836
|
+
* 家庭id
|
|
837
|
+
* @since HomeKit 3.11.0
|
|
838
|
+
*/
|
|
839
|
+
gid: number
|
|
840
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
841
|
+
complete?: () => void
|
|
842
|
+
/** 接口调用成功的回调函数 */
|
|
843
|
+
success?: (params: null) => void
|
|
844
|
+
/** 接口调用失败的回调函数 */
|
|
845
|
+
fail?: (params: {
|
|
846
|
+
/** 错误信息 */
|
|
847
|
+
errorMsg: string
|
|
848
|
+
/** 错误码 */
|
|
849
|
+
errorCode: string | number
|
|
850
|
+
/** 错误扩展 */
|
|
851
|
+
innerError: {
|
|
852
|
+
/** 错误扩展码 */
|
|
853
|
+
errorCode: string | number
|
|
854
|
+
/** 错误扩展信息 */
|
|
855
|
+
errorMsg: string
|
|
856
|
+
}
|
|
857
|
+
}) => void
|
|
858
|
+
}): void
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* 播放控制
|
|
862
|
+
* @public
|
|
863
|
+
* @since HomeKit 3.12.0
|
|
864
|
+
* @platform iOS Android
|
|
865
|
+
*/
|
|
866
|
+
export function mediaPlayerControl(params: {
|
|
867
|
+
/**
|
|
868
|
+
* 控制类型
|
|
869
|
+
* 播放:PLAY
|
|
870
|
+
* 暂停:PAUSE
|
|
871
|
+
* 恢复:RESUME
|
|
872
|
+
* 释放:RELEASE
|
|
873
|
+
* @since HomeKit 3.12.0
|
|
874
|
+
*/
|
|
875
|
+
op: string
|
|
876
|
+
/**
|
|
877
|
+
* 额外参数,json格式字符串
|
|
878
|
+
* @since HomeKit 3.12.0
|
|
879
|
+
*/
|
|
880
|
+
data: string
|
|
881
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
882
|
+
complete?: () => void
|
|
883
|
+
/** 接口调用成功的回调函数 */
|
|
884
|
+
success?: (params: null) => void
|
|
885
|
+
/** 接口调用失败的回调函数 */
|
|
886
|
+
fail?: (params: {
|
|
887
|
+
/** 错误信息 */
|
|
888
|
+
errorMsg: string
|
|
889
|
+
/** 错误码 */
|
|
890
|
+
errorCode: string | number
|
|
891
|
+
/** 错误扩展 */
|
|
892
|
+
innerError: {
|
|
893
|
+
/** 错误扩展码 */
|
|
894
|
+
errorCode: string | number
|
|
895
|
+
/** 错误扩展信息 */
|
|
896
|
+
errorMsg: string
|
|
897
|
+
}
|
|
898
|
+
}) => void
|
|
899
|
+
}): void
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* 注册播放器状态监听
|
|
903
|
+
* @public
|
|
904
|
+
* @since HomeKit 3.12.0
|
|
905
|
+
* @platform iOS Android
|
|
906
|
+
*/
|
|
907
|
+
export function registerStateChangeListener(params?: {
|
|
908
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
909
|
+
complete?: () => void
|
|
910
|
+
/** 接口调用成功的回调函数 */
|
|
911
|
+
success?: (params: null) => void
|
|
912
|
+
/** 接口调用失败的回调函数 */
|
|
913
|
+
fail?: (params: {
|
|
914
|
+
/** 错误信息 */
|
|
915
|
+
errorMsg: string
|
|
916
|
+
/** 错误码 */
|
|
917
|
+
errorCode: string | number
|
|
918
|
+
/** 错误扩展 */
|
|
919
|
+
innerError: {
|
|
920
|
+
/** 错误扩展码 */
|
|
921
|
+
errorCode: string | number
|
|
922
|
+
/** 错误扩展信息 */
|
|
923
|
+
errorMsg: string
|
|
924
|
+
}
|
|
925
|
+
}) => void
|
|
926
|
+
}): void
|
|
927
|
+
|
|
928
|
+
/**
|
|
929
|
+
* 解除播放器状态监听
|
|
930
|
+
* @public
|
|
931
|
+
* @since HomeKit 3.12.0
|
|
932
|
+
* @platform iOS Android
|
|
933
|
+
*/
|
|
934
|
+
export function unregisterStateChangeListener(params?: {
|
|
935
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
936
|
+
complete?: () => void
|
|
937
|
+
/** 接口调用成功的回调函数 */
|
|
938
|
+
success?: (params: null) => void
|
|
939
|
+
/** 接口调用失败的回调函数 */
|
|
940
|
+
fail?: (params: {
|
|
941
|
+
/** 错误信息 */
|
|
942
|
+
errorMsg: string
|
|
943
|
+
/** 错误码 */
|
|
944
|
+
errorCode: string | number
|
|
945
|
+
/** 错误扩展 */
|
|
946
|
+
innerError: {
|
|
947
|
+
/** 错误扩展码 */
|
|
948
|
+
errorCode: string | number
|
|
949
|
+
/** 错误扩展信息 */
|
|
950
|
+
errorMsg: string
|
|
951
|
+
}
|
|
952
|
+
}) => void
|
|
953
|
+
}): void
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* 控制浮窗显隐
|
|
957
|
+
* @public
|
|
958
|
+
* @since HomeKit 3.12.0
|
|
959
|
+
* @platform iOS Android
|
|
960
|
+
*/
|
|
961
|
+
export function setupFloatWindow(params: {
|
|
962
|
+
/**
|
|
963
|
+
* 是否显示悬浮窗
|
|
964
|
+
* @since HomeKit 3.12.0
|
|
965
|
+
*/
|
|
966
|
+
visible: boolean
|
|
967
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
968
|
+
complete?: () => void
|
|
969
|
+
/** 接口调用成功的回调函数 */
|
|
970
|
+
success?: (params: null) => void
|
|
971
|
+
/** 接口调用失败的回调函数 */
|
|
972
|
+
fail?: (params: {
|
|
973
|
+
/** 错误信息 */
|
|
974
|
+
errorMsg: string
|
|
975
|
+
/** 错误码 */
|
|
976
|
+
errorCode: string | number
|
|
977
|
+
/** 错误扩展 */
|
|
978
|
+
innerError: {
|
|
979
|
+
/** 错误扩展码 */
|
|
980
|
+
errorCode: string | number
|
|
981
|
+
/** 错误扩展信息 */
|
|
982
|
+
errorMsg: string
|
|
983
|
+
}
|
|
984
|
+
}) => void
|
|
985
|
+
}): void
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* 设置AIBar属性
|
|
989
|
+
* 配置AIBar的路由参数等属性
|
|
990
|
+
* @public
|
|
991
|
+
* @since HomeKit 3.15.0
|
|
992
|
+
* @platform iOS Android
|
|
993
|
+
*/
|
|
994
|
+
export function setAIBarParams(params: {
|
|
995
|
+
/**
|
|
996
|
+
* 打开AI的路由参数(键值对形式)
|
|
997
|
+
* @since HomeKit 3.15.0
|
|
998
|
+
*/
|
|
999
|
+
routeParams: Record<string, string>
|
|
1000
|
+
/**
|
|
1001
|
+
* 埋点事件名
|
|
1002
|
+
* @since HomeKit 3.15.0
|
|
1003
|
+
*/
|
|
1004
|
+
eventName?: string
|
|
1005
|
+
/**
|
|
1006
|
+
* 埋点事件对应的参数(键值对形式)
|
|
1007
|
+
* @since HomeKit 3.15.0
|
|
1008
|
+
*/
|
|
1009
|
+
eventParams?: Record<string, string>
|
|
1010
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1011
|
+
complete?: () => void
|
|
1012
|
+
/** 接口调用成功的回调函数 */
|
|
1013
|
+
success?: (params: null) => void
|
|
1014
|
+
/** 接口调用失败的回调函数 */
|
|
1015
|
+
fail?: (params: {
|
|
1016
|
+
/** 错误信息 */
|
|
1017
|
+
errorMsg: string
|
|
1018
|
+
/** 错误码 */
|
|
1019
|
+
errorCode: string | number
|
|
1020
|
+
/** 错误扩展 */
|
|
1021
|
+
innerError: {
|
|
1022
|
+
/** 错误扩展码 */
|
|
1023
|
+
errorCode: string | number
|
|
1024
|
+
/** 错误扩展信息 */
|
|
1025
|
+
errorMsg: string
|
|
1026
|
+
}
|
|
1027
|
+
}) => void
|
|
1028
|
+
}): void
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
* 判断是否需要显示AIBar
|
|
1032
|
+
* @public
|
|
1033
|
+
* @since HomeKit 3.15.0
|
|
1034
|
+
* @platform iOS Android
|
|
1035
|
+
*/
|
|
1036
|
+
export function shouldShowAIBar(params?: {
|
|
1037
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1038
|
+
complete?: () => void
|
|
1039
|
+
/** 接口调用成功的回调函数 */
|
|
1040
|
+
success?: (params: {
|
|
1041
|
+
/**
|
|
1042
|
+
* 显示模式:0=不支持显示、1=以拼接在容器底部显示AIBar、2=以悬浮在容器上显示AIBar
|
|
1043
|
+
* 取值自 ShouldShowAIBarDisplayMode
|
|
1044
|
+
* @since HomeKit 3.15.0
|
|
1045
|
+
*/
|
|
1046
|
+
displayMode: number
|
|
1047
|
+
}) => void
|
|
1048
|
+
/** 接口调用失败的回调函数 */
|
|
1049
|
+
fail?: (params: {
|
|
1050
|
+
/** 错误信息 */
|
|
1051
|
+
errorMsg: string
|
|
1052
|
+
/** 错误码 */
|
|
1053
|
+
errorCode: string | number
|
|
1054
|
+
/** 错误扩展 */
|
|
1055
|
+
innerError: {
|
|
1056
|
+
/** 错误扩展码 */
|
|
1057
|
+
errorCode: string | number
|
|
1058
|
+
/** 错误扩展信息 */
|
|
1059
|
+
errorMsg: string
|
|
1060
|
+
}
|
|
1061
|
+
}) => void
|
|
1062
|
+
}): void
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* 获取AIBar的尺寸
|
|
1066
|
+
* @public
|
|
1067
|
+
* @since HomeKit 3.15.0
|
|
1068
|
+
* @platform iOS Android
|
|
1069
|
+
*/
|
|
1070
|
+
export function AIBarSize(params?: {
|
|
1071
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1072
|
+
complete?: () => void
|
|
1073
|
+
/** 接口调用成功的回调函数 */
|
|
1074
|
+
success?: (params: {
|
|
1075
|
+
/**
|
|
1076
|
+
* 宽度
|
|
1077
|
+
* @since HomeKit 3.15.0
|
|
1078
|
+
*/
|
|
1079
|
+
width: number
|
|
1080
|
+
/**
|
|
1081
|
+
* 高度
|
|
1082
|
+
* @since HomeKit 3.15.0
|
|
1083
|
+
*/
|
|
1084
|
+
height: number
|
|
1085
|
+
/**
|
|
1086
|
+
* 非透明区域宽度
|
|
1087
|
+
* @since HomeKit 3.15.0
|
|
1088
|
+
*/
|
|
1089
|
+
opaqueWidth: number
|
|
1090
|
+
/**
|
|
1091
|
+
* 非透明区域高度
|
|
1092
|
+
* @since HomeKit 3.15.0
|
|
1093
|
+
*/
|
|
1094
|
+
opaqueHeight: number
|
|
1095
|
+
}) => void
|
|
1096
|
+
/** 接口调用失败的回调函数 */
|
|
1097
|
+
fail?: (params: {
|
|
1098
|
+
/** 错误信息 */
|
|
1099
|
+
errorMsg: string
|
|
1100
|
+
/** 错误码 */
|
|
1101
|
+
errorCode: string | number
|
|
1102
|
+
/** 错误扩展 */
|
|
1103
|
+
innerError: {
|
|
1104
|
+
/** 错误扩展码 */
|
|
1105
|
+
errorCode: string | number
|
|
1106
|
+
/** 错误扩展信息 */
|
|
1107
|
+
errorMsg: string
|
|
1108
|
+
}
|
|
1109
|
+
}) => void
|
|
1110
|
+
}): void
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* 显示AIBar
|
|
1114
|
+
* @public
|
|
1115
|
+
* @since HomeKit 3.15.0
|
|
1116
|
+
* @platform iOS Android
|
|
1117
|
+
*/
|
|
1118
|
+
export function showAIBar(params: {
|
|
1119
|
+
/**
|
|
1120
|
+
* AIBar的背景色 #123456
|
|
1121
|
+
* @since HomeKit 3.15.0
|
|
1122
|
+
*/
|
|
1123
|
+
backgroundColor: string
|
|
1124
|
+
/**
|
|
1125
|
+
* 主题模式,默认 FollowSystem(0)。见 AIBarThemeMode
|
|
1126
|
+
* @since HomeKit 3.15.4
|
|
1127
|
+
*/
|
|
1128
|
+
themeMode?: number
|
|
1129
|
+
/**
|
|
1130
|
+
* AIBar配置参数(路由参数、埋点等)
|
|
1131
|
+
* @since HomeKit 3.15.0
|
|
1132
|
+
*/
|
|
1133
|
+
aiBarParams?: AIBarParams
|
|
1134
|
+
/**
|
|
1135
|
+
* 小程序页面级 id
|
|
1136
|
+
* @since HomeKit 3.15.0
|
|
1137
|
+
*/
|
|
1138
|
+
id: string
|
|
1139
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1140
|
+
complete?: () => void
|
|
1141
|
+
/** 接口调用成功的回调函数 */
|
|
1142
|
+
success?: (params: {
|
|
1143
|
+
/**
|
|
1144
|
+
* 是否显示成功
|
|
1145
|
+
* @since HomeKit 3.15.0
|
|
1146
|
+
*/
|
|
1147
|
+
success: boolean
|
|
1148
|
+
/**
|
|
1149
|
+
* AIBar 尺寸(width、height)
|
|
1150
|
+
* @since HomeKit 3.15.0
|
|
1151
|
+
*/
|
|
1152
|
+
aiBarSize: AIBarSizeResult
|
|
1153
|
+
/**
|
|
1154
|
+
* 当前显示的页面 id
|
|
1155
|
+
* @since HomeKit 3.15.0
|
|
1156
|
+
*/
|
|
1157
|
+
pageId: string
|
|
1158
|
+
}) => void
|
|
1159
|
+
/** 接口调用失败的回调函数 */
|
|
1160
|
+
fail?: (params: {
|
|
1161
|
+
/** 错误信息 */
|
|
1162
|
+
errorMsg: string
|
|
1163
|
+
/** 错误码 */
|
|
1164
|
+
errorCode: string | number
|
|
1165
|
+
/** 错误扩展 */
|
|
1166
|
+
innerError: {
|
|
1167
|
+
/** 错误扩展码 */
|
|
1168
|
+
errorCode: string | number
|
|
1169
|
+
/** 错误扩展信息 */
|
|
1170
|
+
errorMsg: string
|
|
1171
|
+
}
|
|
1172
|
+
}) => void
|
|
1173
|
+
}): void
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* 隐藏AIBar
|
|
1177
|
+
* @public
|
|
1178
|
+
* @since HomeKit 3.15.0
|
|
1179
|
+
* @platform iOS Android
|
|
1180
|
+
*/
|
|
1181
|
+
export function hideAIBar(params: {
|
|
1182
|
+
/**
|
|
1183
|
+
* 需要隐藏的页面 id
|
|
1184
|
+
* @since HomeKit 3.15.0
|
|
1185
|
+
*/
|
|
1186
|
+
pageId: string
|
|
1187
|
+
/**
|
|
1188
|
+
* 小程序页面级 id
|
|
1189
|
+
* @since HomeKit 3.15.0
|
|
1190
|
+
*/
|
|
1191
|
+
id: string
|
|
1192
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1193
|
+
complete?: () => void
|
|
1194
|
+
/** 接口调用成功的回调函数 */
|
|
1195
|
+
success?: (params: null) => void
|
|
1196
|
+
/** 接口调用失败的回调函数 */
|
|
1197
|
+
fail?: (params: {
|
|
1198
|
+
/** 错误信息 */
|
|
1199
|
+
errorMsg: string
|
|
1200
|
+
/** 错误码 */
|
|
1201
|
+
errorCode: string | number
|
|
1202
|
+
/** 错误扩展 */
|
|
1203
|
+
innerError: {
|
|
1204
|
+
/** 错误扩展码 */
|
|
1205
|
+
errorCode: string | number
|
|
1206
|
+
/** 错误扩展信息 */
|
|
1207
|
+
errorMsg: string
|
|
1208
|
+
}
|
|
1209
|
+
}) => void
|
|
1210
|
+
}): void
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* 获取AI助手开关状态
|
|
1214
|
+
* @public
|
|
1215
|
+
* @since HomeKit 3.11.1
|
|
1216
|
+
* @platform iOS Android
|
|
1217
|
+
*/
|
|
1218
|
+
export function getAIAssistantSwitch(params?: {
|
|
1219
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1220
|
+
complete?: () => void
|
|
1221
|
+
/** 接口调用成功的回调函数 */
|
|
1222
|
+
success?: (params: {
|
|
1223
|
+
/**
|
|
1224
|
+
* 开关状态
|
|
1225
|
+
* @since HomeKit 3.11.1
|
|
1226
|
+
*/
|
|
1227
|
+
open: boolean
|
|
1228
|
+
}) => void
|
|
1229
|
+
/** 接口调用失败的回调函数 */
|
|
1230
|
+
fail?: (params: {
|
|
1231
|
+
/** 错误信息 */
|
|
1232
|
+
errorMsg: string
|
|
1233
|
+
/** 错误码 */
|
|
1234
|
+
errorCode: string | number
|
|
1235
|
+
/** 错误扩展 */
|
|
1236
|
+
innerError: {
|
|
1237
|
+
/** 错误扩展码 */
|
|
1238
|
+
errorCode: string | number
|
|
1239
|
+
/** 错误扩展信息 */
|
|
1240
|
+
errorMsg: string
|
|
1241
|
+
}
|
|
1242
|
+
}) => void
|
|
1243
|
+
}): void
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* 无障碍小程序初始化
|
|
1247
|
+
* @public
|
|
1248
|
+
* @since HomeKit 3.15.3
|
|
1249
|
+
* @platform iOS Android
|
|
1250
|
+
*/
|
|
1251
|
+
export function containerInitialize(params: {
|
|
1252
|
+
/**
|
|
1253
|
+
* 所属家庭
|
|
1254
|
+
* @since HomeKit 3.15.3
|
|
1255
|
+
*/
|
|
1256
|
+
homeId: string
|
|
1257
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1258
|
+
complete?: () => void
|
|
1259
|
+
/** 接口调用成功的回调函数 */
|
|
1260
|
+
success?: (params: null) => void
|
|
1261
|
+
/** 接口调用失败的回调函数 */
|
|
1262
|
+
fail?: (params: {
|
|
1263
|
+
/** 错误信息 */
|
|
1264
|
+
errorMsg: string
|
|
1265
|
+
/** 错误码 */
|
|
1266
|
+
errorCode: string | number
|
|
1267
|
+
/** 错误扩展 */
|
|
1268
|
+
innerError: {
|
|
1269
|
+
/** 错误扩展码 */
|
|
1270
|
+
errorCode: string | number
|
|
1271
|
+
/** 错误扩展信息 */
|
|
1272
|
+
errorMsg: string
|
|
1273
|
+
}
|
|
1274
|
+
}) => void
|
|
1275
|
+
}): void
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* tab选中
|
|
1279
|
+
* @public
|
|
1280
|
+
* @since HomeKit 3.15.3
|
|
1281
|
+
* @platform iOS Android
|
|
1282
|
+
*/
|
|
1283
|
+
export function selectTab(params: {
|
|
1284
|
+
/**
|
|
1285
|
+
* 所属家庭
|
|
1286
|
+
* @since HomeKit 3.15.3
|
|
1287
|
+
*/
|
|
1288
|
+
homeId: string
|
|
1289
|
+
/**
|
|
1290
|
+
* 选中Tab索引
|
|
1291
|
+
* - 首页: home
|
|
1292
|
+
* - 场景: scene
|
|
1293
|
+
* - 设置: setting
|
|
1294
|
+
* @since HomeKit 3.15.3
|
|
1295
|
+
*/
|
|
1296
|
+
tabKey: string
|
|
1297
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1298
|
+
complete?: () => void
|
|
1299
|
+
/** 接口调用成功的回调函数 */
|
|
1300
|
+
success?: (params: null) => void
|
|
1301
|
+
/** 接口调用失败的回调函数 */
|
|
1302
|
+
fail?: (params: {
|
|
1303
|
+
/** 错误信息 */
|
|
1304
|
+
errorMsg: string
|
|
1305
|
+
/** 错误码 */
|
|
1306
|
+
errorCode: string | number
|
|
1307
|
+
/** 错误扩展 */
|
|
1308
|
+
innerError: {
|
|
1309
|
+
/** 错误扩展码 */
|
|
1310
|
+
errorCode: string | number
|
|
1311
|
+
/** 错误扩展信息 */
|
|
1312
|
+
errorMsg: string
|
|
1313
|
+
}
|
|
1314
|
+
}) => void
|
|
1315
|
+
}): void
|
|
1316
|
+
|
|
1317
|
+
/**
|
|
1318
|
+
* 场景操作
|
|
1319
|
+
* @public
|
|
1320
|
+
* @since HomeKit 3.15.3
|
|
1321
|
+
* @platform iOS Android
|
|
1322
|
+
*/
|
|
1323
|
+
export function sceneOperate(params: {
|
|
1324
|
+
/**
|
|
1325
|
+
* 场景id
|
|
1326
|
+
* @since HomeKit 3.15.3
|
|
1327
|
+
*/
|
|
1328
|
+
sceneId: string
|
|
1329
|
+
/**
|
|
1330
|
+
* 操作类型
|
|
1331
|
+
* - 执行: 2
|
|
1332
|
+
* - 启用: 1
|
|
1333
|
+
* - 禁用: 0
|
|
1334
|
+
* @since HomeKit 3.15.3
|
|
1335
|
+
*/
|
|
1336
|
+
operationType: string
|
|
1337
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1338
|
+
complete?: () => void
|
|
1339
|
+
/** 接口调用成功的回调函数 */
|
|
1340
|
+
success?: (params: null) => void
|
|
1341
|
+
/** 接口调用失败的回调函数 */
|
|
1342
|
+
fail?: (params: {
|
|
1343
|
+
/** 错误信息 */
|
|
1344
|
+
errorMsg: string
|
|
1345
|
+
/** 错误码 */
|
|
1346
|
+
errorCode: string | number
|
|
1347
|
+
/** 错误扩展 */
|
|
1348
|
+
innerError: {
|
|
1349
|
+
/** 错误扩展码 */
|
|
1350
|
+
errorCode: string | number
|
|
1351
|
+
/** 错误扩展信息 */
|
|
1352
|
+
errorMsg: string
|
|
1353
|
+
}
|
|
1354
|
+
}) => void
|
|
1355
|
+
}): void
|
|
1356
|
+
|
|
1357
|
+
/**
|
|
1358
|
+
* 配置无障碍模式
|
|
1359
|
+
* @public
|
|
1360
|
+
* @since HomeKit 3.15.3
|
|
1361
|
+
* @platform iOS Android
|
|
1362
|
+
*/
|
|
1363
|
+
export function configA11yMode(params: {
|
|
1364
|
+
/**
|
|
1365
|
+
* 是否开启无障碍模式
|
|
1366
|
+
* @since HomeKit 3.15.3
|
|
1367
|
+
*/
|
|
1368
|
+
enable: boolean
|
|
1369
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1370
|
+
complete?: () => void
|
|
1371
|
+
/** 接口调用成功的回调函数 */
|
|
1372
|
+
success?: (params: {
|
|
1373
|
+
/**
|
|
1374
|
+
* 是否开启无障碍模式
|
|
1375
|
+
* @since HomeKit 3.15.3
|
|
1376
|
+
*/
|
|
1377
|
+
enable: boolean
|
|
1378
|
+
}) => void
|
|
1379
|
+
/** 接口调用失败的回调函数 */
|
|
1380
|
+
fail?: (params: {
|
|
1381
|
+
/** 错误信息 */
|
|
1382
|
+
errorMsg: string
|
|
1383
|
+
/** 错误码 */
|
|
1384
|
+
errorCode: string | number
|
|
1385
|
+
/** 错误扩展 */
|
|
1386
|
+
innerError: {
|
|
1387
|
+
/** 错误扩展码 */
|
|
1388
|
+
errorCode: string | number
|
|
1389
|
+
/** 错误扩展信息 */
|
|
1390
|
+
errorMsg: string
|
|
1391
|
+
}
|
|
1392
|
+
}) => void
|
|
1393
|
+
}): void
|
|
1394
|
+
|
|
1395
|
+
/**
|
|
1396
|
+
* 是否支持homekit
|
|
1397
|
+
* @public
|
|
1398
|
+
* @since HomeKit 3.16.0
|
|
1399
|
+
* @platform iOS Android
|
|
1400
|
+
*/
|
|
1401
|
+
export function isSupportedHomeKit(params?: {
|
|
1402
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1403
|
+
complete?: () => void
|
|
1404
|
+
/** 接口调用成功的回调函数 */
|
|
1405
|
+
success?: (params: {
|
|
1406
|
+
/**
|
|
1407
|
+
* 是否支持 HomeKit
|
|
1408
|
+
* @since HomeKit 3.16.0
|
|
1409
|
+
*/
|
|
1410
|
+
support: boolean
|
|
1411
|
+
}) => void
|
|
1412
|
+
/** 接口调用失败的回调函数 */
|
|
1413
|
+
fail?: (params: {
|
|
1414
|
+
/** 错误信息 */
|
|
1415
|
+
errorMsg: string
|
|
1416
|
+
/** 错误码 */
|
|
1417
|
+
errorCode: string | number
|
|
1418
|
+
/** 错误扩展 */
|
|
1419
|
+
innerError: {
|
|
1420
|
+
/** 错误扩展码 */
|
|
1421
|
+
errorCode: string | number
|
|
1422
|
+
/** 错误扩展信息 */
|
|
1423
|
+
errorMsg: string
|
|
1424
|
+
}
|
|
1425
|
+
}) => void
|
|
1426
|
+
}): void
|
|
1427
|
+
|
|
1428
|
+
/**
|
|
1429
|
+
* 是否支持home assistant
|
|
1430
|
+
* @public
|
|
1431
|
+
* @since HomeKit 3.16.0
|
|
1432
|
+
* @platform iOS Android
|
|
1433
|
+
*/
|
|
1434
|
+
export function isSupportedHomeAssistant(params?: {
|
|
1435
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1436
|
+
complete?: () => void
|
|
1437
|
+
/** 接口调用成功的回调函数 */
|
|
1438
|
+
success?: (params: {
|
|
1439
|
+
/**
|
|
1440
|
+
* 是否支持 Home Assistant
|
|
1441
|
+
* @since HomeKit 3.16.0
|
|
1442
|
+
*/
|
|
1443
|
+
support: boolean
|
|
1444
|
+
}) => void
|
|
1445
|
+
/** 接口调用失败的回调函数 */
|
|
1446
|
+
fail?: (params: {
|
|
1447
|
+
/** 错误信息 */
|
|
1448
|
+
errorMsg: string
|
|
1449
|
+
/** 错误码 */
|
|
1450
|
+
errorCode: string | number
|
|
1451
|
+
/** 错误扩展 */
|
|
1452
|
+
innerError: {
|
|
1453
|
+
/** 错误扩展码 */
|
|
1454
|
+
errorCode: string | number
|
|
1455
|
+
/** 错误扩展信息 */
|
|
1456
|
+
errorMsg: string
|
|
1457
|
+
}
|
|
1458
|
+
}) => void
|
|
1459
|
+
}): void
|
|
1460
|
+
|
|
1461
|
+
/**
|
|
1462
|
+
* 是否开启设备自动添加至首页
|
|
1463
|
+
* @public
|
|
1464
|
+
* @since HomeKit 3.16.0
|
|
1465
|
+
* @platform iOS Android
|
|
1466
|
+
*/
|
|
1467
|
+
export function addDeviceToHomeEnabled(params?: {
|
|
1468
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1469
|
+
complete?: () => void
|
|
1470
|
+
/** 接口调用成功的回调函数 */
|
|
1471
|
+
success?: (params: {
|
|
1472
|
+
/**
|
|
1473
|
+
* 是否开启设备自动添加至首页
|
|
1474
|
+
* @since HomeKit 3.16.0
|
|
1475
|
+
*/
|
|
1476
|
+
enabled: boolean
|
|
1477
|
+
}) => void
|
|
1478
|
+
/** 接口调用失败的回调函数 */
|
|
1479
|
+
fail?: (params: {
|
|
1480
|
+
/** 错误信息 */
|
|
1481
|
+
errorMsg: string
|
|
1482
|
+
/** 错误码 */
|
|
1483
|
+
errorCode: string | number
|
|
1484
|
+
/** 错误扩展 */
|
|
1485
|
+
innerError: {
|
|
1486
|
+
/** 错误扩展码 */
|
|
1487
|
+
errorCode: string | number
|
|
1488
|
+
/** 错误扩展信息 */
|
|
1489
|
+
errorMsg: string
|
|
1490
|
+
}
|
|
1491
|
+
}) => void
|
|
1492
|
+
}): void
|
|
1493
|
+
|
|
1494
|
+
/**
|
|
1495
|
+
* 是否支持GoogleHome
|
|
1496
|
+
* @public
|
|
1497
|
+
* @since HomeKit 3.16.0
|
|
1498
|
+
* @platform iOS Android
|
|
1499
|
+
*/
|
|
1500
|
+
export function isSupportedGoogleHome(params?: {
|
|
1501
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1502
|
+
complete?: () => void
|
|
1503
|
+
/** 接口调用成功的回调函数 */
|
|
1504
|
+
success?: (params: {
|
|
1505
|
+
/**
|
|
1506
|
+
* 是否支持 Google Home
|
|
1507
|
+
* @since HomeKit 3.16.0
|
|
1508
|
+
*/
|
|
1509
|
+
support: boolean
|
|
1510
|
+
}) => void
|
|
1511
|
+
/** 接口调用失败的回调函数 */
|
|
1512
|
+
fail?: (params: {
|
|
1513
|
+
/** 错误信息 */
|
|
1514
|
+
errorMsg: string
|
|
1515
|
+
/** 错误码 */
|
|
1516
|
+
errorCode: string | number
|
|
1517
|
+
/** 错误扩展 */
|
|
1518
|
+
innerError: {
|
|
1519
|
+
/** 错误扩展码 */
|
|
1520
|
+
errorCode: string | number
|
|
1521
|
+
/** 错误扩展信息 */
|
|
1522
|
+
errorMsg: string
|
|
1523
|
+
}
|
|
1524
|
+
}) => void
|
|
1525
|
+
}): void
|
|
1526
|
+
|
|
1527
|
+
/**
|
|
1528
|
+
* 获取当前家庭下的设备列表
|
|
1529
|
+
* @public
|
|
1530
|
+
* @since HomeKit 3.16.0
|
|
1531
|
+
* @platform iOS Android
|
|
1532
|
+
*/
|
|
1533
|
+
export function getDeviceList(params: {
|
|
1534
|
+
/**
|
|
1535
|
+
* 家庭id
|
|
1536
|
+
* @since HomeKit 3.16.0
|
|
1537
|
+
*/
|
|
1538
|
+
homeId: number
|
|
1539
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1540
|
+
complete?: () => void
|
|
1541
|
+
/** 接口调用成功的回调函数 */
|
|
1542
|
+
success?: (params: {
|
|
1543
|
+
/**
|
|
1544
|
+
* 设备IDs列表
|
|
1545
|
+
* @since HomeKit 3.16.0
|
|
1546
|
+
*/
|
|
1547
|
+
deviceIds: string[]
|
|
1548
|
+
}) => void
|
|
1549
|
+
/** 接口调用失败的回调函数 */
|
|
1550
|
+
fail?: (params: {
|
|
1551
|
+
/** 错误信息 */
|
|
1552
|
+
errorMsg: string
|
|
1553
|
+
/** 错误码 */
|
|
1554
|
+
errorCode: string | number
|
|
1555
|
+
/** 错误扩展 */
|
|
1556
|
+
innerError: {
|
|
1557
|
+
/** 错误扩展码 */
|
|
1558
|
+
errorCode: string | number
|
|
1559
|
+
/** 错误扩展信息 */
|
|
1560
|
+
errorMsg: string
|
|
1561
|
+
}
|
|
1562
|
+
}) => void
|
|
1563
|
+
}): void
|
|
1564
|
+
|
|
1565
|
+
/**
|
|
1566
|
+
* 批量添加卡片到首页
|
|
1567
|
+
* @public
|
|
1568
|
+
* @since HomeKit 3.16.0
|
|
1569
|
+
* @platform iOS Android
|
|
1570
|
+
*/
|
|
1571
|
+
export function addDIYHomeDeviceCards(params: {
|
|
1572
|
+
/**
|
|
1573
|
+
* 设备id列表
|
|
1574
|
+
* @since HomeKit 3.16.0
|
|
1575
|
+
*/
|
|
1576
|
+
cards: DIYHomeCardWithStyle[]
|
|
1577
|
+
/**
|
|
1578
|
+
* 家庭id
|
|
1579
|
+
* @since HomeKit 3.16.0
|
|
1580
|
+
*/
|
|
1581
|
+
gid: number
|
|
1582
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1583
|
+
complete?: () => void
|
|
1584
|
+
/** 接口调用成功的回调函数 */
|
|
1585
|
+
success?: (params: null) => void
|
|
1586
|
+
/** 接口调用失败的回调函数 */
|
|
1587
|
+
fail?: (params: {
|
|
1588
|
+
/** 错误信息 */
|
|
1589
|
+
errorMsg: string
|
|
1590
|
+
/** 错误码 */
|
|
1591
|
+
errorCode: string | number
|
|
1592
|
+
/** 错误扩展 */
|
|
1593
|
+
innerError: {
|
|
1594
|
+
/** 错误扩展码 */
|
|
1595
|
+
errorCode: string | number
|
|
1596
|
+
/** 错误扩展信息 */
|
|
1597
|
+
errorMsg: string
|
|
1598
|
+
}
|
|
1599
|
+
}) => void
|
|
1600
|
+
}): void
|
|
1601
|
+
|
|
1602
|
+
/**
|
|
1603
|
+
* 从本地缓存中获取当前维度下的设备id列表
|
|
1604
|
+
* @public
|
|
1605
|
+
* @since HomeKit 3.1.0
|
|
1606
|
+
* @platform iOS Android
|
|
1607
|
+
*/
|
|
1608
|
+
export function getDeviceIdList(params: {
|
|
1609
|
+
/**
|
|
1610
|
+
* 维度id
|
|
1611
|
+
* @since HomeKit 3.1.0
|
|
1612
|
+
*/
|
|
1613
|
+
ownerId: number
|
|
1614
|
+
/**
|
|
1615
|
+
* 房间ID
|
|
1616
|
+
* @since HomeKit 3.7.10
|
|
1617
|
+
*/
|
|
1618
|
+
roomId: number
|
|
1619
|
+
/**
|
|
1620
|
+
* 设备id
|
|
1621
|
+
* @since HomeKit 3.8.0
|
|
1622
|
+
*/
|
|
1623
|
+
devId: string
|
|
1624
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1625
|
+
complete?: () => void
|
|
1626
|
+
/** 接口调用成功的回调函数 */
|
|
1627
|
+
success?: (params: {
|
|
1628
|
+
/**
|
|
1629
|
+
* 设备id列表
|
|
1630
|
+
* @since HomeKit 3.1.0
|
|
1631
|
+
*/
|
|
1632
|
+
devIds: string[]
|
|
1633
|
+
}) => void
|
|
1634
|
+
/** 接口调用失败的回调函数 */
|
|
1635
|
+
fail?: (params: {
|
|
1636
|
+
/** 错误信息 */
|
|
1637
|
+
errorMsg: string
|
|
1638
|
+
/** 错误码 */
|
|
1639
|
+
errorCode: string | number
|
|
1640
|
+
/** 错误扩展 */
|
|
1641
|
+
innerError: {
|
|
1642
|
+
/** 错误扩展码 */
|
|
1643
|
+
errorCode: string | number
|
|
1644
|
+
/** 错误扩展信息 */
|
|
1645
|
+
errorMsg: string
|
|
1646
|
+
}
|
|
1647
|
+
}) => void
|
|
1648
|
+
}): void
|
|
1649
|
+
|
|
1650
|
+
/**
|
|
1651
|
+
* 从本地缓存中获取当前维度下的房间列表,包含房间下的设备id列表
|
|
1652
|
+
* @public
|
|
1653
|
+
* @since HomeKit 3.1.0
|
|
1654
|
+
* @platform iOS Android
|
|
1655
|
+
*/
|
|
1656
|
+
export function getRoomList(params: {
|
|
1657
|
+
/**
|
|
1658
|
+
* 维度id
|
|
1659
|
+
* @since HomeKit 3.1.0
|
|
1660
|
+
*/
|
|
1661
|
+
ownerId: number
|
|
1662
|
+
/**
|
|
1663
|
+
* 房间ID
|
|
1664
|
+
* @since HomeKit 3.7.10
|
|
1665
|
+
*/
|
|
1666
|
+
roomId: number
|
|
1667
|
+
/**
|
|
1668
|
+
* 设备id
|
|
1669
|
+
* @since HomeKit 3.8.0
|
|
1670
|
+
*/
|
|
1671
|
+
devId: string
|
|
1672
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1673
|
+
complete?: () => void
|
|
1674
|
+
/** 接口调用成功的回调函数 */
|
|
1675
|
+
success?: (params: {
|
|
1676
|
+
/**
|
|
1677
|
+
* 房间列表
|
|
1678
|
+
* @since HomeKit 3.1.0
|
|
1679
|
+
*/
|
|
1680
|
+
roomDatas: RoomData[]
|
|
1681
|
+
}) => void
|
|
1682
|
+
/** 接口调用失败的回调函数 */
|
|
1683
|
+
fail?: (params: {
|
|
1684
|
+
/** 错误信息 */
|
|
1685
|
+
errorMsg: string
|
|
1686
|
+
/** 错误码 */
|
|
1687
|
+
errorCode: string | number
|
|
1688
|
+
/** 错误扩展 */
|
|
1689
|
+
innerError: {
|
|
1690
|
+
/** 错误扩展码 */
|
|
1691
|
+
errorCode: string | number
|
|
1692
|
+
/** 错误扩展信息 */
|
|
1693
|
+
errorMsg: string
|
|
1694
|
+
}
|
|
1695
|
+
}) => void
|
|
1696
|
+
}): void
|
|
1697
|
+
|
|
1698
|
+
/**
|
|
1699
|
+
* 从本地缓存中获取当前维度下的群组id列表
|
|
1700
|
+
* @public
|
|
1701
|
+
* @since HomeKit 3.5.3
|
|
1702
|
+
* @platform iOS Android
|
|
1703
|
+
*/
|
|
1704
|
+
export function getGroupIdList(params: {
|
|
1705
|
+
/**
|
|
1706
|
+
* 维度id
|
|
1707
|
+
* @since HomeKit 3.5.3
|
|
1708
|
+
*/
|
|
1709
|
+
ownerId: number
|
|
1710
|
+
/**
|
|
1711
|
+
* 房间ID
|
|
1712
|
+
* @since HomeKit 3.7.10
|
|
1713
|
+
*/
|
|
1714
|
+
roomId: number
|
|
1715
|
+
/**
|
|
1716
|
+
* 设备id
|
|
1717
|
+
* @since HomeKit 3.8.0
|
|
1718
|
+
*/
|
|
1719
|
+
devId: string
|
|
1720
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1721
|
+
complete?: () => void
|
|
1722
|
+
/** 接口调用成功的回调函数 */
|
|
1723
|
+
success?: (params: {
|
|
1724
|
+
/**
|
|
1725
|
+
* 群组id列表
|
|
1726
|
+
* @since HomeKit 3.5.3
|
|
1727
|
+
*/
|
|
1728
|
+
groupIds: string[]
|
|
1729
|
+
}) => void
|
|
1730
|
+
/** 接口调用失败的回调函数 */
|
|
1731
|
+
fail?: (params: {
|
|
1732
|
+
/** 错误信息 */
|
|
1733
|
+
errorMsg: string
|
|
1734
|
+
/** 错误码 */
|
|
1735
|
+
errorCode: string | number
|
|
1736
|
+
/** 错误扩展 */
|
|
1737
|
+
innerError: {
|
|
1738
|
+
/** 错误扩展码 */
|
|
1739
|
+
errorCode: string | number
|
|
1740
|
+
/** 错误扩展信息 */
|
|
1741
|
+
errorMsg: string
|
|
1742
|
+
}
|
|
1743
|
+
}) => void
|
|
1744
|
+
}): void
|
|
1745
|
+
|
|
1746
|
+
/**
|
|
1747
|
+
* 从本地缓存中获取当前维度下的分享设备id列表
|
|
1748
|
+
* @public
|
|
1749
|
+
* @since HomeKit 3.5.3
|
|
1750
|
+
* @platform iOS Android
|
|
1751
|
+
*/
|
|
1752
|
+
export function getShareDeviceIdList(params: {
|
|
1753
|
+
/**
|
|
1754
|
+
* 维度id
|
|
1755
|
+
* @since HomeKit 3.5.3
|
|
1756
|
+
*/
|
|
1757
|
+
ownerId: number
|
|
1758
|
+
/**
|
|
1759
|
+
* 房间ID
|
|
1760
|
+
* @since HomeKit 3.7.10
|
|
1761
|
+
*/
|
|
1762
|
+
roomId: number
|
|
1763
|
+
/**
|
|
1764
|
+
* 设备id
|
|
1765
|
+
* @since HomeKit 3.8.0
|
|
1766
|
+
*/
|
|
1767
|
+
devId: string
|
|
1768
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1769
|
+
complete?: () => void
|
|
1770
|
+
/** 接口调用成功的回调函数 */
|
|
1771
|
+
success?: (params: {
|
|
1772
|
+
/**
|
|
1773
|
+
* 设备id列表
|
|
1774
|
+
* @since HomeKit 3.5.3
|
|
1775
|
+
*/
|
|
1776
|
+
devIds: string[]
|
|
1777
|
+
}) => void
|
|
1778
|
+
/** 接口调用失败的回调函数 */
|
|
1779
|
+
fail?: (params: {
|
|
1780
|
+
/** 错误信息 */
|
|
1781
|
+
errorMsg: string
|
|
1782
|
+
/** 错误码 */
|
|
1783
|
+
errorCode: string | number
|
|
1784
|
+
/** 错误扩展 */
|
|
1785
|
+
innerError: {
|
|
1786
|
+
/** 错误扩展码 */
|
|
1787
|
+
errorCode: string | number
|
|
1788
|
+
/** 错误扩展信息 */
|
|
1789
|
+
errorMsg: string
|
|
1790
|
+
}
|
|
1791
|
+
}) => void
|
|
1792
|
+
}): void
|
|
1793
|
+
|
|
1794
|
+
/**
|
|
1795
|
+
* 从本地缓存中获取当前维度下的分享群组id列表
|
|
1796
|
+
* @public
|
|
1797
|
+
* @since HomeKit 3.5.3
|
|
1798
|
+
* @platform iOS Android
|
|
1799
|
+
*/
|
|
1800
|
+
export function getShareGroupIdList(params: {
|
|
1801
|
+
/**
|
|
1802
|
+
* 维度id
|
|
1803
|
+
* @since HomeKit 3.5.3
|
|
1804
|
+
*/
|
|
1805
|
+
ownerId: number
|
|
1806
|
+
/**
|
|
1807
|
+
* 房间ID
|
|
1808
|
+
* @since HomeKit 3.7.10
|
|
1809
|
+
*/
|
|
1810
|
+
roomId: number
|
|
1811
|
+
/**
|
|
1812
|
+
* 设备id
|
|
1813
|
+
* @since HomeKit 3.8.0
|
|
1814
|
+
*/
|
|
1815
|
+
devId: string
|
|
1816
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1817
|
+
complete?: () => void
|
|
1818
|
+
/** 接口调用成功的回调函数 */
|
|
1819
|
+
success?: (params: {
|
|
1820
|
+
/**
|
|
1821
|
+
* 群组id列表
|
|
1822
|
+
* @since HomeKit 3.5.3
|
|
1823
|
+
*/
|
|
1824
|
+
groupIds: string[]
|
|
1825
|
+
}) => void
|
|
1826
|
+
/** 接口调用失败的回调函数 */
|
|
1827
|
+
fail?: (params: {
|
|
1828
|
+
/** 错误信息 */
|
|
1829
|
+
errorMsg: string
|
|
1830
|
+
/** 错误码 */
|
|
1831
|
+
errorCode: string | number
|
|
1832
|
+
/** 错误扩展 */
|
|
1833
|
+
innerError: {
|
|
1834
|
+
/** 错误扩展码 */
|
|
1835
|
+
errorCode: string | number
|
|
1836
|
+
/** 错误扩展信息 */
|
|
1837
|
+
errorMsg: string
|
|
1838
|
+
}
|
|
1839
|
+
}) => void
|
|
1840
|
+
}): void
|
|
1841
|
+
|
|
1842
|
+
/**
|
|
1843
|
+
* 从本地缓存中获取当前维度下的本地设备id列表
|
|
1844
|
+
* @public
|
|
1845
|
+
* @since HomeKit 3.15.3
|
|
1846
|
+
* @platform iOS Android
|
|
1847
|
+
*/
|
|
1848
|
+
export function getLocalDeviceIdList(params: {
|
|
1849
|
+
/**
|
|
1850
|
+
* 维度id
|
|
1851
|
+
* @since HomeKit 3.15.3
|
|
1852
|
+
*/
|
|
1853
|
+
ownerId: number
|
|
1854
|
+
/**
|
|
1855
|
+
* 房间ID
|
|
1856
|
+
* @since HomeKit 3.15.3
|
|
1857
|
+
*/
|
|
1858
|
+
roomId: number
|
|
1859
|
+
/**
|
|
1860
|
+
* 设备id
|
|
1861
|
+
* @since HomeKit 3.15.3
|
|
1862
|
+
*/
|
|
1863
|
+
devId: string
|
|
1864
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1865
|
+
complete?: () => void
|
|
1866
|
+
/** 接口调用成功的回调函数 */
|
|
1867
|
+
success?: (params: {
|
|
1868
|
+
/**
|
|
1869
|
+
* 设备id列表
|
|
1870
|
+
* @since HomeKit 3.15.3
|
|
1871
|
+
*/
|
|
1872
|
+
devIds: string[]
|
|
1873
|
+
}) => void
|
|
1874
|
+
/** 接口调用失败的回调函数 */
|
|
1875
|
+
fail?: (params: {
|
|
1876
|
+
/** 错误信息 */
|
|
1877
|
+
errorMsg: string
|
|
1878
|
+
/** 错误码 */
|
|
1879
|
+
errorCode: string | number
|
|
1880
|
+
/** 错误扩展 */
|
|
1881
|
+
innerError: {
|
|
1882
|
+
/** 错误扩展码 */
|
|
1883
|
+
errorCode: string | number
|
|
1884
|
+
/** 错误扩展信息 */
|
|
1885
|
+
errorMsg: string
|
|
1886
|
+
}
|
|
1887
|
+
}) => void
|
|
1888
|
+
}): void
|
|
1889
|
+
|
|
1890
|
+
/**
|
|
1891
|
+
* 监听当前家庭下设备、群组的添加与删除,以及分享设备、分享群组列表的变化
|
|
1892
|
+
* @public
|
|
1893
|
+
* @since HomeKit 3.5.3
|
|
1894
|
+
* @platform iOS Android
|
|
1895
|
+
*/
|
|
1896
|
+
export function registerHomeListListener(params: {
|
|
1897
|
+
/**
|
|
1898
|
+
* 维度id
|
|
1899
|
+
* @since HomeKit 3.5.3
|
|
1900
|
+
*/
|
|
1901
|
+
ownerId: number
|
|
1902
|
+
/**
|
|
1903
|
+
* 房间ID
|
|
1904
|
+
* @since HomeKit 3.7.10
|
|
1905
|
+
*/
|
|
1906
|
+
roomId: number
|
|
1907
|
+
/**
|
|
1908
|
+
* 设备id
|
|
1909
|
+
* @since HomeKit 3.8.0
|
|
1910
|
+
*/
|
|
1911
|
+
devId: string
|
|
1912
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1913
|
+
complete?: () => void
|
|
1914
|
+
/** 接口调用成功的回调函数 */
|
|
1915
|
+
success?: (params: null) => void
|
|
1916
|
+
/** 接口调用失败的回调函数 */
|
|
1917
|
+
fail?: (params: {
|
|
1918
|
+
/** 错误信息 */
|
|
1919
|
+
errorMsg: string
|
|
1920
|
+
/** 错误码 */
|
|
1921
|
+
errorCode: string | number
|
|
1922
|
+
/** 错误扩展 */
|
|
1923
|
+
innerError: {
|
|
1924
|
+
/** 错误扩展码 */
|
|
1925
|
+
errorCode: string | number
|
|
1926
|
+
/** 错误扩展信息 */
|
|
1927
|
+
errorMsg: string
|
|
1928
|
+
}
|
|
1929
|
+
}) => void
|
|
1930
|
+
}): void
|
|
1931
|
+
|
|
1932
|
+
/**
|
|
1933
|
+
* 注销当前家庭下设备、群组的添加与删除,以及分享设备、分享群组列表的变化
|
|
1934
|
+
* @public
|
|
1935
|
+
* @since HomeKit 3.5.3
|
|
1936
|
+
* @platform iOS Android
|
|
1937
|
+
*/
|
|
1938
|
+
export function unregisterHomeListListener(params: {
|
|
1939
|
+
/**
|
|
1940
|
+
* 维度id
|
|
1941
|
+
* @since HomeKit 3.5.3
|
|
1942
|
+
*/
|
|
1943
|
+
ownerId: number
|
|
1944
|
+
/**
|
|
1945
|
+
* 房间ID
|
|
1946
|
+
* @since HomeKit 3.7.10
|
|
1947
|
+
*/
|
|
1948
|
+
roomId: number
|
|
1949
|
+
/**
|
|
1950
|
+
* 设备id
|
|
1951
|
+
* @since HomeKit 3.8.0
|
|
1952
|
+
*/
|
|
1953
|
+
devId: string
|
|
1954
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1955
|
+
complete?: () => void
|
|
1956
|
+
/** 接口调用成功的回调函数 */
|
|
1957
|
+
success?: (params: null) => void
|
|
1958
|
+
/** 接口调用失败的回调函数 */
|
|
1959
|
+
fail?: (params: {
|
|
1960
|
+
/** 错误信息 */
|
|
1961
|
+
errorMsg: string
|
|
1962
|
+
/** 错误码 */
|
|
1963
|
+
errorCode: string | number
|
|
1964
|
+
/** 错误扩展 */
|
|
1965
|
+
innerError: {
|
|
1966
|
+
/** 错误扩展码 */
|
|
1967
|
+
errorCode: string | number
|
|
1968
|
+
/** 错误扩展信息 */
|
|
1969
|
+
errorMsg: string
|
|
1970
|
+
}
|
|
1971
|
+
}) => void
|
|
1972
|
+
}): void
|
|
1973
|
+
|
|
1974
|
+
/**
|
|
1975
|
+
* 获取某个家庭房间下的设备id列表
|
|
1976
|
+
* @public
|
|
1977
|
+
* @since HomeKit 3.7.10
|
|
1978
|
+
* @platform iOS Android
|
|
1979
|
+
*/
|
|
1980
|
+
export function getDeviceIdsInRoom(params: {
|
|
1981
|
+
/**
|
|
1982
|
+
* 维度id
|
|
1983
|
+
* @since HomeKit 3.7.10
|
|
1984
|
+
*/
|
|
1985
|
+
ownerId: number
|
|
1986
|
+
/**
|
|
1987
|
+
* 房间ID
|
|
1988
|
+
* @since HomeKit 3.7.10
|
|
1989
|
+
*/
|
|
1990
|
+
roomId: number
|
|
1991
|
+
/**
|
|
1992
|
+
* 设备id
|
|
1993
|
+
* @since HomeKit 3.8.0
|
|
1994
|
+
*/
|
|
1995
|
+
devId: string
|
|
1996
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1997
|
+
complete?: () => void
|
|
1998
|
+
/** 接口调用成功的回调函数 */
|
|
1999
|
+
success?: (params: {
|
|
2000
|
+
/**
|
|
2001
|
+
* 设备id列表
|
|
2002
|
+
* @since HomeKit 3.7.10
|
|
2003
|
+
*/
|
|
2004
|
+
devIds: string[]
|
|
2005
|
+
}) => void
|
|
2006
|
+
/** 接口调用失败的回调函数 */
|
|
2007
|
+
fail?: (params: {
|
|
2008
|
+
/** 错误信息 */
|
|
2009
|
+
errorMsg: string
|
|
2010
|
+
/** 错误码 */
|
|
2011
|
+
errorCode: string | number
|
|
2012
|
+
/** 错误扩展 */
|
|
2013
|
+
innerError: {
|
|
2014
|
+
/** 错误扩展码 */
|
|
2015
|
+
errorCode: string | number
|
|
2016
|
+
/** 错误扩展信息 */
|
|
2017
|
+
errorMsg: string
|
|
2018
|
+
}
|
|
2019
|
+
}) => void
|
|
2020
|
+
}): void
|
|
2021
|
+
|
|
2022
|
+
/**
|
|
2023
|
+
* 获取某个家庭房间下的群组id列表
|
|
2024
|
+
* @public
|
|
2025
|
+
* @since HomeKit 3.7.10
|
|
2026
|
+
* @platform iOS Android
|
|
2027
|
+
*/
|
|
2028
|
+
export function getGroupIdsInRoom(params: {
|
|
2029
|
+
/**
|
|
2030
|
+
* 维度id
|
|
2031
|
+
* @since HomeKit 3.7.10
|
|
2032
|
+
*/
|
|
2033
|
+
ownerId: number
|
|
2034
|
+
/**
|
|
2035
|
+
* 房间ID
|
|
2036
|
+
* @since HomeKit 3.7.10
|
|
2037
|
+
*/
|
|
2038
|
+
roomId: number
|
|
2039
|
+
/**
|
|
2040
|
+
* 设备id
|
|
2041
|
+
* @since HomeKit 3.8.0
|
|
2042
|
+
*/
|
|
2043
|
+
devId: string
|
|
2044
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2045
|
+
complete?: () => void
|
|
2046
|
+
/** 接口调用成功的回调函数 */
|
|
2047
|
+
success?: (params: {
|
|
2048
|
+
/**
|
|
2049
|
+
* 群组id列表
|
|
2050
|
+
* @since HomeKit 3.7.10
|
|
2051
|
+
*/
|
|
2052
|
+
groupIds: string[]
|
|
2053
|
+
}) => void
|
|
2054
|
+
/** 接口调用失败的回调函数 */
|
|
2055
|
+
fail?: (params: {
|
|
2056
|
+
/** 错误信息 */
|
|
2057
|
+
errorMsg: string
|
|
2058
|
+
/** 错误码 */
|
|
2059
|
+
errorCode: string | number
|
|
2060
|
+
/** 错误扩展 */
|
|
2061
|
+
innerError: {
|
|
2062
|
+
/** 错误扩展码 */
|
|
2063
|
+
errorCode: string | number
|
|
2064
|
+
/** 错误扩展信息 */
|
|
2065
|
+
errorMsg: string
|
|
2066
|
+
}
|
|
2067
|
+
}) => void
|
|
2068
|
+
}): void
|
|
2069
|
+
|
|
2070
|
+
/**
|
|
2071
|
+
* 从本地缓存中获取与指定设备 ID 同维度下的设备 ID 列表
|
|
2072
|
+
* @public
|
|
2073
|
+
* @since HomeKit 3.8.0
|
|
2074
|
+
* @platform iOS Android
|
|
2075
|
+
*/
|
|
2076
|
+
export function getDeviceIdListWithDevId(params: {
|
|
2077
|
+
/**
|
|
2078
|
+
* 维度id
|
|
2079
|
+
* @since HomeKit 3.8.0
|
|
2080
|
+
*/
|
|
2081
|
+
ownerId: number
|
|
2082
|
+
/**
|
|
2083
|
+
* 房间ID
|
|
2084
|
+
* @since HomeKit 3.8.0
|
|
2085
|
+
*/
|
|
2086
|
+
roomId: number
|
|
2087
|
+
/**
|
|
2088
|
+
* 设备id
|
|
2089
|
+
* @since HomeKit 3.8.0
|
|
2090
|
+
*/
|
|
2091
|
+
devId: string
|
|
2092
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2093
|
+
complete?: () => void
|
|
2094
|
+
/** 接口调用成功的回调函数 */
|
|
2095
|
+
success?: (params: {
|
|
2096
|
+
/**
|
|
2097
|
+
* 设备id列表
|
|
2098
|
+
* @since HomeKit 3.8.0
|
|
2099
|
+
*/
|
|
2100
|
+
devIds: string[]
|
|
2101
|
+
}) => void
|
|
2102
|
+
/** 接口调用失败的回调函数 */
|
|
2103
|
+
fail?: (params: {
|
|
2104
|
+
/** 错误信息 */
|
|
2105
|
+
errorMsg: string
|
|
2106
|
+
/** 错误码 */
|
|
2107
|
+
errorCode: string | number
|
|
2108
|
+
/** 错误扩展 */
|
|
2109
|
+
innerError: {
|
|
2110
|
+
/** 错误扩展码 */
|
|
2111
|
+
errorCode: string | number
|
|
2112
|
+
/** 错误扩展信息 */
|
|
2113
|
+
errorMsg: string
|
|
2114
|
+
}
|
|
2115
|
+
}) => void
|
|
2116
|
+
}): void
|
|
2117
|
+
|
|
2118
|
+
/**
|
|
2119
|
+
* 将设备移动到指定房间
|
|
2120
|
+
* @public
|
|
2121
|
+
* @since HomeKit 3.10.0
|
|
2122
|
+
* @platform iOS Android
|
|
2123
|
+
*/
|
|
2124
|
+
export function switchDeviceRoom(params: {
|
|
2125
|
+
/**
|
|
2126
|
+
* 设备id
|
|
2127
|
+
* @since HomeKit 3.10.0
|
|
2128
|
+
*/
|
|
2129
|
+
deviceId: string
|
|
2130
|
+
/**
|
|
2131
|
+
* 房间id
|
|
2132
|
+
* @since HomeKit 3.10.0
|
|
2133
|
+
*/
|
|
2134
|
+
roomId: number
|
|
2135
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2136
|
+
complete?: () => void
|
|
2137
|
+
/** 接口调用成功的回调函数 */
|
|
2138
|
+
success?: (params: null) => void
|
|
2139
|
+
/** 接口调用失败的回调函数 */
|
|
2140
|
+
fail?: (params: {
|
|
2141
|
+
/** 错误信息 */
|
|
2142
|
+
errorMsg: string
|
|
2143
|
+
/** 错误码 */
|
|
2144
|
+
errorCode: string | number
|
|
2145
|
+
/** 错误扩展 */
|
|
2146
|
+
innerError: {
|
|
2147
|
+
/** 错误扩展码 */
|
|
2148
|
+
errorCode: string | number
|
|
2149
|
+
/** 错误扩展信息 */
|
|
2150
|
+
errorMsg: string
|
|
2151
|
+
}
|
|
2152
|
+
}) => void
|
|
2153
|
+
}): void
|
|
2154
|
+
|
|
2155
|
+
/**
|
|
2156
|
+
* 图形验证码校验通过后触发,传入验证码凭证并在回调中返回凭证数据
|
|
2157
|
+
* @public
|
|
2158
|
+
* @since HomeKit 3.1.3
|
|
2159
|
+
* @platform iOS Android
|
|
2160
|
+
*/
|
|
2161
|
+
export function onTicketSuccess(params?: {
|
|
2162
|
+
/**
|
|
2163
|
+
* 验证码凭证键值对,key 为参数名,value 为对应值
|
|
2164
|
+
* @since HomeKit 3.1.3
|
|
2165
|
+
*/
|
|
2166
|
+
map?: Record<string, string>
|
|
2167
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2168
|
+
complete?: () => void
|
|
2169
|
+
/** 接口调用成功的回调函数 */
|
|
2170
|
+
success?: (params: {
|
|
2171
|
+
/**
|
|
2172
|
+
* 验证码凭证键值对,key 为参数名,value 为对应值
|
|
2173
|
+
* @since HomeKit 3.1.3
|
|
2174
|
+
*/
|
|
2175
|
+
map?: Record<string, string>
|
|
2176
|
+
}) => void
|
|
2177
|
+
/** 接口调用失败的回调函数 */
|
|
2178
|
+
fail?: (params: {
|
|
2179
|
+
/** 错误信息 */
|
|
2180
|
+
errorMsg: string
|
|
2181
|
+
/** 错误码 */
|
|
2182
|
+
errorCode: string | number
|
|
2183
|
+
/** 错误扩展 */
|
|
2184
|
+
innerError: {
|
|
2185
|
+
/** 错误扩展码 */
|
|
2186
|
+
errorCode: string | number
|
|
2187
|
+
/** 错误扩展信息 */
|
|
2188
|
+
errorMsg: string
|
|
2189
|
+
}
|
|
2190
|
+
}) => void
|
|
2191
|
+
}): void
|
|
2192
|
+
|
|
2193
|
+
/**
|
|
2194
|
+
* 退出登录
|
|
2195
|
+
* @public
|
|
2196
|
+
* @since HomeKit 3.6.1
|
|
2197
|
+
* @platform iOS Android
|
|
2198
|
+
*/
|
|
2199
|
+
export function logout(params?: {
|
|
2200
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2201
|
+
complete?: () => void
|
|
2202
|
+
/** 接口调用成功的回调函数 */
|
|
2203
|
+
success?: (params: null) => void
|
|
2204
|
+
/** 接口调用失败的回调函数 */
|
|
2205
|
+
fail?: (params: {
|
|
2206
|
+
/** 错误信息 */
|
|
2207
|
+
errorMsg: string
|
|
2208
|
+
/** 错误码 */
|
|
2209
|
+
errorCode: string | number
|
|
2210
|
+
/** 错误扩展 */
|
|
2211
|
+
innerError: {
|
|
2212
|
+
/** 错误扩展码 */
|
|
2213
|
+
errorCode: string | number
|
|
2214
|
+
/** 错误扩展信息 */
|
|
2215
|
+
errorMsg: string
|
|
2216
|
+
}
|
|
2217
|
+
}) => void
|
|
2218
|
+
}): void
|
|
2219
|
+
|
|
2220
|
+
/**
|
|
2221
|
+
* 能否显示手机号绑定弹窗
|
|
2222
|
+
* @public
|
|
2223
|
+
* @since HomeKit 3.14.0
|
|
2224
|
+
* @platform iOS Android
|
|
2225
|
+
*/
|
|
2226
|
+
export function canShowMobileBindView(params?: {
|
|
2227
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2228
|
+
complete?: () => void
|
|
2229
|
+
/** 接口调用成功的回调函数 */
|
|
2230
|
+
success?: (params: {
|
|
2231
|
+
/**
|
|
2232
|
+
* 是否展示手机号绑定弹窗
|
|
2233
|
+
* @since HomeKit 3.14.0
|
|
2234
|
+
*/
|
|
2235
|
+
show: boolean
|
|
2236
|
+
}) => void
|
|
2237
|
+
/** 接口调用失败的回调函数 */
|
|
2238
|
+
fail?: (params: {
|
|
2239
|
+
/** 错误信息 */
|
|
2240
|
+
errorMsg: string
|
|
2241
|
+
/** 错误码 */
|
|
2242
|
+
errorCode: string | number
|
|
2243
|
+
/** 错误扩展 */
|
|
2244
|
+
innerError: {
|
|
2245
|
+
/** 错误扩展码 */
|
|
2246
|
+
errorCode: string | number
|
|
2247
|
+
/** 错误扩展信息 */
|
|
2248
|
+
errorMsg: string
|
|
2249
|
+
}
|
|
2250
|
+
}) => void
|
|
2251
|
+
}): void
|
|
2252
|
+
|
|
2253
|
+
/**
|
|
2254
|
+
* 显示手机号绑定弹窗
|
|
2255
|
+
* @public
|
|
2256
|
+
* @since HomeKit 3.14.0
|
|
2257
|
+
* @platform iOS Android
|
|
2258
|
+
*/
|
|
2259
|
+
export function showMobileBindView(params?: {
|
|
2260
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2261
|
+
complete?: () => void
|
|
2262
|
+
/** 接口调用成功的回调函数 */
|
|
2263
|
+
success?: (params: null) => void
|
|
2264
|
+
/** 接口调用失败的回调函数 */
|
|
2265
|
+
fail?: (params: {
|
|
2266
|
+
/** 错误信息 */
|
|
2267
|
+
errorMsg: string
|
|
2268
|
+
/** 错误码 */
|
|
2269
|
+
errorCode: string | number
|
|
2270
|
+
/** 错误扩展 */
|
|
2271
|
+
innerError: {
|
|
2272
|
+
/** 错误扩展码 */
|
|
2273
|
+
errorCode: string | number
|
|
2274
|
+
/** 错误扩展信息 */
|
|
2275
|
+
errorMsg: string
|
|
2276
|
+
}
|
|
2277
|
+
}) => void
|
|
2278
|
+
}): void
|
|
2279
|
+
|
|
2280
|
+
/**
|
|
2281
|
+
* 【废弃】打开推荐场景详情页面
|
|
2282
|
+
* 请用deviceKit包下同名方法替代
|
|
2283
|
+
* @public
|
|
2284
|
+
* @since HomeKit 1.0.4
|
|
2285
|
+
* @platform iOS Android
|
|
2286
|
+
*/
|
|
2287
|
+
export function openRecommendSceneDetail(params: {
|
|
2288
|
+
/**
|
|
2289
|
+
* 来源
|
|
2290
|
+
* @since HomeKit 1.0.4
|
|
2291
|
+
*/
|
|
2292
|
+
source: string
|
|
2293
|
+
/**
|
|
2294
|
+
* 场景模型
|
|
2295
|
+
* @since HomeKit 1.0.4
|
|
2296
|
+
*/
|
|
2297
|
+
sceneModel: Record<string, any>
|
|
2298
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2299
|
+
complete?: () => void
|
|
2300
|
+
/** 接口调用成功的回调函数 */
|
|
2301
|
+
success?: (params: {
|
|
2302
|
+
/**
|
|
2303
|
+
* 返回状态,默认返回 true
|
|
2304
|
+
* @since HomeKit 3.0.3
|
|
2305
|
+
* @defaultValue true
|
|
2306
|
+
*/
|
|
2307
|
+
status?: boolean
|
|
2308
|
+
/**
|
|
2309
|
+
* 成功返回的类型。0-未操作,1-保存成功,2-点击不感兴趣
|
|
2310
|
+
* @since HomeKit 3.0.3
|
|
2311
|
+
*/
|
|
2312
|
+
type: number
|
|
2313
|
+
/**
|
|
2314
|
+
* 返回的场景数据,可能为空
|
|
2315
|
+
* @since HomeKit 3.0.3
|
|
2316
|
+
*/
|
|
2317
|
+
data?: Record<string, any>
|
|
2318
|
+
}) => void
|
|
2319
|
+
/** 接口调用失败的回调函数 */
|
|
2320
|
+
fail?: (params: {
|
|
2321
|
+
/** 错误信息 */
|
|
2322
|
+
errorMsg: string
|
|
2323
|
+
/** 错误码 */
|
|
2324
|
+
errorCode: string | number
|
|
2325
|
+
/** 错误扩展 */
|
|
2326
|
+
innerError: {
|
|
2327
|
+
/** 错误扩展码 */
|
|
2328
|
+
errorCode: string | number
|
|
2329
|
+
/** 错误扩展信息 */
|
|
2330
|
+
errorMsg: string
|
|
2331
|
+
}
|
|
2332
|
+
}) => void
|
|
2333
|
+
}): void
|
|
2334
|
+
|
|
2335
|
+
/**
|
|
2336
|
+
* 【废弃】跳转一键执行和自动化页面
|
|
2337
|
+
* 请用deviceKit包下同名方法替代
|
|
2338
|
+
* @public
|
|
2339
|
+
* @since HomeKit 2.1.0
|
|
2340
|
+
* @platform iOS Android
|
|
2341
|
+
*/
|
|
2342
|
+
export function openDeviceExecutionAndAnutomation(params: {
|
|
2343
|
+
/**
|
|
2344
|
+
* 设备 ID
|
|
2345
|
+
* @since HomeKit 2.1.0
|
|
2346
|
+
*/
|
|
2347
|
+
deviceId: string
|
|
2348
|
+
/**
|
|
2349
|
+
* 页面标题,Android 需要
|
|
2350
|
+
* @since HomeKit 2.1.0
|
|
2351
|
+
*/
|
|
2352
|
+
title?: string
|
|
2353
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
2354
|
+
complete?: () => void
|
|
2355
|
+
/** 接口调用成功的回调函数 */
|
|
2356
|
+
success?: (params: null) => void
|
|
2357
|
+
/** 接口调用失败的回调函数 */
|
|
2358
|
+
fail?: (params: {
|
|
2359
|
+
/** 错误信息 */
|
|
2360
|
+
errorMsg: string
|
|
2361
|
+
/** 错误码 */
|
|
2362
|
+
errorCode: string | number
|
|
2363
|
+
/** 错误扩展 */
|
|
2364
|
+
innerError: {
|
|
2365
|
+
/** 错误扩展码 */
|
|
2366
|
+
errorCode: string | number
|
|
2367
|
+
/** 错误扩展信息 */
|
|
2368
|
+
errorMsg: string
|
|
2369
|
+
}
|
|
2370
|
+
}) => void
|
|
2371
|
+
}): void
|
|
2372
|
+
|
|
2373
|
+
/**
|
|
2374
|
+
* 家庭变换 完成 事件
|
|
2375
|
+
* @public
|
|
2376
|
+
* @since HomeKit 3.5.4
|
|
2377
|
+
* @platform iOS Android
|
|
2378
|
+
*/
|
|
2379
|
+
export function onHomeChangeComplete(
|
|
2380
|
+
listener: (params: HomeInfoData) => void
|
|
2381
|
+
): void
|
|
2382
|
+
|
|
2383
|
+
/**
|
|
2384
|
+
* 家庭变换 完成 事件
|
|
2385
|
+
* @public
|
|
2386
|
+
* @since HomeKit 3.5.4
|
|
2387
|
+
* @platform iOS Android
|
|
2388
|
+
*/
|
|
2389
|
+
export function offHomeChangeComplete(
|
|
2390
|
+
listener: (params: HomeInfoData) => void
|
|
2391
|
+
): void
|
|
2392
|
+
|
|
2393
|
+
/**
|
|
2394
|
+
* 移除家庭成员事件
|
|
2395
|
+
* @public
|
|
2396
|
+
* @since HomeKit 3.10.1
|
|
2397
|
+
* @platform iOS Android
|
|
2398
|
+
*/
|
|
2399
|
+
export function onRemoveMemberHandler(
|
|
2400
|
+
listener: (params: MemberHandlerResponse) => void
|
|
2401
|
+
): void
|
|
2402
|
+
|
|
2403
|
+
/**
|
|
2404
|
+
* 移除家庭成员事件
|
|
2405
|
+
* @public
|
|
2406
|
+
* @since HomeKit 3.10.1
|
|
2407
|
+
* @platform iOS Android
|
|
2408
|
+
*/
|
|
2409
|
+
export function offRemoveMemberHandler(
|
|
2410
|
+
listener: (params: MemberHandlerResponse) => void
|
|
2411
|
+
): void
|
|
2412
|
+
|
|
2413
|
+
/**
|
|
2414
|
+
* 重置家庭成员昵称事件
|
|
2415
|
+
* @public
|
|
2416
|
+
* @since HomeKit 3.10.1
|
|
2417
|
+
* @platform iOS Android
|
|
2418
|
+
*/
|
|
2419
|
+
export function onResetMemberNameHandler(
|
|
2420
|
+
listener: (params: MemberHandlerResponse) => void
|
|
2421
|
+
): void
|
|
2422
|
+
|
|
2423
|
+
/**
|
|
2424
|
+
* 重置家庭成员昵称事件
|
|
2425
|
+
* @public
|
|
2426
|
+
* @since HomeKit 3.10.1
|
|
2427
|
+
* @platform iOS Android
|
|
2428
|
+
*/
|
|
2429
|
+
export function offResetMemberNameHandler(
|
|
2430
|
+
listener: (params: MemberHandlerResponse) => void
|
|
2431
|
+
): void
|
|
2432
|
+
|
|
2433
|
+
/**
|
|
2434
|
+
* 重置家庭成员角色事件
|
|
2435
|
+
* @public
|
|
2436
|
+
* @since HomeKit 3.10.1
|
|
2437
|
+
* @platform iOS Android
|
|
2438
|
+
*/
|
|
2439
|
+
export function onResetMemberRoleHandler(
|
|
2440
|
+
listener: (params: MemberHandlerResponse) => void
|
|
2441
|
+
): void
|
|
2442
|
+
|
|
2443
|
+
/**
|
|
2444
|
+
* 重置家庭成员角色事件
|
|
2445
|
+
* @public
|
|
2446
|
+
* @since HomeKit 3.10.1
|
|
2447
|
+
* @platform iOS Android
|
|
2448
|
+
*/
|
|
2449
|
+
export function offResetMemberRoleHandler(
|
|
2450
|
+
listener: (params: MemberHandlerResponse) => void
|
|
2451
|
+
): void
|
|
2452
|
+
|
|
2453
|
+
/**
|
|
2454
|
+
* 播放器状态变化事件
|
|
2455
|
+
* @public
|
|
2456
|
+
* @since HomeKit 3.12.0
|
|
2457
|
+
* @platform iOS Android
|
|
2458
|
+
*/
|
|
2459
|
+
export function onPlayerStateChangeHander(
|
|
2460
|
+
listener: (params: ThingPlayerStateHandlerResponse) => void
|
|
2461
|
+
): void
|
|
2462
|
+
|
|
2463
|
+
/**
|
|
2464
|
+
* 播放器状态变化事件
|
|
2465
|
+
* @public
|
|
2466
|
+
* @since HomeKit 3.12.0
|
|
2467
|
+
* @platform iOS Android
|
|
2468
|
+
*/
|
|
2469
|
+
export function offPlayerStateChangeHander(
|
|
2470
|
+
listener: (params: ThingPlayerStateHandlerResponse) => void
|
|
2471
|
+
): void
|
|
2472
|
+
|
|
2473
|
+
/**
|
|
2474
|
+
* AIBar 输入入口点击事件
|
|
2475
|
+
* @public
|
|
2476
|
+
* @since HomeKit 3.15.0
|
|
2477
|
+
* @platform iOS Android
|
|
2478
|
+
*/
|
|
2479
|
+
export function onAIBarInputClick(
|
|
2480
|
+
listener: (params: AIBarInputClickEvent) => void
|
|
2481
|
+
): void
|
|
2482
|
+
|
|
2483
|
+
/**
|
|
2484
|
+
* AIBar 输入入口点击事件
|
|
2485
|
+
* @public
|
|
2486
|
+
* @since HomeKit 3.15.0
|
|
2487
|
+
* @platform iOS Android
|
|
2488
|
+
*/
|
|
2489
|
+
export function offAIBarInputClick(
|
|
2490
|
+
listener: (params: AIBarInputClickEvent) => void
|
|
2491
|
+
): void
|
|
2492
|
+
|
|
2493
|
+
/**
|
|
2494
|
+
* 首页展示相关数据缓存发生变更事件,需要触发首页刷新
|
|
2495
|
+
* 注意:需要通过'containerInitialize' 或 ‘registerHomeChangeListener’ 注册监听才能收到事件
|
|
2496
|
+
* 数据变更包含:
|
|
2497
|
+
* 1.家庭相关:切换家庭、当前家庭改名
|
|
2498
|
+
* 2.房间相关:新增、删除、排序、改名、新增设备、删除设备、设备排序
|
|
2499
|
+
* 3.设备群组相关:新增、删除、排序
|
|
2500
|
+
* 4.分享设备群组相关:新增、删除
|
|
2501
|
+
* 5.本地设备相关:新增、删除
|
|
2502
|
+
* 6.页面刷新:下拉刷新
|
|
2503
|
+
* @public
|
|
2504
|
+
* @since HomeKit 3.15.3
|
|
2505
|
+
* @platform iOS Android
|
|
2506
|
+
*/
|
|
2507
|
+
export function onHomePageDataChanged(
|
|
2508
|
+
listener: (params: HomeInfoData) => void
|
|
2509
|
+
): void
|
|
2510
|
+
|
|
2511
|
+
/**
|
|
2512
|
+
* 首页展示相关数据缓存发生变更事件,需要触发首页刷新
|
|
2513
|
+
* 注意:需要通过'containerInitialize' 或 ‘registerHomeChangeListener’ 注册监听才能收到事件
|
|
2514
|
+
* 数据变更包含:
|
|
2515
|
+
* 1.家庭相关:切换家庭、当前家庭改名
|
|
2516
|
+
* 2.房间相关:新增、删除、排序、改名、新增设备、删除设备、设备排序
|
|
2517
|
+
* 3.设备群组相关:新增、删除、排序
|
|
2518
|
+
* 4.分享设备群组相关:新增、删除
|
|
2519
|
+
* 5.本地设备相关:新增、删除
|
|
2520
|
+
* 6.页面刷新:下拉刷新
|
|
2521
|
+
* @public
|
|
2522
|
+
* @since HomeKit 3.15.3
|
|
2523
|
+
* @platform iOS Android
|
|
2524
|
+
*/
|
|
2525
|
+
export function offHomePageDataChanged(
|
|
2526
|
+
listener: (params: HomeInfoData) => void
|
|
2527
|
+
): void
|
|
2528
|
+
|
|
2529
|
+
/**
|
|
2530
|
+
* 场景页展示相关数据缓存发生变更事件,需要触发场景页刷新
|
|
2531
|
+
* 注意:需要通过'containerInitialize'注册监听才能收到事件
|
|
2532
|
+
* 数据变更包含:
|
|
2533
|
+
* 1.场景相关:新增、删除
|
|
2534
|
+
* 2.页面刷新:下拉刷新
|
|
2535
|
+
* @public
|
|
2536
|
+
* @since HomeKit 3.15.3
|
|
2537
|
+
* @platform iOS Android
|
|
2538
|
+
*/
|
|
2539
|
+
export function onScenePageDataChanged(
|
|
2540
|
+
listener: (params: SceneListData) => void
|
|
2541
|
+
): void
|
|
2542
|
+
|
|
2543
|
+
/**
|
|
2544
|
+
* 场景页展示相关数据缓存发生变更事件,需要触发场景页刷新
|
|
2545
|
+
* 注意:需要通过'containerInitialize'注册监听才能收到事件
|
|
2546
|
+
* 数据变更包含:
|
|
2547
|
+
* 1.场景相关:新增、删除
|
|
2548
|
+
* 2.页面刷新:下拉刷新
|
|
2549
|
+
* @public
|
|
2550
|
+
* @since HomeKit 3.15.3
|
|
2551
|
+
* @platform iOS Android
|
|
2552
|
+
*/
|
|
2553
|
+
export function offScenePageDataChanged(
|
|
2554
|
+
listener: (params: SceneListData) => void
|
|
2555
|
+
): void
|
|
2556
|
+
|
|
2557
|
+
/**
|
|
2558
|
+
* 设备移除事件
|
|
2559
|
+
* @public
|
|
2560
|
+
* @since HomeKit 3.5.3
|
|
2561
|
+
* @platform iOS Android
|
|
2562
|
+
*/
|
|
2563
|
+
export function onHomeDeviceRemoved(
|
|
2564
|
+
listener: (params: OnDeviceRemovedBody) => void
|
|
2565
|
+
): void
|
|
2566
|
+
|
|
2567
|
+
/**
|
|
2568
|
+
* 设备移除事件
|
|
2569
|
+
* @public
|
|
2570
|
+
* @since HomeKit 3.5.3
|
|
2571
|
+
* @platform iOS Android
|
|
2572
|
+
*/
|
|
2573
|
+
export function offHomeDeviceRemoved(
|
|
2574
|
+
listener: (params: OnDeviceRemovedBody) => void
|
|
2575
|
+
): void
|
|
2576
|
+
|
|
2577
|
+
/**
|
|
2578
|
+
* 设备添加事件
|
|
2579
|
+
* @public
|
|
2580
|
+
* @since HomeKit 3.5.3
|
|
2581
|
+
* @platform iOS Android
|
|
2582
|
+
*/
|
|
2583
|
+
export function onHomeDeviceAdd(
|
|
2584
|
+
listener: (params: OnDeviceAddBody) => void
|
|
2585
|
+
): void
|
|
2586
|
+
|
|
2587
|
+
/**
|
|
2588
|
+
* 设备添加事件
|
|
2589
|
+
* @public
|
|
2590
|
+
* @since HomeKit 3.5.3
|
|
2591
|
+
* @platform iOS Android
|
|
2592
|
+
*/
|
|
2593
|
+
export function offHomeDeviceAdd(
|
|
2594
|
+
listener: (params: OnDeviceAddBody) => void
|
|
2595
|
+
): void
|
|
2596
|
+
|
|
2597
|
+
/**
|
|
2598
|
+
* 群组移除事件
|
|
2599
|
+
* @public
|
|
2600
|
+
* @since HomeKit 3.5.3
|
|
2601
|
+
* @platform iOS Android
|
|
2602
|
+
*/
|
|
2603
|
+
export function onHomeGroupRemoved(
|
|
2604
|
+
listener: (params: OnGroupRemovedBody) => void
|
|
2605
|
+
): void
|
|
2606
|
+
|
|
2607
|
+
/**
|
|
2608
|
+
* 群组移除事件
|
|
2609
|
+
* @public
|
|
2610
|
+
* @since HomeKit 3.5.3
|
|
2611
|
+
* @platform iOS Android
|
|
2612
|
+
*/
|
|
2613
|
+
export function offHomeGroupRemoved(
|
|
2614
|
+
listener: (params: OnGroupRemovedBody) => void
|
|
2615
|
+
): void
|
|
2616
|
+
|
|
2617
|
+
/**
|
|
2618
|
+
* 群组添加事件
|
|
2619
|
+
* @public
|
|
2620
|
+
* @since HomeKit 3.5.3
|
|
2621
|
+
* @platform iOS Android
|
|
2622
|
+
*/
|
|
2623
|
+
export function onHomeGroupAdd(
|
|
2624
|
+
listener: (params: OnGroupAddBody) => void
|
|
2625
|
+
): void
|
|
2626
|
+
|
|
2627
|
+
/**
|
|
2628
|
+
* 群组添加事件
|
|
2629
|
+
* @public
|
|
2630
|
+
* @since HomeKit 3.5.3
|
|
2631
|
+
* @platform iOS Android
|
|
2632
|
+
*/
|
|
2633
|
+
export function offHomeGroupAdd(
|
|
2634
|
+
listener: (params: OnGroupAddBody) => void
|
|
2635
|
+
): void
|
|
2636
|
+
|
|
2637
|
+
/**
|
|
2638
|
+
* 分享列表(设备、群组)发生变化
|
|
2639
|
+
* @public
|
|
2640
|
+
* @since HomeKit 3.5.3
|
|
2641
|
+
* @platform iOS Android
|
|
2642
|
+
*/
|
|
2643
|
+
export function onShareListChange(
|
|
2644
|
+
listener: (params: OnShareListChangeBody) => void
|
|
2645
|
+
): void
|
|
2646
|
+
|
|
2647
|
+
/**
|
|
2648
|
+
* 分享列表(设备、群组)发生变化
|
|
2649
|
+
* @public
|
|
2650
|
+
* @since HomeKit 3.5.3
|
|
2651
|
+
* @platform iOS Android
|
|
2652
|
+
*/
|
|
2653
|
+
export function offShareListChange(
|
|
2654
|
+
listener: (params: OnShareListChangeBody) => void
|
|
2655
|
+
): void
|
|
2656
|
+
|
|
2657
|
+
/**
|
|
2658
|
+
* 注册家庭切换通知
|
|
2659
|
+
* @public
|
|
2660
|
+
* @since HomeKit 3.2.0
|
|
2661
|
+
* @platform iOS Android
|
|
2662
|
+
*/
|
|
2663
|
+
export function onHomeChanged(
|
|
2664
|
+
listener: (params: {
|
|
2665
|
+
/**
|
|
2666
|
+
* 家庭名称
|
|
2667
|
+
* @since HomeKit 3.5.4
|
|
2668
|
+
*/
|
|
2669
|
+
homeName: string
|
|
2670
|
+
/**
|
|
2671
|
+
* 家庭id
|
|
2672
|
+
* @since HomeKit 3.5.4
|
|
2673
|
+
*/
|
|
2674
|
+
homeId: string
|
|
2675
|
+
/**
|
|
2676
|
+
* 经度
|
|
2677
|
+
* @since HomeKit 3.5.4
|
|
2678
|
+
*/
|
|
2679
|
+
longitude: string
|
|
2680
|
+
/**
|
|
2681
|
+
* 维度
|
|
2682
|
+
* @since HomeKit 3.5.4
|
|
2683
|
+
*/
|
|
2684
|
+
latitude: string
|
|
2685
|
+
/**
|
|
2686
|
+
* 详细地址
|
|
2687
|
+
* @since HomeKit 3.5.4
|
|
2688
|
+
*/
|
|
2689
|
+
address: string
|
|
2690
|
+
/**
|
|
2691
|
+
* 是否是管理员
|
|
2692
|
+
* true 是管理员; false 非管理员
|
|
2693
|
+
* @since HomeKit 3.5.4
|
|
2694
|
+
*/
|
|
2695
|
+
admin: boolean
|
|
2696
|
+
/**
|
|
2697
|
+
* 家庭模式,取值自 ThingSmartHomeMode
|
|
2698
|
+
* @since HomeKit 3.7.8
|
|
2699
|
+
*/
|
|
2700
|
+
mode: number
|
|
2701
|
+
/**
|
|
2702
|
+
* 家庭角色,取值自 ThingSmartHomeRole
|
|
2703
|
+
* @since HomeKit 3.7.12
|
|
2704
|
+
*/
|
|
2705
|
+
role: number
|
|
2706
|
+
}) => void
|
|
2707
|
+
): void
|
|
2708
|
+
|
|
2709
|
+
/**
|
|
2710
|
+
* 解除注册家庭切换通知
|
|
2711
|
+
* @public
|
|
2712
|
+
* @since HomeKit 3.2.0
|
|
2713
|
+
* @platform iOS Android
|
|
2714
|
+
*/
|
|
2715
|
+
export function offHomeChanged(
|
|
2716
|
+
listener: (params: {
|
|
2717
|
+
/**
|
|
2718
|
+
* 家庭名称
|
|
2719
|
+
* @since HomeKit 3.5.4
|
|
2720
|
+
*/
|
|
2721
|
+
homeName: string
|
|
2722
|
+
/**
|
|
2723
|
+
* 家庭id
|
|
2724
|
+
* @since HomeKit 3.5.4
|
|
2725
|
+
*/
|
|
2726
|
+
homeId: string
|
|
2727
|
+
/**
|
|
2728
|
+
* 经度
|
|
2729
|
+
* @since HomeKit 3.5.4
|
|
2730
|
+
*/
|
|
2731
|
+
longitude: string
|
|
2732
|
+
/**
|
|
2733
|
+
* 维度
|
|
2734
|
+
* @since HomeKit 3.5.4
|
|
2735
|
+
*/
|
|
2736
|
+
latitude: string
|
|
2737
|
+
/**
|
|
2738
|
+
* 详细地址
|
|
2739
|
+
* @since HomeKit 3.5.4
|
|
2740
|
+
*/
|
|
2741
|
+
address: string
|
|
2742
|
+
/**
|
|
2743
|
+
* 是否是管理员
|
|
2744
|
+
* true 是管理员; false 非管理员
|
|
2745
|
+
* @since HomeKit 3.5.4
|
|
2746
|
+
*/
|
|
2747
|
+
admin: boolean
|
|
2748
|
+
/**
|
|
2749
|
+
* 家庭模式,取值自 ThingSmartHomeMode
|
|
2750
|
+
* @since HomeKit 3.7.8
|
|
2751
|
+
*/
|
|
2752
|
+
mode: number
|
|
2753
|
+
/**
|
|
2754
|
+
* 家庭角色,取值自 ThingSmartHomeRole
|
|
2755
|
+
* @since HomeKit 3.7.12
|
|
2756
|
+
*/
|
|
2757
|
+
role: number
|
|
2758
|
+
}) => void
|
|
2759
|
+
): void
|
|
2760
|
+
|
|
2761
|
+
/**
|
|
2762
|
+
* `getLocalDeviceConfigWithDevId` 的请求参数
|
|
2763
|
+
* @since HomeKit 2.0.4
|
|
2764
|
+
*/
|
|
2765
|
+
export interface Param {
|
|
2766
|
+
/**
|
|
2767
|
+
* 设备ID
|
|
2768
|
+
* @since HomeKit 2.0.4
|
|
2769
|
+
*/
|
|
2770
|
+
devId: string
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
/** @since HomeKit 1.0.4 */
|
|
2774
|
+
export interface HomeInfoData {
|
|
2775
|
+
/**
|
|
2776
|
+
* 家庭名称
|
|
2777
|
+
* @since HomeKit 3.5.4
|
|
2778
|
+
*/
|
|
2779
|
+
homeName: string
|
|
2780
|
+
/**
|
|
2781
|
+
* 家庭id
|
|
2782
|
+
* @since HomeKit 3.5.4
|
|
2783
|
+
*/
|
|
2784
|
+
homeId: string
|
|
2785
|
+
/**
|
|
2786
|
+
* 经度
|
|
2787
|
+
* @since HomeKit 3.5.4
|
|
2788
|
+
*/
|
|
2789
|
+
longitude: string
|
|
2790
|
+
/**
|
|
2791
|
+
* 维度
|
|
2792
|
+
* @since HomeKit 3.5.4
|
|
2793
|
+
*/
|
|
2794
|
+
latitude: string
|
|
2795
|
+
/**
|
|
2796
|
+
* 详细地址
|
|
2797
|
+
* @since HomeKit 3.5.4
|
|
2798
|
+
*/
|
|
2799
|
+
address: string
|
|
2800
|
+
/**
|
|
2801
|
+
* 是否是管理员
|
|
2802
|
+
* true 是管理员; false 非管理员
|
|
2803
|
+
* @since HomeKit 3.5.4
|
|
2804
|
+
*/
|
|
2805
|
+
admin: boolean
|
|
2806
|
+
/**
|
|
2807
|
+
* 家庭模式,取值自 ThingSmartHomeMode
|
|
2808
|
+
* @since HomeKit 3.7.8
|
|
2809
|
+
*/
|
|
2810
|
+
mode: number
|
|
2811
|
+
/**
|
|
2812
|
+
* 家庭角色,取值自 ThingSmartHomeRole
|
|
2813
|
+
* @since HomeKit 3.7.12
|
|
2814
|
+
*/
|
|
2815
|
+
role: number
|
|
2816
|
+
}
|
|
2817
|
+
|
|
2818
|
+
/**
|
|
2819
|
+
* getDeviceRoomInfo 的请求参数
|
|
2820
|
+
* @since HomeKit 3.0.1
|
|
2821
|
+
*/
|
|
2822
|
+
export interface GetDeviceRoomInfoParams {
|
|
2823
|
+
/**
|
|
2824
|
+
* 设备 ID
|
|
2825
|
+
* @since HomeKit 3.0.1
|
|
2826
|
+
*/
|
|
2827
|
+
deviceId: string
|
|
2828
|
+
}
|
|
2829
|
+
|
|
2830
|
+
/**
|
|
2831
|
+
* 获取设备房间信息的返回结果
|
|
2832
|
+
* @since HomeKit 3.0.1
|
|
2833
|
+
*/
|
|
2834
|
+
export interface GetDeviceRoomInfoResponse {
|
|
2835
|
+
/**
|
|
2836
|
+
* 房间 ID
|
|
2837
|
+
* @since HomeKit 3.0.1
|
|
2838
|
+
*/
|
|
2839
|
+
roomId: number
|
|
2840
|
+
/**
|
|
2841
|
+
* 房间名称
|
|
2842
|
+
* @since HomeKit 3.0.1
|
|
2843
|
+
*/
|
|
2844
|
+
name: string
|
|
2845
|
+
}
|
|
2846
|
+
|
|
2847
|
+
/**
|
|
2848
|
+
* getGroupRoomInfo 的请求参数
|
|
2849
|
+
* @since HomeKit 3.1.4
|
|
2850
|
+
*/
|
|
2851
|
+
export interface GroupRoomInfoParams {
|
|
2852
|
+
/**
|
|
2853
|
+
* 群组 ID
|
|
2854
|
+
* @since HomeKit 3.1.4
|
|
2855
|
+
*/
|
|
2856
|
+
groupId: string
|
|
2857
|
+
}
|
|
2858
|
+
|
|
2859
|
+
/**
|
|
2860
|
+
* 获取群组房间信息的返回结果
|
|
2861
|
+
* @since HomeKit 3.1.4
|
|
2862
|
+
*/
|
|
2863
|
+
export interface GroupRoomInfoResponse {
|
|
2864
|
+
/**
|
|
2865
|
+
* 房间 ID
|
|
2866
|
+
* @since HomeKit 3.1.4
|
|
2867
|
+
*/
|
|
2868
|
+
roomId: number
|
|
2869
|
+
/**
|
|
2870
|
+
* 房间名称
|
|
2871
|
+
* @since HomeKit 3.1.4
|
|
2872
|
+
*/
|
|
2873
|
+
name: string
|
|
2874
|
+
}
|
|
2875
|
+
|
|
2876
|
+
/** @since HomeKit 3.7.15 */
|
|
2877
|
+
export interface HomeIdBean {
|
|
2878
|
+
/**
|
|
2879
|
+
* 家庭id
|
|
2880
|
+
* @since HomeKit 3.7.15
|
|
2881
|
+
*/
|
|
2882
|
+
homeId: string
|
|
2883
|
+
}
|
|
2884
|
+
|
|
2885
|
+
/** @since HomeKit 3.7.15 */
|
|
2886
|
+
export interface CreateHomeParams {
|
|
2887
|
+
/**
|
|
2888
|
+
* 家庭名称,必填
|
|
2889
|
+
* @since HomeKit 3.7.15
|
|
2890
|
+
*/
|
|
2891
|
+
homeName: string
|
|
2892
|
+
/**
|
|
2893
|
+
* 家庭模式,取值自 ThingSmartHomeMode, default: 0
|
|
2894
|
+
* @since HomeKit 3.7.15
|
|
2895
|
+
*/
|
|
2896
|
+
mode: number
|
|
2897
|
+
/**
|
|
2898
|
+
* 经度,可选
|
|
2899
|
+
* @since HomeKit 3.7.15
|
|
2900
|
+
*/
|
|
2901
|
+
longitude?: string
|
|
2902
|
+
/**
|
|
2903
|
+
* 维度,可选
|
|
2904
|
+
* @since HomeKit 3.7.15
|
|
2905
|
+
*/
|
|
2906
|
+
latitude?: string
|
|
2907
|
+
/**
|
|
2908
|
+
* 详细地址,可选
|
|
2909
|
+
* @since HomeKit 3.7.15
|
|
2910
|
+
*/
|
|
2911
|
+
address?: string
|
|
2912
|
+
/**
|
|
2913
|
+
* 房间列表,可选
|
|
2914
|
+
* @since HomeKit 3.7.15
|
|
2915
|
+
*/
|
|
2916
|
+
rooms?: string[]
|
|
2917
|
+
}
|
|
2918
|
+
|
|
2919
|
+
/** @since HomeKit 3.7.14 */
|
|
2920
|
+
export interface SwitchHomeData {
|
|
2921
|
+
/**
|
|
2922
|
+
* 是否需要隐藏家庭管理
|
|
2923
|
+
* @since HomeKit 3.7.14
|
|
2924
|
+
*/
|
|
2925
|
+
hiddenHouseManager: boolean
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2928
|
+
/** @since HomeKit 3.5.4 */
|
|
2929
|
+
export interface HomeListData {
|
|
2930
|
+
/**
|
|
2931
|
+
* 家庭列表信息
|
|
2932
|
+
* @since HomeKit 3.5.4
|
|
2933
|
+
*/
|
|
2934
|
+
homeList: HomeInfoData[]
|
|
2935
|
+
}
|
|
2936
|
+
|
|
2937
|
+
/** @since HomeKit 3.7.2 */
|
|
2938
|
+
export interface InviteParams {
|
|
2939
|
+
/**
|
|
2940
|
+
* 家庭 ID
|
|
2941
|
+
* @since HomeKit 3.7.2
|
|
2942
|
+
*/
|
|
2943
|
+
homeId: number
|
|
2944
|
+
/**
|
|
2945
|
+
* 成员角色
|
|
2946
|
+
* 0 - 普通成员
|
|
2947
|
+
* 1 - 管理员
|
|
2948
|
+
* 2 - 家庭所有者
|
|
2949
|
+
* -1 - 自定义成员角色
|
|
2950
|
+
* -999 - 非法成员
|
|
2951
|
+
* @since HomeKit 3.7.2
|
|
2952
|
+
*/
|
|
2953
|
+
role?: number
|
|
2954
|
+
/**
|
|
2955
|
+
* only use role == MemberRole.ROLE_CUSTOM
|
|
2956
|
+
* @since HomeKit 3.7.2
|
|
2957
|
+
*/
|
|
2958
|
+
customRoleId?: number
|
|
2959
|
+
}
|
|
2960
|
+
|
|
2961
|
+
/** @since HomeKit 3.7.2 */
|
|
2962
|
+
export interface InvitationMessageBean {
|
|
2963
|
+
/**
|
|
2964
|
+
* 邀请信息
|
|
2965
|
+
* @since HomeKit 3.7.2
|
|
2966
|
+
*/
|
|
2967
|
+
invitationMsgContent: string
|
|
2968
|
+
/**
|
|
2969
|
+
* 邀请码
|
|
2970
|
+
* @since HomeKit 3.7.2
|
|
2971
|
+
*/
|
|
2972
|
+
invitationCode: string
|
|
2973
|
+
}
|
|
2974
|
+
|
|
2975
|
+
/** @since HomeKit 3.7.5 */
|
|
2976
|
+
export interface ThingPaymentControlEntryRequest {
|
|
2977
|
+
/**
|
|
2978
|
+
* 入口标识
|
|
2979
|
+
* @since HomeKit 3.7.5
|
|
2980
|
+
*/
|
|
2981
|
+
entryID: string
|
|
2982
|
+
}
|
|
2983
|
+
|
|
2984
|
+
/** @since HomeKit 3.7.5 */
|
|
2985
|
+
export interface ThingPaymentEntryData {
|
|
2986
|
+
/**
|
|
2987
|
+
* 入口标识
|
|
2988
|
+
* @since HomeKit 3.7.5
|
|
2989
|
+
*/
|
|
2990
|
+
entryID: string
|
|
2991
|
+
/**
|
|
2992
|
+
* true:显示入口
|
|
2993
|
+
* @since HomeKit 3.7.5
|
|
2994
|
+
*/
|
|
2995
|
+
isDisplayed: boolean
|
|
2996
|
+
/**
|
|
2997
|
+
* 入口携带的扩展信息
|
|
2998
|
+
* @since HomeKit 3.7.5
|
|
2999
|
+
*/
|
|
3000
|
+
entryExtensionInfo?: Record<string, any>
|
|
3001
|
+
/**
|
|
3002
|
+
* 入口名称
|
|
3003
|
+
* @since HomeKit 3.7.5
|
|
3004
|
+
*/
|
|
3005
|
+
entryName: string
|
|
3006
|
+
/**
|
|
3007
|
+
* true:当前入口必须要有 IAP 开启
|
|
3008
|
+
* @since HomeKit 3.7.5
|
|
3009
|
+
*/
|
|
3010
|
+
isIAPForced: boolean
|
|
3011
|
+
}
|
|
3012
|
+
|
|
3013
|
+
/**
|
|
3014
|
+
* 家庭成员操作事件体
|
|
3015
|
+
* @since HomeKit 3.10.1
|
|
3016
|
+
*/
|
|
3017
|
+
export interface MemberHandlerResponse {
|
|
3018
|
+
/**
|
|
3019
|
+
* 家庭成员ID
|
|
3020
|
+
* @since HomeKit 3.10.1
|
|
3021
|
+
*/
|
|
3022
|
+
memberId: string
|
|
3023
|
+
/**
|
|
3024
|
+
* 是否成功
|
|
3025
|
+
* @since HomeKit 3.10.1
|
|
3026
|
+
*/
|
|
3027
|
+
success: boolean
|
|
3028
|
+
}
|
|
3029
|
+
|
|
3030
|
+
/** @since HomeKit 3.11.0 */
|
|
3031
|
+
export interface DIYHomeCard {
|
|
3032
|
+
/**
|
|
3033
|
+
* 卡片类型 DIYHomeCardType
|
|
3034
|
+
* @since HomeKit 3.11.0
|
|
3035
|
+
*/
|
|
3036
|
+
type: number
|
|
3037
|
+
/**
|
|
3038
|
+
* 内容id, 当type为设备、房间、场景、小程序时, 需要传
|
|
3039
|
+
* @since HomeKit 3.11.0
|
|
3040
|
+
*/
|
|
3041
|
+
contentId?: string
|
|
3042
|
+
}
|
|
3043
|
+
|
|
3044
|
+
/** @since HomeKit 3.11.0 */
|
|
3045
|
+
export interface CanDisplayDIYHomeCardParams {
|
|
3046
|
+
/**
|
|
3047
|
+
* 卡片
|
|
3048
|
+
* @since HomeKit 3.11.0
|
|
3049
|
+
*/
|
|
3050
|
+
card: DIYHomeCard
|
|
3051
|
+
/**
|
|
3052
|
+
* 家庭id
|
|
3053
|
+
* @since HomeKit 3.11.0
|
|
3054
|
+
*/
|
|
3055
|
+
gid: number
|
|
3056
|
+
}
|
|
3057
|
+
|
|
3058
|
+
/** @since HomeKit 3.11.0 */
|
|
3059
|
+
export interface CanDisplayDIYHomeCardResult {
|
|
3060
|
+
/**
|
|
3061
|
+
* 是否可以展示
|
|
3062
|
+
* @since HomeKit 3.11.0
|
|
3063
|
+
*/
|
|
3064
|
+
result: boolean
|
|
3065
|
+
}
|
|
3066
|
+
|
|
3067
|
+
/** @since HomeKit 3.11.0 */
|
|
3068
|
+
export interface DidDisplayDIYHomeCardParams {
|
|
3069
|
+
/**
|
|
3070
|
+
* 卡片
|
|
3071
|
+
* @since HomeKit 3.11.0
|
|
3072
|
+
*/
|
|
3073
|
+
card: DIYHomeCard
|
|
3074
|
+
/**
|
|
3075
|
+
* 家庭id
|
|
3076
|
+
* @since HomeKit 3.11.0
|
|
3077
|
+
*/
|
|
3078
|
+
gid: number
|
|
3079
|
+
}
|
|
3080
|
+
|
|
3081
|
+
/** @since HomeKit 3.11.0 */
|
|
3082
|
+
export interface DidDisplayDIYHomeCardResult {
|
|
3083
|
+
/**
|
|
3084
|
+
* 是否可以展示
|
|
3085
|
+
* @since HomeKit 3.11.0
|
|
3086
|
+
*/
|
|
3087
|
+
result: boolean
|
|
3088
|
+
}
|
|
3089
|
+
|
|
3090
|
+
/** @since HomeKit 3.11.0 */
|
|
3091
|
+
export interface DIYHomeCardWithStyle {
|
|
3092
|
+
/**
|
|
3093
|
+
* 卡片类型 DIYHomeCardType
|
|
3094
|
+
* @since HomeKit 3.11.0
|
|
3095
|
+
*/
|
|
3096
|
+
type: number
|
|
3097
|
+
/**
|
|
3098
|
+
* 卡片样式 DIYHomeCardStyle
|
|
3099
|
+
* @since HomeKit 3.11.0
|
|
3100
|
+
*/
|
|
3101
|
+
style?: number
|
|
3102
|
+
/**
|
|
3103
|
+
* 内容id, 当type为设备、房间、场景、小程序时, 需要传
|
|
3104
|
+
* @since HomeKit 3.11.0
|
|
3105
|
+
*/
|
|
3106
|
+
contentId?: string
|
|
3107
|
+
}
|
|
3108
|
+
|
|
3109
|
+
/** @since HomeKit 3.11.0 */
|
|
3110
|
+
export interface AddDIYHomeCardParams {
|
|
3111
|
+
/**
|
|
3112
|
+
* 卡片
|
|
3113
|
+
* @since HomeKit 3.11.0
|
|
3114
|
+
*/
|
|
3115
|
+
card: DIYHomeCardWithStyle
|
|
3116
|
+
/**
|
|
3117
|
+
* 家庭id
|
|
3118
|
+
* @since HomeKit 3.11.0
|
|
3119
|
+
*/
|
|
3120
|
+
gid: number
|
|
3121
|
+
}
|
|
3122
|
+
|
|
3123
|
+
/** @since HomeKit 3.11.0 */
|
|
3124
|
+
export interface RemoveDIYHomeCardParams {
|
|
3125
|
+
/**
|
|
3126
|
+
* 卡片
|
|
3127
|
+
* @since HomeKit 3.11.0
|
|
3128
|
+
*/
|
|
3129
|
+
card: DIYHomeCard
|
|
3130
|
+
/**
|
|
3131
|
+
* 家庭id
|
|
3132
|
+
* @since HomeKit 3.11.0
|
|
3133
|
+
*/
|
|
3134
|
+
gid: number
|
|
3135
|
+
}
|
|
3136
|
+
|
|
3137
|
+
/** @since HomeKit 3.12.0 */
|
|
3138
|
+
export interface ThingMediaControlParams {
|
|
3139
|
+
/**
|
|
3140
|
+
* 控制类型
|
|
3141
|
+
* 播放:PLAY
|
|
3142
|
+
* 暂停:PAUSE
|
|
3143
|
+
* 恢复:RESUME
|
|
3144
|
+
* 释放:RELEASE
|
|
3145
|
+
* @since HomeKit 3.12.0
|
|
3146
|
+
*/
|
|
3147
|
+
op: string
|
|
3148
|
+
/**
|
|
3149
|
+
* 额外参数,json格式字符串
|
|
3150
|
+
* @since HomeKit 3.12.0
|
|
3151
|
+
*/
|
|
3152
|
+
data: string
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
/** @since HomeKit 3.12.0 */
|
|
3156
|
+
export interface ThingPlayerStateHandlerResponse {
|
|
3157
|
+
/**
|
|
3158
|
+
* 播放状态
|
|
3159
|
+
* @since HomeKit 3.12.0
|
|
3160
|
+
*/
|
|
3161
|
+
status: number
|
|
3162
|
+
/**
|
|
3163
|
+
* 参数,json格式字符串
|
|
3164
|
+
* @since HomeKit 3.12.0
|
|
3165
|
+
*/
|
|
3166
|
+
data: string
|
|
3167
|
+
}
|
|
3168
|
+
|
|
3169
|
+
/** @since HomeKit 3.12.0 */
|
|
3170
|
+
export interface ThingSetupFloatWindowParams {
|
|
3171
|
+
/**
|
|
3172
|
+
* 是否显示悬浮窗
|
|
3173
|
+
* @since HomeKit 3.12.0
|
|
3174
|
+
*/
|
|
3175
|
+
visible: boolean
|
|
3176
|
+
}
|
|
3177
|
+
|
|
3178
|
+
/**
|
|
3179
|
+
* AIBar配置参数
|
|
3180
|
+
* @since HomeKit 3.15.0
|
|
3181
|
+
*/
|
|
3182
|
+
export interface AIBarParams {
|
|
3183
|
+
/**
|
|
3184
|
+
* 打开AI的路由参数(键值对形式)
|
|
3185
|
+
* @since HomeKit 3.15.0
|
|
3186
|
+
*/
|
|
3187
|
+
routeParams: Record<string, string>
|
|
3188
|
+
/**
|
|
3189
|
+
* 埋点事件名
|
|
3190
|
+
* @since HomeKit 3.15.0
|
|
3191
|
+
*/
|
|
3192
|
+
eventName?: string
|
|
3193
|
+
/**
|
|
3194
|
+
* 埋点事件对应的参数(键值对形式)
|
|
3195
|
+
* @since HomeKit 3.15.0
|
|
3196
|
+
*/
|
|
3197
|
+
eventParams?: Record<string, string>
|
|
3198
|
+
}
|
|
3199
|
+
|
|
3200
|
+
/**
|
|
3201
|
+
* 判断是否显示AIBar的返回结果
|
|
3202
|
+
* @since HomeKit 3.15.0
|
|
3203
|
+
*/
|
|
3204
|
+
export interface ShouldShowAIBarResult {
|
|
3205
|
+
/**
|
|
3206
|
+
* 显示模式:0=不支持显示、1=以拼接在容器底部显示AIBar、2=以悬浮在容器上显示AIBar
|
|
3207
|
+
* 取值自 ShouldShowAIBarDisplayMode
|
|
3208
|
+
* @since HomeKit 3.15.0
|
|
3209
|
+
*/
|
|
3210
|
+
displayMode: number
|
|
3211
|
+
}
|
|
3212
|
+
|
|
3213
|
+
/**
|
|
3214
|
+
* AIBar尺寸返回结果
|
|
3215
|
+
* @since HomeKit 3.15.0
|
|
3216
|
+
*/
|
|
3217
|
+
export interface AIBarSizeResult {
|
|
3218
|
+
/**
|
|
3219
|
+
* 宽度
|
|
3220
|
+
* @since HomeKit 3.15.0
|
|
3221
|
+
*/
|
|
3222
|
+
width: number
|
|
3223
|
+
/**
|
|
3224
|
+
* 高度
|
|
3225
|
+
* @since HomeKit 3.15.0
|
|
3226
|
+
*/
|
|
3227
|
+
height: number
|
|
3228
|
+
/**
|
|
3229
|
+
* 非透明区域宽度
|
|
3230
|
+
* @since HomeKit 3.15.0
|
|
3231
|
+
*/
|
|
3232
|
+
opaqueWidth: number
|
|
3233
|
+
/**
|
|
3234
|
+
* 非透明区域高度
|
|
3235
|
+
* @since HomeKit 3.15.0
|
|
3236
|
+
*/
|
|
3237
|
+
opaqueHeight: number
|
|
3238
|
+
}
|
|
3239
|
+
|
|
3240
|
+
/**
|
|
3241
|
+
* 显示AIBar入参
|
|
3242
|
+
* @since HomeKit 3.15.0
|
|
3243
|
+
*/
|
|
3244
|
+
export interface ShowAIBarParams {
|
|
3245
|
+
/**
|
|
3246
|
+
* AIBar的背景色 #123456
|
|
3247
|
+
* @since HomeKit 3.15.0
|
|
3248
|
+
*/
|
|
3249
|
+
backgroundColor: string
|
|
3250
|
+
/**
|
|
3251
|
+
* 主题模式,默认 FollowSystem(0)。见 AIBarThemeMode
|
|
3252
|
+
* @since HomeKit 3.15.4
|
|
3253
|
+
*/
|
|
3254
|
+
themeMode?: number
|
|
3255
|
+
/**
|
|
3256
|
+
* AIBar配置参数(路由参数、埋点等)
|
|
3257
|
+
* @since HomeKit 3.15.0
|
|
3258
|
+
*/
|
|
3259
|
+
aiBarParams?: AIBarParams
|
|
3260
|
+
/**
|
|
3261
|
+
* 小程序页面级 id
|
|
3262
|
+
* @since HomeKit 3.15.0
|
|
3263
|
+
*/
|
|
3264
|
+
id: string
|
|
3265
|
+
}
|
|
3266
|
+
|
|
3267
|
+
/**
|
|
3268
|
+
* 显示AIBar返回结果
|
|
3269
|
+
* @since HomeKit 3.15.0
|
|
3270
|
+
*/
|
|
3271
|
+
export interface ShowAIBarResult {
|
|
3272
|
+
/**
|
|
3273
|
+
* 是否显示成功
|
|
3274
|
+
* @since HomeKit 3.15.0
|
|
3275
|
+
*/
|
|
3276
|
+
success: boolean
|
|
3277
|
+
/**
|
|
3278
|
+
* AIBar 尺寸(width、height)
|
|
3279
|
+
* @since HomeKit 3.15.0
|
|
3280
|
+
*/
|
|
3281
|
+
aiBarSize: AIBarSizeResult
|
|
3282
|
+
/**
|
|
3283
|
+
* 当前显示的页面 id
|
|
3284
|
+
* @since HomeKit 3.15.0
|
|
3285
|
+
*/
|
|
3286
|
+
pageId: string
|
|
3287
|
+
}
|
|
3288
|
+
|
|
3289
|
+
/**
|
|
3290
|
+
* 隐藏AIBar入参
|
|
3291
|
+
* @since HomeKit 3.15.0
|
|
3292
|
+
*/
|
|
3293
|
+
export interface HideAIBarParams {
|
|
3294
|
+
/**
|
|
3295
|
+
* 需要隐藏的页面 id
|
|
3296
|
+
* @since HomeKit 3.15.0
|
|
3297
|
+
*/
|
|
3298
|
+
pageId: string
|
|
3299
|
+
/**
|
|
3300
|
+
* 小程序页面级 id
|
|
3301
|
+
* @since HomeKit 3.15.0
|
|
3302
|
+
*/
|
|
3303
|
+
id: string
|
|
3304
|
+
}
|
|
3305
|
+
|
|
3306
|
+
/**
|
|
3307
|
+
* AIBar 输入入口点击事件体
|
|
3308
|
+
* @since HomeKit 3.15.0
|
|
3309
|
+
*/
|
|
3310
|
+
export interface AIBarInputClickEvent {
|
|
3311
|
+
/**
|
|
3312
|
+
* 输入类型,取值自 AIBarInputType
|
|
3313
|
+
* @since HomeKit 3.15.0
|
|
3314
|
+
*/
|
|
3315
|
+
inputType: string
|
|
3316
|
+
}
|
|
3317
|
+
|
|
3318
|
+
/** @since HomeKit 3.11.1 */
|
|
3319
|
+
export interface AIAssistantSwitchResponse {
|
|
3320
|
+
/**
|
|
3321
|
+
* 开关状态
|
|
3322
|
+
* @since HomeKit 3.11.1
|
|
3323
|
+
*/
|
|
3324
|
+
open: boolean
|
|
3325
|
+
}
|
|
3326
|
+
|
|
3327
|
+
/** @since HomeKit 3.15.3 */
|
|
3328
|
+
export interface ContainerInitializeParams {
|
|
3329
|
+
/**
|
|
3330
|
+
* 所属家庭
|
|
3331
|
+
* @since HomeKit 3.15.3
|
|
3332
|
+
*/
|
|
3333
|
+
homeId: string
|
|
3334
|
+
}
|
|
3335
|
+
|
|
3336
|
+
/** @since HomeKit 3.15.3 */
|
|
3337
|
+
export interface TabSelectParams {
|
|
3338
|
+
/**
|
|
3339
|
+
* 所属家庭
|
|
3340
|
+
* @since HomeKit 3.15.3
|
|
3341
|
+
*/
|
|
3342
|
+
homeId: string
|
|
3343
|
+
/**
|
|
3344
|
+
* 选中Tab索引
|
|
3345
|
+
* - 首页: home
|
|
3346
|
+
* - 场景: scene
|
|
3347
|
+
* - 设置: setting
|
|
3348
|
+
* @since HomeKit 3.15.3
|
|
3349
|
+
*/
|
|
3350
|
+
tabKey: string
|
|
3351
|
+
}
|
|
3352
|
+
|
|
3353
|
+
/** @since HomeKit 3.15.3 */
|
|
3354
|
+
export interface SceneIcon {
|
|
3355
|
+
/**
|
|
3356
|
+
* 前景图
|
|
3357
|
+
* @since HomeKit 3.15.3
|
|
3358
|
+
*/
|
|
3359
|
+
fgIcon: string
|
|
3360
|
+
/**
|
|
3361
|
+
* 背景色
|
|
3362
|
+
* @since HomeKit 3.15.3
|
|
3363
|
+
*/
|
|
3364
|
+
bgColor: string
|
|
3365
|
+
}
|
|
3366
|
+
|
|
3367
|
+
/** @since HomeKit 3.15.3 */
|
|
3368
|
+
export interface SceneInfoData {
|
|
3369
|
+
/**
|
|
3370
|
+
* 场景id
|
|
3371
|
+
* @since HomeKit 3.15.3
|
|
3372
|
+
*/
|
|
3373
|
+
sceneId: string
|
|
3374
|
+
/**
|
|
3375
|
+
* 场景名称
|
|
3376
|
+
* @since HomeKit 3.15.3
|
|
3377
|
+
*/
|
|
3378
|
+
sceneName: string
|
|
3379
|
+
/**
|
|
3380
|
+
* 场景类型:1.一键执行 2.自动化
|
|
3381
|
+
* @since HomeKit 3.15.3
|
|
3382
|
+
*/
|
|
3383
|
+
type: number
|
|
3384
|
+
/**
|
|
3385
|
+
* 家庭id
|
|
3386
|
+
* @since HomeKit 3.15.3
|
|
3387
|
+
*/
|
|
3388
|
+
homeId: number
|
|
3389
|
+
/**
|
|
3390
|
+
* 自动化条件图标列表
|
|
3391
|
+
* @since HomeKit 3.15.3
|
|
3392
|
+
*/
|
|
3393
|
+
conditionIcons: SceneIcon[]
|
|
3394
|
+
/**
|
|
3395
|
+
* 自动化动作图标列表
|
|
3396
|
+
* @since HomeKit 3.15.3
|
|
3397
|
+
*/
|
|
3398
|
+
actionIcons: SceneIcon[]
|
|
3399
|
+
/**
|
|
3400
|
+
* 一键执行的图标
|
|
3401
|
+
* @since HomeKit 3.15.3
|
|
3402
|
+
*/
|
|
3403
|
+
fgIcon: string
|
|
3404
|
+
/**
|
|
3405
|
+
* 一键执行的背景
|
|
3406
|
+
* @since HomeKit 3.15.3
|
|
3407
|
+
*/
|
|
3408
|
+
bgColor: string
|
|
3409
|
+
/**
|
|
3410
|
+
* 是否启用(仅自动化有效)
|
|
3411
|
+
* @since HomeKit 3.15.3
|
|
3412
|
+
*/
|
|
3413
|
+
enable: boolean
|
|
3414
|
+
}
|
|
3415
|
+
|
|
3416
|
+
/** @since HomeKit 3.15.3 */
|
|
3417
|
+
export interface SceneListData {
|
|
3418
|
+
/**
|
|
3419
|
+
* 场景列表信息
|
|
3420
|
+
* @since HomeKit 3.15.3
|
|
3421
|
+
*/
|
|
3422
|
+
sceneList: SceneInfoData[]
|
|
3423
|
+
}
|
|
3424
|
+
|
|
3425
|
+
/** @since HomeKit 3.15.3 */
|
|
3426
|
+
export interface SceneOperationParams {
|
|
3427
|
+
/**
|
|
3428
|
+
* 场景id
|
|
3429
|
+
* @since HomeKit 3.15.3
|
|
3430
|
+
*/
|
|
3431
|
+
sceneId: string
|
|
3432
|
+
/**
|
|
3433
|
+
* 操作类型
|
|
3434
|
+
* - 执行: 2
|
|
3435
|
+
* - 启用: 1
|
|
3436
|
+
* - 禁用: 0
|
|
3437
|
+
* @since HomeKit 3.15.3
|
|
3438
|
+
*/
|
|
3439
|
+
operationType: string
|
|
3440
|
+
}
|
|
3441
|
+
|
|
3442
|
+
/** @since HomeKit 3.15.3 */
|
|
3443
|
+
export interface ConfigA11yParams {
|
|
3444
|
+
/**
|
|
3445
|
+
* 是否开启无障碍模式
|
|
3446
|
+
* @since HomeKit 3.15.3
|
|
3447
|
+
*/
|
|
3448
|
+
enable: boolean
|
|
3449
|
+
}
|
|
3450
|
+
|
|
3451
|
+
/** @since HomeKit 3.15.3 */
|
|
3452
|
+
export interface A11yStatusResponse {
|
|
3453
|
+
/**
|
|
3454
|
+
* 是否开启无障碍模式
|
|
3455
|
+
* @since HomeKit 3.15.3
|
|
3456
|
+
*/
|
|
3457
|
+
enable: boolean
|
|
3458
|
+
}
|
|
3459
|
+
|
|
3460
|
+
/** @since HomeKit 3.16.0 */
|
|
3461
|
+
export interface SupportHomeKitResponse {
|
|
3462
|
+
/**
|
|
3463
|
+
* 是否支持 HomeKit
|
|
3464
|
+
* @since HomeKit 3.16.0
|
|
3465
|
+
*/
|
|
3466
|
+
support: boolean
|
|
3467
|
+
}
|
|
3468
|
+
|
|
3469
|
+
/** @since HomeKit 3.16.0 */
|
|
3470
|
+
export interface SupportHomeAssistantResponse {
|
|
3471
|
+
/**
|
|
3472
|
+
* 是否支持 Home Assistant
|
|
3473
|
+
* @since HomeKit 3.16.0
|
|
3474
|
+
*/
|
|
3475
|
+
support: boolean
|
|
3476
|
+
}
|
|
3477
|
+
|
|
3478
|
+
/** @since HomeKit 3.16.0 */
|
|
3479
|
+
export interface AddDeviceToHomeEnabledResponse {
|
|
3480
|
+
/**
|
|
3481
|
+
* 是否开启设备自动添加至首页
|
|
3482
|
+
* @since HomeKit 3.16.0
|
|
3483
|
+
*/
|
|
3484
|
+
enabled: boolean
|
|
3485
|
+
}
|
|
3486
|
+
|
|
3487
|
+
/** @since HomeKit 3.16.0 */
|
|
3488
|
+
export interface SupportGoogleHomeResponse {
|
|
3489
|
+
/**
|
|
3490
|
+
* 是否支持 Google Home
|
|
3491
|
+
* @since HomeKit 3.16.0
|
|
3492
|
+
*/
|
|
3493
|
+
support: boolean
|
|
3494
|
+
}
|
|
3495
|
+
|
|
3496
|
+
/** @since HomeKit 3.16.0 */
|
|
3497
|
+
export interface GetDeviceListParams {
|
|
3498
|
+
/**
|
|
3499
|
+
* 家庭id
|
|
3500
|
+
* @since HomeKit 3.16.0
|
|
3501
|
+
*/
|
|
3502
|
+
homeId: number
|
|
3503
|
+
}
|
|
3504
|
+
|
|
3505
|
+
/** @since HomeKit 3.16.0 */
|
|
3506
|
+
export interface GetDeviceListResponse {
|
|
3507
|
+
/**
|
|
3508
|
+
* 设备IDs列表
|
|
3509
|
+
* @since HomeKit 3.16.0
|
|
3510
|
+
*/
|
|
3511
|
+
deviceIds: string[]
|
|
3512
|
+
}
|
|
3513
|
+
|
|
3514
|
+
/** @since HomeKit 3.16.0 */
|
|
3515
|
+
export interface AddDIYHomeDeviceCardsParams {
|
|
3516
|
+
/**
|
|
3517
|
+
* 设备id列表
|
|
3518
|
+
* @since HomeKit 3.16.0
|
|
3519
|
+
*/
|
|
3520
|
+
cards: DIYHomeCardWithStyle[]
|
|
3521
|
+
/**
|
|
3522
|
+
* 家庭id
|
|
3523
|
+
* @since HomeKit 3.16.0
|
|
3524
|
+
*/
|
|
3525
|
+
gid: number
|
|
3526
|
+
}
|
|
3527
|
+
|
|
3528
|
+
/**
|
|
3529
|
+
* AIBar 显示模式枚举(0=不支持显示,1=底部拼接,2=悬浮)
|
|
3530
|
+
* @since HomeKit 3.15.0
|
|
3531
|
+
*/
|
|
3532
|
+
export enum ShouldShowAIBarDisplayMode {
|
|
3533
|
+
/**
|
|
3534
|
+
* 不支持显示
|
|
3535
|
+
* @since HomeKit 3.15.0
|
|
3536
|
+
*/
|
|
3537
|
+
None = 0,
|
|
3538
|
+
|
|
3539
|
+
/**
|
|
3540
|
+
* 以拼接在容器底部显示AIBar
|
|
3541
|
+
* @since HomeKit 3.15.0
|
|
3542
|
+
*/
|
|
3543
|
+
Bottom = 1,
|
|
3544
|
+
|
|
3545
|
+
/**
|
|
3546
|
+
* 以悬浮在容器上显示AIBar
|
|
3547
|
+
* @since HomeKit 3.15.0
|
|
3548
|
+
*/
|
|
3549
|
+
Float = 2,
|
|
3550
|
+
}
|
|
3551
|
+
|
|
3552
|
+
/**
|
|
3553
|
+
* AIBar 输入类型枚举
|
|
3554
|
+
* @since HomeKit 3.15.0
|
|
3555
|
+
*/
|
|
3556
|
+
export enum AIBarInputType {
|
|
3557
|
+
/**
|
|
3558
|
+
* 文本输入
|
|
3559
|
+
* @since HomeKit 3.15.0
|
|
3560
|
+
*/
|
|
3561
|
+
Text = "text",
|
|
3562
|
+
|
|
3563
|
+
/**
|
|
3564
|
+
* 语音输入
|
|
3565
|
+
* @since HomeKit 3.15.0
|
|
3566
|
+
*/
|
|
3567
|
+
Voice = "voice",
|
|
3568
|
+
}
|
|
3569
|
+
|
|
3570
|
+
/**
|
|
3571
|
+
* AIBar 主题模式
|
|
3572
|
+
* @since HomeKit 3.15.4
|
|
3573
|
+
*/
|
|
3574
|
+
export enum AIBarThemeMode {
|
|
3575
|
+
/**
|
|
3576
|
+
* 跟随系统
|
|
3577
|
+
* @since HomeKit 3.15.4
|
|
3578
|
+
*/
|
|
3579
|
+
FollowSystem = 0,
|
|
3580
|
+
|
|
3581
|
+
/**
|
|
3582
|
+
* 浅色
|
|
3583
|
+
* @since HomeKit 3.15.4
|
|
3584
|
+
*/
|
|
3585
|
+
Light = 1,
|
|
3586
|
+
|
|
3587
|
+
/**
|
|
3588
|
+
* 深色
|
|
3589
|
+
* @since HomeKit 3.15.4
|
|
3590
|
+
*/
|
|
3591
|
+
Dark = 2,
|
|
3592
|
+
}
|
|
3593
|
+
|
|
3594
|
+
/**
|
|
3595
|
+
* 家庭模式枚举
|
|
3596
|
+
* @since HomeKit 3.7.8
|
|
3597
|
+
*/
|
|
3598
|
+
export enum ThingSmartHomeMode {
|
|
3599
|
+
/**
|
|
3600
|
+
* Ordinary standard home
|
|
3601
|
+
* @since HomeKit 3.7.8
|
|
3602
|
+
*/
|
|
3603
|
+
Default = 0,
|
|
3604
|
+
|
|
3605
|
+
/**
|
|
3606
|
+
* Spatialized home
|
|
3607
|
+
* @since HomeKit 3.7.8
|
|
3608
|
+
*/
|
|
3609
|
+
Space = 1,
|
|
3610
|
+
|
|
3611
|
+
/**
|
|
3612
|
+
* Professional Lighting Space Home
|
|
3613
|
+
* @since HomeKit 3.7.8
|
|
3614
|
+
*/
|
|
3615
|
+
SMB = 2,
|
|
3616
|
+
}
|
|
3617
|
+
|
|
3618
|
+
/**
|
|
3619
|
+
* 家庭成员角色枚举
|
|
3620
|
+
* @since HomeKit 3.7.12
|
|
3621
|
+
*/
|
|
3622
|
+
export enum ThingSmartHomeRole {
|
|
3623
|
+
/**
|
|
3624
|
+
* custom member role
|
|
3625
|
+
* @since HomeKit 3.7.12
|
|
3626
|
+
*/
|
|
3627
|
+
custom = -1,
|
|
3628
|
+
|
|
3629
|
+
/**
|
|
3630
|
+
* common member role
|
|
3631
|
+
* @since HomeKit 3.7.12
|
|
3632
|
+
*/
|
|
3633
|
+
member = 0,
|
|
3634
|
+
|
|
3635
|
+
/**
|
|
3636
|
+
* administrator role
|
|
3637
|
+
* @since HomeKit 3.7.12
|
|
3638
|
+
*/
|
|
3639
|
+
admin = 1,
|
|
3640
|
+
|
|
3641
|
+
/**
|
|
3642
|
+
* family owner
|
|
3643
|
+
* @since HomeKit 3.7.12
|
|
3644
|
+
*/
|
|
3645
|
+
owner = 2,
|
|
3646
|
+
|
|
3647
|
+
/**
|
|
3648
|
+
* illegal role
|
|
3649
|
+
* @since HomeKit 3.7.12
|
|
3650
|
+
*/
|
|
3651
|
+
invalid = -999,
|
|
3652
|
+
}
|
|
3653
|
+
|
|
3654
|
+
/** @since HomeKit 3.11.0 */
|
|
3655
|
+
export enum DIYHomeCardType {
|
|
3656
|
+
/**
|
|
3657
|
+
* 天气
|
|
3658
|
+
* @since HomeKit 3.11.0
|
|
3659
|
+
*/
|
|
3660
|
+
Weather = 1,
|
|
3661
|
+
|
|
3662
|
+
/**
|
|
3663
|
+
* 设备列表
|
|
3664
|
+
* @since HomeKit 3.11.0
|
|
3665
|
+
*/
|
|
3666
|
+
DeviceList = 2,
|
|
3667
|
+
|
|
3668
|
+
/**
|
|
3669
|
+
* 房间列表
|
|
3670
|
+
* @since HomeKit 3.11.0
|
|
3671
|
+
*/
|
|
3672
|
+
RoomList = 3,
|
|
3673
|
+
|
|
3674
|
+
/**
|
|
3675
|
+
* 场景
|
|
3676
|
+
* @since HomeKit 3.11.0
|
|
3677
|
+
*/
|
|
3678
|
+
Scene = 4,
|
|
3679
|
+
|
|
3680
|
+
/**
|
|
3681
|
+
* 小程序
|
|
3682
|
+
* @since HomeKit 3.11.0
|
|
3683
|
+
*/
|
|
3684
|
+
MiniApp = 5,
|
|
3685
|
+
|
|
3686
|
+
/**
|
|
3687
|
+
* 房间
|
|
3688
|
+
* @since HomeKit 3.11.0
|
|
3689
|
+
*/
|
|
3690
|
+
Room = 6,
|
|
3691
|
+
|
|
3692
|
+
/**
|
|
3693
|
+
* 设备
|
|
3694
|
+
* @since HomeKit 3.11.0
|
|
3695
|
+
*/
|
|
3696
|
+
Device = 7,
|
|
3697
|
+
|
|
3698
|
+
/**
|
|
3699
|
+
* 群组
|
|
3700
|
+
* @since HomeKit 3.11.0
|
|
3701
|
+
*/
|
|
3702
|
+
Group = 8,
|
|
3703
|
+
|
|
3704
|
+
/**
|
|
3705
|
+
* 数据卡片
|
|
3706
|
+
* @since HomeKit 3.11.0
|
|
3707
|
+
*/
|
|
3708
|
+
Dashboard = 9,
|
|
3709
|
+
|
|
3710
|
+
/**
|
|
3711
|
+
* 设备分类
|
|
3712
|
+
* @since HomeKit 3.11.0
|
|
3713
|
+
*/
|
|
3714
|
+
DeviceCategory = 10,
|
|
3715
|
+
|
|
3716
|
+
/**
|
|
3717
|
+
* 照明子系统
|
|
3718
|
+
* @since HomeKit 3.11.0
|
|
3719
|
+
*/
|
|
3720
|
+
LightSubSystem = 11,
|
|
3721
|
+
|
|
3722
|
+
/**
|
|
3723
|
+
* 一键隐私
|
|
3724
|
+
* @since HomeKit 3.11.0
|
|
3725
|
+
*/
|
|
3726
|
+
PrivateMode = 12,
|
|
3727
|
+
|
|
3728
|
+
/**
|
|
3729
|
+
* 免打扰
|
|
3730
|
+
* @since HomeKit 3.11.0
|
|
3731
|
+
*/
|
|
3732
|
+
Disturb = 13,
|
|
3733
|
+
|
|
3734
|
+
/**
|
|
3735
|
+
* 耳机卡片
|
|
3736
|
+
* @since HomeKit 3.11.0
|
|
3737
|
+
*/
|
|
3738
|
+
EarPhone = 14,
|
|
3739
|
+
|
|
3740
|
+
/**
|
|
3741
|
+
* AI推荐
|
|
3742
|
+
* @since HomeKit 3.11.0
|
|
3743
|
+
*/
|
|
3744
|
+
AIRecom = 15,
|
|
3745
|
+
|
|
3746
|
+
/**
|
|
3747
|
+
* 场景的延时日程
|
|
3748
|
+
* @since HomeKit 3.11.0
|
|
3749
|
+
*/
|
|
3750
|
+
SceneSchedule = 16,
|
|
3751
|
+
|
|
3752
|
+
/**
|
|
3753
|
+
* 卡路里
|
|
3754
|
+
* @since HomeKit 3.11.0
|
|
3755
|
+
*/
|
|
3756
|
+
AICalories = 17,
|
|
3757
|
+
|
|
3758
|
+
/**
|
|
3759
|
+
* AI翻译
|
|
3760
|
+
* @since HomeKit 3.11.0
|
|
3761
|
+
*/
|
|
3762
|
+
AITranslate = 18,
|
|
3763
|
+
}
|
|
3764
|
+
|
|
3765
|
+
/** @since HomeKit 3.11.0 */
|
|
3766
|
+
export enum DIYHomeCardStyle {
|
|
3767
|
+
/**
|
|
3768
|
+
* 小卡片
|
|
3769
|
+
* @since HomeKit 3.11.0
|
|
3770
|
+
*/
|
|
3771
|
+
Small = 1,
|
|
3772
|
+
|
|
3773
|
+
/**
|
|
3774
|
+
* 中卡片
|
|
3775
|
+
* @since HomeKit 3.11.0
|
|
3776
|
+
*/
|
|
3777
|
+
Medium = 2,
|
|
3778
|
+
|
|
3779
|
+
/**
|
|
3780
|
+
* 大卡片
|
|
3781
|
+
* @since HomeKit 3.11.0
|
|
3782
|
+
*/
|
|
3783
|
+
Large = 3,
|
|
3784
|
+
|
|
3785
|
+
/**
|
|
3786
|
+
* 视频设备超大卡片
|
|
3787
|
+
* @since HomeKit 3.11.0
|
|
3788
|
+
*/
|
|
3789
|
+
IPC = 4,
|
|
3790
|
+
|
|
3791
|
+
/**
|
|
3792
|
+
* 空间(房间)卡片自适应大小
|
|
3793
|
+
* @since HomeKit 3.11.0
|
|
3794
|
+
*/
|
|
3795
|
+
SpacePanel = 5,
|
|
3796
|
+
|
|
3797
|
+
/**
|
|
3798
|
+
* AI玩偶中卡片
|
|
3799
|
+
* @since HomeKit 3.11.0
|
|
3800
|
+
*/
|
|
3801
|
+
AIToyMid = 6,
|
|
3802
|
+
|
|
3803
|
+
/**
|
|
3804
|
+
* AI玩偶大卡片
|
|
3805
|
+
* @since HomeKit 3.11.0
|
|
3806
|
+
*/
|
|
3807
|
+
AIToyBig = 7,
|
|
3808
|
+
|
|
3809
|
+
/**
|
|
3810
|
+
* 大卡片 自适应高度
|
|
3811
|
+
* @since HomeKit 3.11.0
|
|
3812
|
+
*/
|
|
3813
|
+
Fit = 8,
|
|
3814
|
+
}
|
|
3815
|
+
|
|
3816
|
+
/**
|
|
3817
|
+
* 设备类型枚举
|
|
3818
|
+
* @since HomeKit 3.16.0
|
|
3819
|
+
*/
|
|
3820
|
+
export enum ThingDeviceType {
|
|
3821
|
+
/**
|
|
3822
|
+
* 全部设备
|
|
3823
|
+
* @since HomeKit 3.16.0
|
|
3824
|
+
*/
|
|
3825
|
+
All = -1,
|
|
3826
|
+
|
|
3827
|
+
/**
|
|
3828
|
+
* wifi设备
|
|
3829
|
+
* @since HomeKit 3.16.0
|
|
3830
|
+
*/
|
|
3831
|
+
Wifi = 0,
|
|
3832
|
+
|
|
3833
|
+
/**
|
|
3834
|
+
* 蓝牙设备
|
|
3835
|
+
* @since HomeKit 3.16.0
|
|
3836
|
+
*/
|
|
3837
|
+
Ble = 1,
|
|
3838
|
+
|
|
3839
|
+
/**
|
|
3840
|
+
* GPRS设备
|
|
3841
|
+
* @since HomeKit 3.16.0
|
|
3842
|
+
*/
|
|
3843
|
+
Gprs = 2,
|
|
3844
|
+
|
|
3845
|
+
/**
|
|
3846
|
+
* NB-IoT设备
|
|
3847
|
+
* @since HomeKit 3.16.0
|
|
3848
|
+
*/
|
|
3849
|
+
NBIoT = 3,
|
|
3850
|
+
|
|
3851
|
+
/**
|
|
3852
|
+
* Zigbee网关设备
|
|
3853
|
+
* @since HomeKit 3.16.0
|
|
3854
|
+
*/
|
|
3855
|
+
ZigbeeGateway = 4,
|
|
3856
|
+
|
|
3857
|
+
/**
|
|
3858
|
+
* Zigbee子设备
|
|
3859
|
+
* @since HomeKit 3.16.0
|
|
3860
|
+
*/
|
|
3861
|
+
ZigbeeSubDev = 5,
|
|
3862
|
+
|
|
3863
|
+
/**
|
|
3864
|
+
* Mesh设备
|
|
3865
|
+
* @since HomeKit 3.16.0
|
|
3866
|
+
*/
|
|
3867
|
+
MeshBleSubDev = 6,
|
|
3868
|
+
|
|
3869
|
+
/**
|
|
3870
|
+
* 红外网关设备
|
|
3871
|
+
* @since HomeKit 3.16.0
|
|
3872
|
+
*/
|
|
3873
|
+
InfraredGateway = 7,
|
|
3874
|
+
|
|
3875
|
+
/**
|
|
3876
|
+
* 红外子设备
|
|
3877
|
+
* @since HomeKit 3.16.0
|
|
3878
|
+
*/
|
|
3879
|
+
InfraredSubDev = 8,
|
|
3880
|
+
|
|
3881
|
+
/**
|
|
3882
|
+
* Wi-Fi网关设备
|
|
3883
|
+
* @since HomeKit 3.16.0
|
|
3884
|
+
*/
|
|
3885
|
+
WifiGateway = 9,
|
|
3886
|
+
|
|
3887
|
+
/**
|
|
3888
|
+
* Wi-Fi子设备
|
|
3889
|
+
* @since HomeKit 3.16.0
|
|
3890
|
+
*/
|
|
3891
|
+
WifiSubDev = 10,
|
|
3892
|
+
|
|
3893
|
+
/**
|
|
3894
|
+
* SIG Mesh网关设备
|
|
3895
|
+
* @since HomeKit 3.16.0
|
|
3896
|
+
*/
|
|
3897
|
+
SIGMeshGateway = 11,
|
|
3898
|
+
|
|
3899
|
+
/**
|
|
3900
|
+
* SIG Mesh子设备
|
|
3901
|
+
* @since HomeKit 3.16.0
|
|
3902
|
+
*/
|
|
3903
|
+
SIGMeshSubDev = 12,
|
|
3904
|
+
|
|
3905
|
+
/**
|
|
3906
|
+
* 蓝牙Beacon设备
|
|
3907
|
+
* @since HomeKit 3.16.0
|
|
3908
|
+
*/
|
|
3909
|
+
Beacon = 13,
|
|
3910
|
+
|
|
3911
|
+
/**
|
|
3912
|
+
* Cat.1设备
|
|
3913
|
+
* @since HomeKit 3.16.0
|
|
3914
|
+
*/
|
|
3915
|
+
Cat1 = 14,
|
|
3916
|
+
|
|
3917
|
+
/**
|
|
3918
|
+
* Thread网关设备
|
|
3919
|
+
* @since HomeKit 3.16.0
|
|
3920
|
+
*/
|
|
3921
|
+
ThreadGateway = 15,
|
|
3922
|
+
|
|
3923
|
+
/**
|
|
3924
|
+
* Thread子设备
|
|
3925
|
+
* @since HomeKit 3.16.0
|
|
3926
|
+
*/
|
|
3927
|
+
ThreadSubDev = 16,
|
|
3928
|
+
|
|
3929
|
+
/**
|
|
3930
|
+
* Fitting设备
|
|
3931
|
+
* @since HomeKit 3.16.0
|
|
3932
|
+
*/
|
|
3933
|
+
Fitting = 17,
|
|
3934
|
+
}
|
|
3935
|
+
|
|
3936
|
+
/**
|
|
3937
|
+
* 维度查询参数,包含 ownerId、roomId、devId
|
|
3938
|
+
* @since HomeKit 3.1.0
|
|
3939
|
+
*/
|
|
3940
|
+
export interface OwnerId {
|
|
3941
|
+
/**
|
|
3942
|
+
* 维度id
|
|
3943
|
+
* @since HomeKit 3.1.0
|
|
3944
|
+
*/
|
|
3945
|
+
ownerId: number
|
|
3946
|
+
/**
|
|
3947
|
+
* 房间ID
|
|
3948
|
+
* @since HomeKit 3.7.10
|
|
3949
|
+
*/
|
|
3950
|
+
roomId: number
|
|
3951
|
+
/**
|
|
3952
|
+
* 设备id
|
|
3953
|
+
* @since HomeKit 3.8.0
|
|
3954
|
+
*/
|
|
3955
|
+
devId: string
|
|
3956
|
+
}
|
|
3957
|
+
|
|
3958
|
+
/**
|
|
3959
|
+
* 设备 ID 列表返回结果
|
|
3960
|
+
* @since HomeKit 3.1.0
|
|
3961
|
+
*/
|
|
3962
|
+
export interface DeviceIdList {
|
|
3963
|
+
/**
|
|
3964
|
+
* 设备id列表
|
|
3965
|
+
* @since HomeKit 3.1.0
|
|
3966
|
+
*/
|
|
3967
|
+
devIds: string[]
|
|
3968
|
+
}
|
|
3969
|
+
|
|
3970
|
+
/**
|
|
3971
|
+
* 房间数据,包含房间 ID、名称及房间内设备 ID 列表
|
|
3972
|
+
* @since HomeKit 3.1.0
|
|
3973
|
+
*/
|
|
3974
|
+
export interface RoomData {
|
|
3975
|
+
/**
|
|
3976
|
+
* 房间id
|
|
3977
|
+
* @since HomeKit 3.1.0
|
|
3978
|
+
*/
|
|
3979
|
+
roomId: number
|
|
3980
|
+
/**
|
|
3981
|
+
* 房间名称
|
|
3982
|
+
* @since HomeKit 3.1.0
|
|
3983
|
+
*/
|
|
3984
|
+
name: string
|
|
3985
|
+
/**
|
|
3986
|
+
* 房间下的设备id
|
|
3987
|
+
* @since HomeKit 3.1.0
|
|
3988
|
+
*/
|
|
3989
|
+
deviceIds: string[]
|
|
3990
|
+
}
|
|
3991
|
+
|
|
3992
|
+
/**
|
|
3993
|
+
* 房间列表返回结果
|
|
3994
|
+
* @since HomeKit 3.1.0
|
|
3995
|
+
*/
|
|
3996
|
+
export interface RoomList {
|
|
3997
|
+
/**
|
|
3998
|
+
* 房间列表
|
|
3999
|
+
* @since HomeKit 3.1.0
|
|
4000
|
+
*/
|
|
4001
|
+
roomDatas: RoomData[]
|
|
4002
|
+
}
|
|
4003
|
+
|
|
4004
|
+
/**
|
|
4005
|
+
* 群组 ID 列表返回结果
|
|
4006
|
+
* @since HomeKit 3.5.3
|
|
4007
|
+
*/
|
|
4008
|
+
export interface GroupIdList {
|
|
4009
|
+
/**
|
|
4010
|
+
* 群组id列表
|
|
4011
|
+
* @since HomeKit 3.5.3
|
|
4012
|
+
*/
|
|
4013
|
+
groupIds: string[]
|
|
4014
|
+
}
|
|
4015
|
+
|
|
4016
|
+
/**
|
|
4017
|
+
* 设备移除事件体
|
|
4018
|
+
* @since HomeKit 3.5.3
|
|
4019
|
+
*/
|
|
4020
|
+
export interface OnDeviceRemovedBody {
|
|
4021
|
+
/**
|
|
4022
|
+
* 设备id
|
|
4023
|
+
* @since HomeKit 3.5.3
|
|
4024
|
+
*/
|
|
4025
|
+
deviceId: string
|
|
4026
|
+
}
|
|
4027
|
+
|
|
4028
|
+
/**
|
|
4029
|
+
* 设备添加事件体
|
|
4030
|
+
* @since HomeKit 3.5.3
|
|
4031
|
+
*/
|
|
4032
|
+
export interface OnDeviceAddBody {
|
|
4033
|
+
/**
|
|
4034
|
+
* 设备id
|
|
4035
|
+
* @since HomeKit 3.5.3
|
|
4036
|
+
*/
|
|
4037
|
+
deviceId: string
|
|
4038
|
+
}
|
|
4039
|
+
|
|
4040
|
+
/**
|
|
4041
|
+
* 群组移除事件体
|
|
4042
|
+
* @since HomeKit 3.5.3
|
|
4043
|
+
*/
|
|
4044
|
+
export interface OnGroupRemovedBody {
|
|
4045
|
+
/**
|
|
4046
|
+
* 群组 id
|
|
4047
|
+
* @since HomeKit 3.5.3
|
|
4048
|
+
*/
|
|
4049
|
+
groupId: string
|
|
4050
|
+
}
|
|
4051
|
+
|
|
4052
|
+
/**
|
|
4053
|
+
* 群组添加事件体
|
|
4054
|
+
* @since HomeKit 3.5.3
|
|
4055
|
+
*/
|
|
4056
|
+
export interface OnGroupAddBody {
|
|
4057
|
+
/**
|
|
4058
|
+
* 群组 id
|
|
4059
|
+
* @since HomeKit 3.5.3
|
|
4060
|
+
*/
|
|
4061
|
+
groupId: string
|
|
4062
|
+
}
|
|
4063
|
+
|
|
4064
|
+
/**
|
|
4065
|
+
* 分享列表变化事件体
|
|
4066
|
+
* @since HomeKit 3.5.3
|
|
4067
|
+
*/
|
|
4068
|
+
export interface OnShareListChangeBody {
|
|
4069
|
+
/**
|
|
4070
|
+
* 是否发生变化
|
|
4071
|
+
* @since HomeKit 3.5.3
|
|
4072
|
+
*/
|
|
4073
|
+
change: boolean
|
|
4074
|
+
}
|
|
4075
|
+
|
|
4076
|
+
/**
|
|
4077
|
+
* switchDeviceRoom 的请求参数,包含设备 ID 和目标房间 ID
|
|
4078
|
+
* @since HomeKit 3.10.0
|
|
4079
|
+
*/
|
|
4080
|
+
export interface SwitchDeviceBean {
|
|
4081
|
+
/**
|
|
4082
|
+
* 设备id
|
|
4083
|
+
* @since HomeKit 3.10.0
|
|
4084
|
+
*/
|
|
4085
|
+
deviceId: string
|
|
4086
|
+
/**
|
|
4087
|
+
* 房间id
|
|
4088
|
+
* @since HomeKit 3.10.0
|
|
4089
|
+
*/
|
|
4090
|
+
roomId: number
|
|
4091
|
+
}
|
|
4092
|
+
|
|
4093
|
+
/**
|
|
4094
|
+
* 图形验证码凭证模型,作为 `onTicketSuccess` 方法的入参与回调返回值
|
|
4095
|
+
* @since HomeKit 3.1.3
|
|
4096
|
+
*/
|
|
4097
|
+
export interface TicketModel {
|
|
4098
|
+
/**
|
|
4099
|
+
* 验证码凭证键值对,key 为参数名,value 为对应值
|
|
4100
|
+
* @since HomeKit 3.1.3
|
|
4101
|
+
*/
|
|
4102
|
+
map?: Record<string, string>
|
|
4103
|
+
}
|
|
4104
|
+
|
|
4105
|
+
/** @since HomeKit 3.14.0 */
|
|
4106
|
+
export interface CanShowMobileBindViewResult {
|
|
4107
|
+
/**
|
|
4108
|
+
* 是否展示手机号绑定弹窗
|
|
4109
|
+
* @since HomeKit 3.14.0
|
|
4110
|
+
*/
|
|
4111
|
+
show: boolean
|
|
4112
|
+
}
|
|
4113
|
+
|
|
4114
|
+
/**
|
|
4115
|
+
* 打开推荐场景详情的请求参数
|
|
4116
|
+
* @since HomeKit 1.0.4
|
|
4117
|
+
*/
|
|
4118
|
+
export interface RecommendSceneParams {
|
|
4119
|
+
/**
|
|
4120
|
+
* 来源
|
|
4121
|
+
* @since HomeKit 1.0.4
|
|
4122
|
+
*/
|
|
4123
|
+
source: string
|
|
4124
|
+
/**
|
|
4125
|
+
* 场景模型
|
|
4126
|
+
* @since HomeKit 1.0.4
|
|
4127
|
+
*/
|
|
4128
|
+
sceneModel: Record<string, any>
|
|
4129
|
+
}
|
|
4130
|
+
|
|
4131
|
+
/**
|
|
4132
|
+
* openRecommendSceneDetail 的回调返回数据
|
|
4133
|
+
* @since HomeKit 1.0.4
|
|
4134
|
+
*/
|
|
4135
|
+
export interface RecommendSceneCallBack {
|
|
4136
|
+
/**
|
|
4137
|
+
* 返回状态,默认返回 true
|
|
4138
|
+
* @since HomeKit 1.0.4
|
|
4139
|
+
* @defaultValue true
|
|
4140
|
+
*/
|
|
4141
|
+
status?: boolean
|
|
4142
|
+
/**
|
|
4143
|
+
* 成功返回的类型。0-未操作,1-保存成功,2-点击不感兴趣
|
|
4144
|
+
* @since HomeKit 1.0.4
|
|
4145
|
+
*/
|
|
4146
|
+
type: number
|
|
4147
|
+
/**
|
|
4148
|
+
* 返回的场景数据,可能为空
|
|
4149
|
+
* @since HomeKit 1.0.4
|
|
4150
|
+
*/
|
|
4151
|
+
data?: Record<string, any>
|
|
4152
|
+
}
|
|
4153
|
+
|
|
4154
|
+
/**
|
|
4155
|
+
* openDeviceExecutionAndAnutomation 的请求参数
|
|
4156
|
+
* @since HomeKit 2.1.0
|
|
4157
|
+
*/
|
|
4158
|
+
export interface OpenDeviceExecutionAndAnutomationParams {
|
|
4159
|
+
/**
|
|
4160
|
+
* 设备 ID
|
|
4161
|
+
* @since HomeKit 2.1.0
|
|
4162
|
+
*/
|
|
4163
|
+
deviceId: string
|
|
4164
|
+
/**
|
|
4165
|
+
* 页面标题,Android 需要
|
|
4166
|
+
* @since HomeKit 2.1.0
|
|
279
4167
|
*/
|
|
280
|
-
deviceId: string
|
|
281
|
-
/** 页面标题,Android 需要 */
|
|
282
4168
|
title?: string
|
|
283
4169
|
}
|
|
284
4170
|
}
|