const { apiError, apiSuccess, requestAssist } = require('./requestAssist.js')

async function getAccountSummary({ domain = 'overview', message = '' } = {}) {
  try {
    const result = await requestAssist({
      intent: 'getAccountSummary',
      domain,
      message,
    })
    return apiSuccess(result, result.reply || '已读取你的账户摘要。')
  } catch (error) {
    return apiError(error, '账户摘要读取失败')
  }
}

module.exports = getAccountSummary
