feat(api): mobile API Milestone 3 — full PULL (delta, tombstones, templates)

ProjectApiController bundle now supports incremental sync:
- ?since=<ISO8601> returns only records changed after that time (phases, layers,
  features, inspections, issues, templates), each filtered by its own updated_at.
- 'deleted' tombstones (soft-deleted ids since 'since') for phases/layers/
  features/inspections/issues so the device can purge locally.
- Bundle now also includes inspections, issues and inspection templates
  (with version + content hash for incremental template download).
- New GET /api/v1/templates (accessible projects, ?since= delta).
Tests: 12 passing (added delta, tombstones, templates cases). Note: the 'since'
query param must be URL-encoded by clients (ISO8601 '+' offset).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-18 09:45:18 +02:00
parent 17a824f925
commit b5deb1c53a
3 changed files with 227 additions and 47 deletions
+1
View File
@@ -18,6 +18,7 @@ Route::prefix('v1')->group(function () {
// PULL
Route::get('projects', [ProjectApiController::class, 'index']);
Route::get('projects/{project}/bundle', [ProjectApiController::class, 'bundle']);
Route::get('templates', [ProjectApiController::class, 'templates']);
// PUSH
Route::post('sync', [SyncController::class, 'sync'])->middleware('throttle:60,1');