summaryrefslogtreecommitdiff
path: root/backend/src/types/robot.ts
blob: fe2042265d8383711c0db68be55482d6d4b029ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
export type RobotPosition = {
    lat: string;
    lon: string;
};

export type RobotStatus = "idle" | "moving";

export type Robot = {
    id: number;
    name: string;
    status: RobotStatus;
    lat: string;
    lon: string;
    robot_positions: RobotPosition[];
    created_at: string;
    updated_at: string;
};

export type RobotsResponse = {
    source: "cache" | "database";
    robots: Robot[];
    simulationRunning: boolean;
};

export type CreateRobotResponse = {
    message: string;
    robot: Robot;
};

export type RobotsUpdateBroadcast = {
    updatedRobots: Robot[];
};

export type SimulationResponse = {
    message: string;
    status?: RobotStatus;
};