1.6 KiB
1.6 KiB
MODIFIED Requirements
Requirement: Export Task API Integration
The admin frontend SHALL provide a typed API integration for unified export tasks using the existing REST contract and the following compatibility additions. Existing response fields MUST remain available and MUST NOT be renamed or removed.
Scenario: Query export tasks with unified fields
- GIVEN 用户打开任一导出任务页面
- WHEN 用户按页面固定场景、状态、分页或创建时间范围查询导出任务
- THEN 系统 MUST call
GET /api/admin/export-tasks - AND 每条任务 MUST support
task_id,total_count,success_count,failed_count,error_code,error_summary, andupdated_at - AND 原有任务字段 MUST remain parseable by the frontend
Scenario: Fetch export task detail with unified fields
- GIVEN 用户查看或恢复一个导出任务
- WHEN 系统按
task_id查询任务详情 - THEN 系统 MUST call
GET /api/admin/export-tasks/{id} - AND 详情 MUST support
task_id,total_count,success_count,failed_count,error_code,error_summary, andupdated_at - AND 详情 MUST continue to support existing download and timestamp fields when returned
Scenario: Preserve compatibility with missing optional additions
- GIVEN 后端暂未返回某个新增兼容字段
- WHEN 前端解析导出任务列表或详情
- THEN 系统 MUST keep the response usable with stable empty or zero placeholders
- AND 系统 MUST NOT fail solely because an optional unified field is absent