feat: implement correction and original send functionality for Nama provider
- Added new DTOs for correction requests and responses in `nama-provider.dto.ts`. - Updated `nama-provider.adapter.ts` to include `originalSend` and `correctionSend` methods. - Enhanced `nama-provider.util.ts` with mapping functions for correction requests. - Created operational guidelines for agents in `AGENT.md`. - Updated Prisma migrations to support new invoice types and relationships. - Introduced new service and DTO for creating sales invoices in `sale-invoice-create.service.ts` and `sale-invoice-create.dto.ts`. - Added utility for handling Prisma errors in `prisma-error.util.ts`.
This commit is contained in:
+48
-5
@@ -15,7 +15,6 @@ services:
|
||||
- "${DATABASE_PORT}:3306"
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
- ./prisma/migrations:/docker-entrypoint-initdb.d
|
||||
healthcheck:
|
||||
test: "mysqladmin ping -h 127.0.0.1 -u ${DATABASE_USER} -p'${DB_ROOT_PASSWORD}'"
|
||||
interval: 15s # Shortened interval, as MySQL is starting fast now
|
||||
@@ -68,10 +67,13 @@ services:
|
||||
OTP_STATIC_CODE: ${OTP_STATIC_CODE} # From .env
|
||||
ports:
|
||||
- "${PORT:-5002}:5002"
|
||||
volumes:
|
||||
- ./src:/app/src
|
||||
- /app/dist
|
||||
- /app/node_modules
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
cap_drop:
|
||||
- ALL
|
||||
networks:
|
||||
- psp_consumer_network
|
||||
# healthcheck:
|
||||
@@ -89,6 +91,47 @@ services:
|
||||
# retries: 3
|
||||
# start_period: 10s
|
||||
|
||||
seed:
|
||||
platform: ${DOCKER_PLATFORM:-linux/amd64}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
target: build
|
||||
args:
|
||||
NODE_ENV: ${NODE_ENV:-production}
|
||||
PORT: ${PORT}
|
||||
DATABASE_NAME: ${DATABASE_NAME}
|
||||
DATABASE_USER: ${DATABASE_USER}
|
||||
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
|
||||
DATABASE_PORT: ${DATABASE_PORT}
|
||||
DATABASE_HOST: ${DATABASE_HOST}
|
||||
DATABASE_URL: mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}
|
||||
SHADOW_DATABASE_URL: mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}_shadow
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN}
|
||||
OTP_STATIC_CODE: ${OTP_STATIC_CODE}
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
NODE_ENV: ${NODE_ENV:-production}
|
||||
PORT: ${PORT}
|
||||
DATABASE_NAME: ${DATABASE_NAME}
|
||||
DATABASE_USER: ${DATABASE_USER}
|
||||
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
|
||||
DATABASE_PORT: ${DATABASE_PORT}
|
||||
DATABASE_HOST: ${DATABASE_HOST}
|
||||
DATABASE_URL: mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}
|
||||
SHADOW_DATABASE_URL: mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}_shadow
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN}
|
||||
OTP_STATIC_CODE: ${OTP_STATIC_CODE}
|
||||
networks:
|
||||
- psp_consumer_network
|
||||
profiles:
|
||||
- tools
|
||||
command: ["pnpm", "seed:sku"]
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
driver: local
|
||||
|
||||
Reference in New Issue
Block a user