getPanelAgentSoulRecallListTaskStatus(params: GetPanelAgentSoulRecallListTaskStatusParams)

Requires:
@tuya-miniapp/cloud-api≥1.x.x

Description

Poll the task status for querying the migratable soul list.

Parameters

ParameterTypeRequiredDescription
YesRequest parameters

Return Value

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

Referenced Types

interfaceGetPanelAgentSoulRecallListTaskStatusResult
PropertyTypeDescription
taskIdstringTask ID
taskStatusnumber0: processing / 1: succeeded / 2: failed / 4: generating summaries
currentStepCodestringCurrent step code
Soul list grouped by device ID
Summary list (populated entry by entry as summary generation completes)

Examples

Request example

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

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

getPanelAgentSoulRecallListTaskStatus(params)
  .then(result => {
    console.log('Soul list query task status:', result);
  })
  .catch(error => {
    console.error('Failed to query soul list task status:', error);
  });

Response example

{
  "taskId": "your_task_id",
  "taskStatus": 1,
  "currentStepCode": "SUMMARY_DONE",
  "deviceSoulList": [
    {
      "deviceId": "old_device_id",
      "deviceName": "Old device",
      "soulList": [
        {
          "roleBindId": "role_bind_id",
          "roleId": "role_id",
          "roleName": "Xiao Nuan",
          "roleIcon": "https://example.com/icon.png",
          "lastChatTime": 1719900000000
        }
      ]
    }
  ],
  "summaryList": [
    {
      "roleBindId": "role_bind_id",
      "summary": "Recently, you talked about travel plans."
    }
  ]
}