getPresetEvent(params: GetAiVisualPresetEventParams)

版本要求:
@tuya-miniapp/cloud-api≥1.0.5

描述

查询智能视觉魔方列表预置事件

参数

参数类型必填说明
是请求体

返回值

类型:Promise<PresetEvent[]>
预置事件配置列表(见 PresetEvent)

引用对象

interfacePresetEvent预制检测事件
属性类型描述
configCodestring配置编码
configCodeIconstring配置图标
configCodeDescstring配置描述
enumBusinessType
枚举值实际值描述
BusinessType.aigcProtectaigcProtect智能魔方保护
BusinessType.aiTimePhotoAlbumDetectaiTimePhotoAlbumDetect时光相册检测
BusinessType.aiSmartFreeEventaiSmartFreeEvent智能免费事件

合法值

BusinessType
值说明最低版本
aigcProtect智能魔方保护-
aiTimePhotoAlbumDetect时光相册检测-
aiSmartFreeEvent智能免费事件-

示例代码

请求示例

import { getPresetEvent } from '@tuya-miniapp/cloud-api';

getPresetEvent({ gid: '194137', businessType: 'aiSmartFreeEvent' })
  .then((list) => console.log(list))
  .catch(console.error);

返回示例

[
  {
    "configCode": "person",
    "configCodeIcon": "https://images.example.com/icon.png",
    "configCodeDesc": "人形检测"
  }
]