getPanelAgentConfigRoleVariableList(params: GetPanelAgentConfigRoleVariableListParams)

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

描述

获取角色变量配置列表。

参数

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

返回值

类型:Promise<GetPanelAgentConfigRoleVariableListResult>
GetPanelAgentConfigRoleVariableListResult(字段含义见类型定义与 minituya 返回参数)

引用对象

typeGetPanelAgentConfigRoleVariableListResult
Array<{
  /** 变量键	 */
  variableKey: number;
  /** 变量描述		 */
  variableDesc: string;
}>

示例代码

请求示例

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

const params = {
  devId: 'your_device_id',
};

getPanelAgentConfigRoleVariableList(params)
  .then(result => {
    console.log('角色变量配置列表:', result);
  })
  .catch(error => {
    console.error('获取角色变量配置列表失败:', error);
  });

返回示例

[
  {
    "variableKey": 1001,
    "variableDesc": "设备名称"
  },
  {
    "variableKey": 1002,
    "variableDesc": "用户昵称"
  }
]