Add bird_payload classes for payload abstraction and normalization across flash and voice call routes, integrate with request validators, and add unit tests.

This commit is contained in:
Jeppe Bundgaard
2026-03-26 15:56:49 +01:00
parent b7fa5540e5
commit 2ba9c30b85
6 changed files with 740 additions and 5 deletions
@@ -256,7 +256,7 @@ class selfserve_wash_flow implements selfserve_wash_flow_i
'description' => $row['description'] === null ? null : (string)$row['description'],
'services' => $this->normalizeJsonArray($row['services'] ?? null),
'buttons' => $this->normalizeJsonArray($row['buttons'] ?? null),
'dynamic_images_vehicle_type' => $row['dynamic_images_vehicle_type'] ? (int)$row['dynamic_images_vehicle_type'] : null,
'dynamic_images_vehicle_type' => $row['dynamic_images_vehicle_type'] === null ? null : (int)$row['dynamic_images_vehicle_type']
];
}, (new selfserve_wash_session_tasks_o())->listBySession($sessionId));
@@ -741,7 +741,7 @@ class selfserve_wash_flow implements selfserve_wash_flow_i
(string)$task['description'],
$task['services'],
$task['buttons'],
(int)($task['dynamic_images_vehicle_type'] ?? 0) ?: null
$task['dynamic_images_vehicle_type'] ?? null,
);
}
}