summaryrefslogtreecommitdiff
path: root/backend/src/types/robot.ts
diff options
context:
space:
mode:
Diffstat (limited to 'backend/src/types/robot.ts')
-rw-r--r--backend/src/types/robot.ts30
1 files changed, 24 insertions, 6 deletions
diff --git a/backend/src/types/robot.ts b/backend/src/types/robot.ts
index 40ce282..fe20422 100644
--- a/backend/src/types/robot.ts
+++ b/backend/src/types/robot.ts
@@ -1,14 +1,16 @@
export type RobotPosition = {
- lat: number;
- lon: number;
+ lat: string;
+ lon: string;
};
+export type RobotStatus = "idle" | "moving";
+
export type Robot = {
id: number;
name: string;
- status: "idle" | "moving";
- lat: number;
- lon: number;
+ status: RobotStatus;
+ lat: string;
+ lon: string;
robot_positions: RobotPosition[];
created_at: string;
updated_at: string;
@@ -16,5 +18,21 @@ export type Robot = {
export type RobotsResponse = {
source: "cache" | "database";
- data: Robot[];
+ robots: Robot[];
+ simulationRunning: boolean;
+};
+
+export type CreateRobotResponse = {
+ message: string;
+ robot: Robot;
+};
+
+export type RobotsUpdateBroadcast = {
+ updatedRobots: Robot[];
+};
+
+export type SimulationResponse = {
+ message: string;
+ status?: RobotStatus;
};
+