09c61ea9b4
support delete for client, document and folder * support delete for client, document and folder * remove batch cancel conflict not used Approved-by: Jacob Mathison
Document Batch Processing
This directory contains the service layer for managing document batch uploads.
Purpose
The batch service provides a business logic layer between the HTTP API handlers and the database repository for batch upload operations. It handles:
- Model Conversion: Translates between OpenAPI-generated types and internal database models
- Business Logic: Encapsulates batch-specific operations (CRUD, progress tracking)
- Data Validation: Manages UUID conversions, JSONB parsing, and nullable type handling
Architecture
HTTP Request → API Handler → Batch Service → Database Repository → PostgreSQL
The service is stateless and synchronous - it does not run background processes. Actual document processing happens through the existing Runner pipeline (storeEventRunner → docInitRunner → etc.).
Files
service.go- Main batch service implementation with CRUD operationsservice_test.go- Unit tests using testcontainers for database integration
Usage
The service is instantiated by API handlers in /api/queryAPI/documents.go to manage batch upload metadata, progress tracking, and status updates.