2025-11-20 19:09:43 +00:00
|
|
|
export type WebSocketContextValue = {
|
|
|
|
|
connected: boolean;
|
|
|
|
|
send?: (msg: unknown) => void;
|
|
|
|
|
latestStats: { activeUsers: number; alerts: number } | null;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type InfoBarData = {
|
|
|
|
|
"system-clock-utc": string;
|
|
|
|
|
"system-clock-local": string;
|
|
|
|
|
"memory-cpu-status": string;
|
|
|
|
|
"thread-count": string;
|
|
|
|
|
};
|
2025-11-21 08:55:23 +00:00
|
|
|
|
|
|
|
|
export type StatusIndicator = "neutral-quaternary" | "dark" | "info" | "success" | "warning" | "danger";
|
2025-11-21 16:01:34 +00:00
|
|
|
export type Region = {
|
|
|
|
|
name: string;
|
|
|
|
|
brushColour: string;
|
|
|
|
|
};
|
2025-11-24 16:17:27 +00:00
|
|
|
|
|
|
|
|
export type SystemHealthStatus = {
|
|
|
|
|
id: string;
|
|
|
|
|
tags: string[];
|
2025-11-28 15:06:03 +00:00
|
|
|
groupID: string;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type StatusGroups = {
|
|
|
|
|
channelA: SystemHealthStatus[];
|
|
|
|
|
channelB: SystemHealthStatus[];
|
|
|
|
|
channelC: SystemHealthStatus[];
|
|
|
|
|
default: SystemHealthStatus[];
|
2025-11-24 16:17:27 +00:00
|
|
|
};
|
2025-11-25 10:07:35 +00:00
|
|
|
|
|
|
|
|
export type BearerTypeFields = {
|
|
|
|
|
format: string;
|
|
|
|
|
enabled: boolean;
|
|
|
|
|
backOfficeURL: string;
|
|
|
|
|
username: string;
|
|
|
|
|
password: string;
|
|
|
|
|
connectTimeoutSeconds: number;
|
|
|
|
|
readTimeoutSeconds: number;
|
|
|
|
|
overviewQuality: string;
|
|
|
|
|
cropSizeFactor: string;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type OptionalConstants = {
|
|
|
|
|
FFID?: string;
|
|
|
|
|
SCID?: string;
|
|
|
|
|
timestampSource?: string;
|
|
|
|
|
GPSFormat?: string;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type OptionalLaneIDs = {
|
|
|
|
|
laneId?: string;
|
|
|
|
|
LID1?: string;
|
|
|
|
|
LID2?: string;
|
|
|
|
|
LID3?: string;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type InitialValuesFormErrors = {
|
|
|
|
|
backOfficeURL?: string;
|
|
|
|
|
username?: string;
|
|
|
|
|
password?: string;
|
|
|
|
|
connectTimeoutSeconds?: string;
|
|
|
|
|
readTimeoutSeconds?: string;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type FormTypes = BearerTypeFields & OptionalConstants & OptionalLaneIDs;
|
2025-11-26 13:00:41 +00:00
|
|
|
type FieldProperty = {
|
|
|
|
|
datatype: string;
|
|
|
|
|
value: string;
|
|
|
|
|
};
|
|
|
|
|
export type OutputDataResponse = {
|
|
|
|
|
id: string;
|
|
|
|
|
configHash: string;
|
|
|
|
|
} & Record<string, FieldProperty>;
|
2025-11-25 14:57:18 +00:00
|
|
|
|
|
|
|
|
export type PaintedCell = {
|
|
|
|
|
colour: string;
|
2025-12-01 14:36:25 +00:00
|
|
|
region: Region;
|
2025-11-25 14:57:18 +00:00
|
|
|
};
|
2025-11-26 13:00:41 +00:00
|
|
|
|
|
|
|
|
export type DispatcherConfig = {
|
|
|
|
|
format: string;
|
|
|
|
|
enabled: boolean;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type OptionalBOF2Constants = {
|
2025-11-26 15:31:19 +00:00
|
|
|
format?: string;
|
2025-11-26 13:00:41 +00:00
|
|
|
FFID?: string;
|
|
|
|
|
SCID?: string;
|
|
|
|
|
timestampSource?: string;
|
|
|
|
|
GPSFormat?: string;
|
|
|
|
|
};
|
2025-11-26 15:31:19 +00:00
|
|
|
|
|
|
|
|
export type OptionalUTMCConstants = {
|
|
|
|
|
format?: string;
|
|
|
|
|
SCID?: string;
|
|
|
|
|
timestampSource?: string;
|
|
|
|
|
GPSFormat?: string;
|
|
|
|
|
};
|
2025-11-26 13:00:41 +00:00
|
|
|
export type OptionalBOF2LaneIDs = {
|
|
|
|
|
laneId?: string;
|
|
|
|
|
LID1?: string;
|
|
|
|
|
LID2?: string;
|
|
|
|
|
LID3?: string;
|
|
|
|
|
};
|
2025-11-27 10:43:56 +00:00
|
|
|
|
|
|
|
|
export type CameraFeedState = {
|
2025-11-27 11:43:10 +00:00
|
|
|
cameraFeedID: "A" | "B" | "C";
|
|
|
|
|
paintedCells: {
|
|
|
|
|
A: Map<string, PaintedCell>;
|
|
|
|
|
B: Map<string, PaintedCell>;
|
|
|
|
|
C: Map<string, PaintedCell>;
|
|
|
|
|
};
|
2025-11-27 16:16:15 +00:00
|
|
|
regionsByCamera: {
|
|
|
|
|
A: Region[];
|
|
|
|
|
B: Region[];
|
|
|
|
|
C: Region[];
|
|
|
|
|
};
|
|
|
|
|
selectedRegionIndex: number;
|
|
|
|
|
modeByCamera: {
|
|
|
|
|
A: string;
|
|
|
|
|
B: string;
|
|
|
|
|
C: string;
|
|
|
|
|
};
|
2025-11-27 10:43:56 +00:00
|
|
|
|
2025-11-27 16:16:15 +00:00
|
|
|
tabIndex?: number;
|
2025-11-27 10:43:56 +00:00
|
|
|
};
|
2025-11-27 16:16:15 +00:00
|
|
|
|
|
|
|
|
export type CameraFeedAction =
|
|
|
|
|
| {
|
|
|
|
|
type: "SET_CAMERA_FEED";
|
|
|
|
|
payload: "A" | "B" | "C";
|
|
|
|
|
}
|
|
|
|
|
| {
|
|
|
|
|
type: "CHANGE_MODE";
|
|
|
|
|
payload: { cameraFeedID: "A" | "B" | "C"; mode: string };
|
|
|
|
|
}
|
|
|
|
|
| { type: "SET_SELECTED_REGION_INDEX"; payload: number }
|
|
|
|
|
| {
|
|
|
|
|
type: "SET_SELECTED_REGION_COLOUR";
|
|
|
|
|
payload: { cameraFeedID: "A" | "B" | "C"; regionName: string; newColour: string };
|
|
|
|
|
}
|
|
|
|
|
| {
|
|
|
|
|
type: "ADD_NEW_REGION";
|
|
|
|
|
payload: { cameraFeedID: "A" | "B" | "C"; regionName: string; brushColour: string };
|
|
|
|
|
}
|
|
|
|
|
| {
|
|
|
|
|
type: "REMOVE_REGION";
|
|
|
|
|
payload: { cameraFeedID: "A" | "B" | "C"; regionName: string };
|
|
|
|
|
}
|
|
|
|
|
| {
|
|
|
|
|
type: "RESET_PAINTED_CELLS";
|
|
|
|
|
payload: { cameraFeedID: "A" | "B" | "C"; paintedCells: Map<string, PaintedCell> };
|
|
|
|
|
};
|
2025-11-28 12:58:42 +00:00
|
|
|
|
|
|
|
|
export type DecodeReading = {
|
|
|
|
|
id: number;
|
|
|
|
|
vrm: string;
|
|
|
|
|
laneID: number;
|
|
|
|
|
seenCount: number;
|
|
|
|
|
firstSeenTime?: number;
|
|
|
|
|
lastSeenTime?: number;
|
|
|
|
|
duplicate?: true;
|
|
|
|
|
firstSeenTimeHumane: string;
|
|
|
|
|
lastSeenTimeHumane: string;
|
|
|
|
|
};
|
2025-12-01 14:36:25 +00:00
|
|
|
|
|
|
|
|
export type ColourData = {
|
|
|
|
|
id: string | number;
|
|
|
|
|
cells: number[][];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type ColourDetectionPayload = {
|
|
|
|
|
cameraFeedID: "A" | "B" | "C";
|
|
|
|
|
regions: ColourData[];
|
|
|
|
|
};
|
2025-12-02 13:45:44 +00:00
|
|
|
|
|
|
|
|
export type SystemSettings = {
|
|
|
|
|
deviceName: string;
|
|
|
|
|
localTimeZone: string;
|
|
|
|
|
timeSource: string;
|
|
|
|
|
SNTPServer: string;
|
|
|
|
|
SNTPIntervalMinutes: number;
|
|
|
|
|
primaryServer?: string;
|
|
|
|
|
secondaryServer?: string;
|
|
|
|
|
};
|