Commit Graph

3 Commits

Author SHA1 Message Date
JavMB fbbbce3574 feat: add Contacts & Setup controllers, extend Clients/Invoices/Document controllers
- ContactsController: full CRUD (list, get, get by email, create, update, delete)
- SetupController: dictionary endpoints (payment-types, countries, civilities,
  contact-types, payment-terms, company)
- ClientsController: added GET/{id}, POST, PUT/{id}, DELETE/{id}
- InvoicesController: added PUT/{id}/lines/{lineId}, GET /templates
- DocumentController: added GET /list and GET /download endpoints
- ClientService: added GetClientAsync, CreateClientAsync, UpdateClientAsync,
  DeleteClientAsync
- InvoiceService: added UpdateInvoiceLineAsync, GetInvoiceTemplatesAsync
- DocumentService: added GetDocumentsAsync, DownloadDocumentAsync (using
  new GetAsyncRaw on IDolibarrApiClient)
- ContactService: new service with CRUD operations
- SetupService: new service for Dolibarr dictionary data
- IDolibarrApiClient: added GetAsyncRaw method for raw string responses
- DolibarrApiClient: implemented GetAsyncRaw
- JwtTokenProvider: extended token expiry from 30 min to 8 hours
- AuthApplicationService: extended Dolibarr token cache from 30 min to 8 hours
2026-05-15 18:58:35 +02:00
javiermengual 45913112be feat: Añadido endpoints para Delete Invoice y sus Lines , tambien corregido orden de Dto de GetById 2026-02-05 14:33:03 +01:00
javiermengual f28461ae0c refactor: extraer interfaz IDolibarrApiClient para facilitar testing
- Crear IDolibarrApiClient con métodos de la API de Dolibarr
- Implementar interfaz en DolibarrApiClient
- Modificar InvoiceService para depender de IDolibarrApiClient en lugar de la clase concreta
- Actualizar Program.cs para registrar IDolibarrApiClient en el contenedor DI

Esto sigue el Principio de Inversión de Dependencias (DIP) de SOLID,
permitiendo mockear el cliente API en tests unitarios sin conectividad externa.
2026-01-03 14:57:23 +01:00