getPresetEvent(params: GetAiVisualPresetEventParams)

Requires:
@tuya-miniapp/cloud-api≥1.0.5

Description

Query preset events for the Smart Visual Cube list

Parameters

ParameterTypeRequiredDescription
YesRequest body

Return Value

Type: Promise<PresetEvent[]>
Preset event configuration list (see PresetEvent)

Referenced Types

interfacePresetEventPreset detection events
PropertyTypeDescription
configCodestringConfiguration code
configCodeIconstringConfiguration icon
configCodeDescstringConfiguration description
enumBusinessType
ValueActual ValueDescription
BusinessType.aigcProtectaigcProtectSmart Cube protection
BusinessType.aiTimePhotoAlbumDetectaiTimePhotoAlbumDetectTime Album detection
BusinessType.aiSmartFreeEventaiSmartFreeEventSmart free events

Valid Values

BusinessType
ValueDescriptionSince
aigcProtectSmart Cube protection-
aiTimePhotoAlbumDetectTime Album detection-
aiSmartFreeEventSmart free events-

Examples

Request example

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

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

Response example

[
  {
    "configCode": "person",
    "configCodeIcon": "https://images.example.com/icon.png",
    "configCodeDesc": "Human detection"
  }
]