getLightLibrariesDataTypes(data: GetLightLibrariesDataTypesParams)

Requires:
@tuya-miniapp/cloud-api≥1.0.5Mini Program Base Library≥2.18.1

Description

Get the list of lighting library data types bound to a device or group. Use this list to categorize and display data.

Parameters

ParameterTypeRequiredDescription
YesRequest parameters: bizId (business ID), bizType (business type: 0 = device, 1 = group), libType (library type: SCENE_LIB = scene library, MUSIC_LIB = music library, SCENE_IMAGE_LIB = scene image library).

Return Value

Type: Promise<GetLightLibrariesDataTypesResult>
DataType[]: 0 All data types; 1 Basic data: data provided by Tuya and bound at the panel uiId level; 2 Advanced data: data maintained in the mini app backend.

Referenced Types

typeGetLightLibrariesDataTypesResult
LibDataType[]

Valid Values

GetLightLibrariesDataTypesParams.bizType
ValueDescriptionMini Program Base Library Since
0--
1--
GetLightLibrariesDataTypesParams.libType
ValueDescriptionMini Program Base Library Since
SCENE_LIB--
MUSIC_LIB--
SCENE_IMAGE_LIB--

Examples

Request example

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

getLightLibrariesDataTypes({
  bizId: 'vdevo167504******003',
  bizType: 0,
  libType: 'SCENE_LIB',
})
  .then((response) => {
    console.log(response);
  })
  .catch();

Response example

[1]