---
name: "getVisualBoxList"
mode: "kit"
versionRequirements:
  - { name: "@tuya-miniapp/cloud-api", version: "1.0.5" }
---

## getVisualBoxList

> [VERSION] @tuya-miniapp/cloud-api >= 1.0.5

### 描述

查询智能视觉魔方列表（关联服务）

### 参数

`Params`

| 参数 | 类型 | 必填 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| `params` | `QueryGetAiVisualList` | 是 | - | 请求体 |

### 引用对象

##### `type` QueryGetAiVisualList

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `gid` | `string` | 家庭 gid |

##### `enum` SceneType

| 枚举值 | 实际值 | 描述 |
| --- | --- | --- |
| `SceneType.security` | `0` | 安防场景 |
| `SceneType.album` | `1` | 相册场景 |


### 示例代码

#### 请求示例

```typescript
import { getVisualBoxList } from '@tuya-miniapp/cloud-api';

getVisualBoxList({ gid: '194137' })
  .then((list) => console.log(list))
  .catch(console.error);
```

#### 返回示例

```json
[
  {
    "visionBoxId": "vb-1",
    "visionBoxName": "客厅魔方",
    "gmtCreate": "2024-01-01 10:00:00",
    "serviceStockId": "stock-1",
    "serviceName": "智能视觉",
    "enableState": 1,
    "expiredTime": 1735660800000,
    "scenesType": 0
  }
]
```
