- Integrated Zod validation schemas across various API routes to ensure input integrity and improve error handling. - Updated `mapping-service`, `orchestrator`, `packet-service`, and `webhook-service` to utilize validation middleware for request parameters and bodies. - Improved error handling in webhook management, packet generation, and compliance routes to provide clearer feedback on request failures. - Added new validation schemas for various endpoints, enhancing overall API robustness and maintainability. - Updated dependencies in `package.json` to include the new validation library.
Packet Service
Packet generation and dispatch service for non-scheme integration.
Features
- PDF packet generation from triggers
- AS4 XML packet generation
- Email dispatch with attachments
- Portal dispatch
- Acknowledgement tracking
- Event publishing
Channels
PDF- PDF document generationAS4- AS4 XML message generationEMAIL- Email dispatch with attachmentsPORTAL- Portal notification
API Endpoints
POST /v1/packets- Generate packetGET /v1/packets/:packetId- Get packetGET /v1/packets- List packetsGET /v1/packets/:packetId/download- Download packet filePOST /v1/packets/:packetId/dispatch- Dispatch packetPOST /v1/packets/:packetId/ack- Record acknowledgement
Configuration
REST_API_URL- Main REST API URL (default:http://localhost:3000)SMTP_HOST- SMTP serverSMTP_PORT- SMTP portSMTP_USER- SMTP usernameSMTP_PASS- SMTP passwordAS4_ENDPOINT- AS4 gateway endpoint