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

## visualBoxEventCheck

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

### Method signature

```typescript
visualBoxEventCheck(params: CustomVisionEventCheckParams)
```

### Description

VisionBox custom semantic validation

### Parameters

`Params`

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `params` | `CustomVisionEventCheckParams` | Yes | - | Request body |

### Return Value

Type: `Promise<CustomVisionEventCheckRet>`

available and optional recommend

### Referenced Types

##### `type` CustomVisionEventCheckParams

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `eventValue` | `string` | Yes | Event semantic value |
| `gid` | `string` | Yes | Home gid |
| `stockId` | `string` | Yes | Inventory ID |

##### `type` CustomVisionEventCheckRet

| Property | Type | Description |
| --- | --- | --- |
| `available` | `boolean` | Whether available |
| `recommend` | `string[]` | Recommended config list (optional) |


### Examples

#### Request example

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

visualBoxEventCheck({
  gid: '194137',
  stockId: 'stock-1',
  eventValue: 'black-and-white cat',
})
  .then((r) => console.log(r))
  .catch(console.error);
```

#### Response example

```json
{ "available": true, "recommend": ["person", "pet"] }
```
