33 lines
880 B
Markdown
33 lines
880 B
Markdown
# Contract: Import / Export Workflows
|
|
|
|
## Import Workflow
|
|
|
|
Recommended stages:
|
|
|
|
1. `Upload`
|
|
2. `Preview / Validate`
|
|
3. `Confirm`
|
|
4. `Execute`
|
|
5. `Result summary`
|
|
|
|
Rules:
|
|
|
|
- Validation preview must be human-readable (table/list), not raw JSON only.
|
|
- Warnings and errors should be shown per row and in aggregate summary.
|
|
- Confirm step should clearly communicate scope and side effects.
|
|
|
|
## Export Workflow
|
|
|
|
- User must explicitly choose export scope (`selected`, `filtered`, `all`) when ambiguity exists.
|
|
- Export format should be explicit (`csv`, `json`, etc.).
|
|
- Download response should set:
|
|
- `Content-Type`
|
|
- `Content-Disposition`
|
|
- If CSV targets spreadsheet users, document delimiter and BOM policy.
|
|
|
|
## Error Handling
|
|
|
|
- Import errors should map to clear user-facing messages.
|
|
- Export errors after streaming starts must degrade gracefully (human-readable fallback).
|
|
|