refactor(actions): adopt endpoint client in document service posts

This commit is contained in:
2026-03-25 06:48:54 +00:00
parent 17be69323e
commit 13dbb8b2d0
2 changed files with 41 additions and 11 deletions
+35
View File
@@ -1634,3 +1634,38 @@ Validation:
Follow-ups:
- Optional next bounded slice: migrate selected `requestJson`-eligible upload/generation helpers in `documentDirectService` (non-download paths) while preserving multipart/blob behavior.
---
### CL-045: TASK22260 next slice — document direct service requestJson adoption (uploads + PDF generation)
date: 2026-03-25
author: Cline
scope: `actions/services/documentDirectService.js`
type: change
rationale: Continue bounded client migration by moving config-based multipart/PDF POST helpers in document service to shared `requestJson` while preserving hashed URL generation and responseType behavior.
impact: Reduces repeated axios config execution boilerplate and aligns document POST helper internals with shared endpoint client conventions.
status: completed
Summary:
- Migrated selected config-based document helper flows from `axios(config)` + `res.data` to `requestJson(config)`:
- `uploadFiles`
- `uploadSingleFile`
- `uploadRepFiles`
- `generateRepPDF`
- `generateAppealPDF`
- Preserved behavior-critical aspects:
- hashed URL creation via `buildHashedQueryUrl(...)`
- multipart headers for upload flows
- conditional `responseType: "blob"` for download PDF option paths
- existing catch-path logging semantics
- Left delete/download/hash-sensitive GET helpers unchanged in this slice.
Validation:
- `npm run lint` -> warnings only (pre-existing `react-hooks/exhaustive-deps`; no new lint errors)
Follow-ups:
- Optional next bounded slice: evaluate remaining legacy direct `axios.get(...).then(res.data)` helpers in `documentDirectService` (`getAwaitingSubmissionFromBlob`, `getRepsFromBlob`, `getFilesFromBlob`) for safe migration while preserving signed hash path behavior.