getPanelAgentMemoryList(params: GetPanelAgentMemoryListParams)

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

Description

Query the role memory list.

Parameters

ParameterTypeRequiredDescription
YesRequest body

Return Value

Type: Promise<GetPanelAgentMemoryListResult>
GetPanelAgentMemoryListResult (See type definitions and minituya return parameters for field meanings)

Referenced Types

typeGetPanelAgentMemoryListResult
PanelAgentMemoryGroup[]

Valid Values

GetPanelAgentMemoryListParams.bindRoleType
ValueDescriptionSince
0--
1--
2--

Examples

Request example

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

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

getPanelAgentMemoryList(params)
  .then(result => {
    console.log('Memory list:', result);
  })
  .catch(error => {
    console.error('Failed to get memory list:', error);
  });

Response example

[
  {
    "effectiveScope": 1,
    "effectiveScopeName": "Global memory",
    "memoryList": [
      {
        "memoryKey": "user_preference",
        "memoryValue": "Likes blue",
        "memoryName": "User preference",
        "effectiveScope": 1,
        "effectiveScopeName": "Global memory"
      }
    ]
  }
]