Commit Graph

4 Commits

Author SHA1 Message Date
Adrian Flores Cortes
85043cbaff [SYNC-ERP-CORE] feat: Propagate middlewares, logger, DTOs and Swagger from erp-core
- Add logger utility (winston-based)
- Add apiKeyAuth middleware for API key authentication
- Add fieldPermissions middleware for field-level access control
- Add Swagger/OpenAPI configuration and integration
- Refactor DTOs with Zod validation schemas:
  - feature-flag.dto.ts
  - terminal.dto.ts
  - transaction.dto.ts
  - ai.dto.ts
- Add error classes (AppError, UnauthorizedError, ForbiddenError, etc.)
- Add AuthenticatedRequest type for erp-core compatibility
- Add ESLint configuration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 19:39:23 -06:00
Adrian Flores Cortes
f9ec80b037 [SYNC] feat: Add audit, MFA, and feature flags modules
- Add audit module with controllers, DTOs, middleware and services
- Add MFA controller, routes and services
- Add feature flags module with controllers, DTOs and services
- Update audit entities with proper TypeORM decorators
- Update auth service and DTOs
- Update main.ts configuration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 08:02:07 -06:00
Adrian Flores Cortes
a0ca2bd77a fix: Resolve TypeScript build errors
- Replace class-validator with plain TypeScript interfaces in AI DTOs
- Fix AIModel field names (inputCostPer1k instead of inputCostPer1m)
- Fix AIUsageLog field mapping (promptTokens, completionTokens, cost)
- Add 'branches', 'financial', 'sales' to MCP ToolCategory
- Add branchId to McpContext interface
- Create stub entities for BranchPaymentTerminal and PaymentTransaction
- Create CircuitBreaker utility for payment transactions
- Create database config and error classes for base.service.ts
- Fix type assertions for fetch response.json() calls
- Align PaymentStatus and PaymentMethod types between entities and DTOs
- Add @types/pg dependency

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 07:54:42 -06:00
8ed7d24e96 Migración desde erp-mecanicas-diesel/backend - Estándar multi-repo v2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:11:24 -06:00