Commit Graph

4 Commits

Author SHA1 Message Date
MastersGame
1a04bafa0b feat(sync): synchronize customer orders from Hiboutik sales
For each customer sale not yet stored as completed, fetch the full sale
(GET /sales/:id) and upsert it as a STORE order keyed on hiboutikSaleId.
Lines are replaced on each upsert and linked to the matching product
version when it still exists. Quotations are skipped, orders are never
deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:48:54 +01:00
MastersGame
ad8e39f63c feat(sync): add company details to customer addresses
Addresses with a company are completed through
GET /customers_addresses/:id (tax number, company number, legal status),
which the customer payload does not embed. Addresses without company get
these fields set to null; a failed call keeps the stored values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:48:49 +01:00
MastersGame
9e6e5162ad feat(sync): synchronize customer addresses
Mirror the addresses embedded in GET /customer/🆔 per customer, delete
the ones missing from Hiboutik, then upsert each of them (failures logged
and skipped). CustomerAddress gains its own recipient (firstName,
lastName, company, phone) plus state and other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:37:00 +01:00
MastersGame
c5f65dcb62 feat(sync): synchronize Hiboutik data through POST /sync
POST /sync starts the full synchronization in the background (202, or 409 when one is already running). Entities are synced in dependency order: brands, categories, suppliers, products (with versions and stocks), customers. Each row is synced independently so that a failure is logged without stopping the rest. Replaces the default AppService.
2026-11-05 23:00:49 +01:00