feat(v1.7): orderPRO -> shopPRO status push sync

Implement bidirectional status sync for shopPRO integrations.
When direction is set to orderpro_to_shoppro, cron pushes manual
status changes to shopPRO via PUT API with reverse status mapping.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-27 12:54:57 +01:00
parent 054816b0ba
commit 957fddaf84
13 changed files with 867 additions and 41 deletions

View File

@@ -154,13 +154,14 @@ Migracje z prefiksem `ensure_` to migracje kompensujące — zostały dodane
- historia zmian statusow utrzymywana w `order_status_history`.
### `integration_order_sync_state`
- Kursor synchronizacji importu zamowien dla integracji (uzywany przez cron auto-importu Allegro).
- Kursor synchronizacji importu zamowien dla integracji (uzywany przez cron auto-importu Allegro i push statusow shopPRO).
- Kolumny:
- `integration_id` (PK),
- `last_synced_order_updated_at` (datetime, nullable) lub historycznie `last_synced_external_updated_at`,
- `last_synced_source_order_id` (varchar, nullable) lub historycznie `last_synced_external_order_id`,
- `last_run_at` (datetime),
- `last_success_at` (datetime),
- `last_status_pushed_at` (datetime, nullable) — kursor synchronizacji push statusow orderPRO -> shopPRO,
- `last_error` (varchar 500),
- `created_at`, `updated_at`.