Terceros:
- ClientResponse: campo fournisseur añadido
- CreateClientDto: campo Role (client/supplier/both)
- ClientDto / ClientDetailDto: campo Role devuelto en respuesta
- ClientMapper: ResolveRole() calcula rol desde client+fournisseur de Dolibarr
- ClientService: CreateClientAsync mapea Role a client/fournisseur en Dolibarr
Webhook:
- WebhookSettings: persistencia en archivo data/webhook_url.txt (volumen Docker)
- WebhookNotificationService: fire-and-forget, Adaptive Card 1.2, timeout 8s
- SettingsController: usa UpdateUrl(), endpoint test añadido
- Program.cs: HttpClient Webhook con timeout de 8s
- InvoiceService: notificación también al registrar pago (AddInvoicePaymentAsync)
+ datepaye enviado como Unix timestamp (fix 400 de Dolibarr)
- SupplierInvoiceService: notificación webhook en cambios de estado,
pago vía payments endpoint con Unix timestamp
compose.yaml: volumen bff_data para persistir webhook_url.txt entre rebuilds
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 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
- Añadir autenticación estándar JWT Bearer con ASP.NET Core
- Crear DolibarrTokenCacheService para la lógica de caché de tokens
- Refactorizar DolibarrApiClient para usar TokenCacheService con SRP limpio
- Actualizar Program.cs con registros de servicios y comentarios apropiados
- Añadir AuthController para el endpoint de login
- Actualizar InvoiceService para usar DolibarrApiClient
- Cambiar InvoiceDto.Status de enum a string
- Eliminar InvoiceStatus enum y mapper
- Usar directamente los status de Dolibarr (draft, unpaid, paid, cancelled)