getPanelAgentMemoryList(params: GetPanelAgentMemoryListParams)

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

描述

查询角色记忆列表。

参数

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

返回值

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

引用对象

typeGetPanelAgentMemoryListResult
PanelAgentMemoryGroup[]

合法值

GetPanelAgentMemoryListParams.bindRoleType
值说明最低版本
0--
1--
2--

示例代码

请求示例

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

const params = {
  devId: 'your_device_id',
  bindRoleType: 0,
  roleId: 'role_12345',
};

getPanelAgentMemoryList(params)
  .then(result => {
    console.log('记忆列表:', result);
  })
  .catch(error => {
    console.error('获取记忆列表失败:', error);
  });

返回示例

[
  {
    "effectiveScope": 1,
    "effectiveScopeName": "全局记忆",
    "memoryList": [
      {
        "memoryKey": "user_preference",
        "memoryValue": "喜欢蓝色",
        "memoryName": "用户偏好",
        "effectiveScope": 1,
        "effectiveScopeName": "全局记忆"
      }
    ]
  }
]