getDeviceDetailsById(params: QueryGetDeviceDetailsById)
版本要求:
@tuya-miniapp/cloud-api≥1.0.5
描述
查看单个设备设备详情
参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| 是 | 请求体 |
返回值
类型:Promise<DeviceDetails>
设备详情(见 DeviceDetails)
引用对象
interface
DeviceDetails| 属性 | 类型 | 描述 |
|---|---|---|
haveAvailableService | 0 | 1 | 是否有可用服务(0 未开通、1 已开通) |
activeStockIdList | string[] | 激活生效的服务 stockId 列表 |
productId | string | 产品 id |
| 设备服务计划列表 | ||
isUseFreeService | 0 | 1 | 是否已购买订阅首期免费商品(0-未购买、1-已购买) |
isUseCommonUserTrail | 0 | 1 | 是否购买过普通试用-账号级别免费商品(0-未购买、1-已购买) |
isUseCommonDeviceTrail | 0 | 1 | 是否购买过普通试用-设备级别免费商品(0-未购买、1-已购买) |
isTried | 0 | 1 | 是否已试用商品(0-未试用、1-已试用) |
hasServiceOrder | boolean | 是否存在服务单 |
icon | string | 设备图标 |
name | string | 设备名称 |
ownerId | string | 所属家庭 ID |
uuid | string | 设备唯一 ID |
roomName | string | 房间名称 |
deviceId | string | 设备 deviceId |
isBind | DeviceBindStatus | 绑定状态(已绑定 / 不支持 / 未绑定) |
status | boolean | 设备状态 |
aiSmartFreeDev | boolean | 当前设备是否处于 aiSmart 能力白名单中 |
合法值
DeviceDetails.haveAvailableService
| 值 | 说明 | 最低版本 |
|---|---|---|
0 | - | - |
1 | - | - |
DeviceDetails.planList.isSubscribe
| 值 | 说明 | 最低版本 |
|---|---|---|
0 | - | - |
1 | - | - |
DeviceDetails.planList.isCanceled
| 值 | 说明 | 最低版本 |
|---|---|---|
0 | - | - |
1 | - | - |
DeviceDetails.planList.isAdditional
| 值 | 说明 | 最低版本 |
|---|---|---|
0 | - | - |
1 | - | - |
DeviceDetails.isUseFreeService
| 值 | 说明 | 最低版本 |
|---|---|---|
0 | - | - |
1 | - | - |
DeviceDetails.isUseCommonUserTrail
| 值 | 说明 | 最低版本 |
|---|---|---|
0 | - | - |
1 | - | - |
DeviceDetails.isUseCommonDeviceTrail
| 值 | 说明 | 最低版本 |
|---|---|---|
0 | - | - |
1 | - | - |
DeviceDetails.isTried
| 值 | 说明 | 最低版本 |
|---|---|---|
0 | - | - |
1 | - | - |