2025-12-17 14:19:23 +00:00
|
|
|
import type { CameraID } from "../app/config/cameraConfig";
|
|
|
|
|
|
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
|
|
|
|
2025-12-10 13:09:07 +00:00
|
|
|
export type CameraZoomData = {
|
|
|
|
|
magnificationLevel: 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;
|
|
|
|
|
};
|
|
|
|
|
|
2025-12-05 12:53:42 +00:00
|
|
|
export type CustomField = {
|
|
|
|
|
label: string;
|
|
|
|
|
value: string;
|
|
|
|
|
};
|
|
|
|
|
|
2025-12-03 19:51:02 +00:00
|
|
|
export type CustomFields = {
|
2025-12-05 12:53:42 +00:00
|
|
|
customFields?: CustomField[];
|
2025-12-03 19:51:02 +00:00
|
|
|
};
|
|
|
|
|
|
2025-11-25 10:07:35 +00:00
|
|
|
export type InitialValuesFormErrors = {
|
|
|
|
|
backOfficeURL?: string;
|
|
|
|
|
username?: string;
|
|
|
|
|
password?: string;
|
|
|
|
|
connectTimeoutSeconds?: string;
|
|
|
|
|
readTimeoutSeconds?: string;
|
|
|
|
|
};
|
|
|
|
|
|
2025-12-06 21:16:11 +00:00
|
|
|
export type OSDConfigFields = {
|
|
|
|
|
includeVRM: boolean;
|
|
|
|
|
includeMotion: boolean;
|
|
|
|
|
includeTimeStamp: boolean;
|
|
|
|
|
includeCameraName: boolean;
|
|
|
|
|
overlayPosition: "Top" | "Bottom" | "Left" | "Right";
|
|
|
|
|
OSDTimestampFormat: "UTC" | "LOCAL";
|
|
|
|
|
};
|
|
|
|
|
|
2025-12-18 13:38:27 +00:00
|
|
|
export type PayloadConfigFields = {
|
|
|
|
|
includeMac: boolean;
|
|
|
|
|
includeSaFID: boolean;
|
|
|
|
|
includeCameraName: boolean;
|
|
|
|
|
includeCharHeight: boolean;
|
|
|
|
|
includeConfidence: boolean;
|
|
|
|
|
includeCorrectSpacing: boolean;
|
|
|
|
|
includeDecodeID: boolean;
|
|
|
|
|
includeDirection: boolean;
|
|
|
|
|
includeFrameHeight: boolean;
|
|
|
|
|
includeFrameID: boolean;
|
|
|
|
|
includeFrameTimeRef: boolean;
|
|
|
|
|
includeFrameWidth: boolean;
|
|
|
|
|
includeHorizSlew: boolean;
|
|
|
|
|
includeMotion: boolean;
|
|
|
|
|
inclduePlate: boolean;
|
|
|
|
|
includeNightModeAction: boolean;
|
|
|
|
|
includeOverview: boolean;
|
|
|
|
|
includePlateSecondary: boolean;
|
|
|
|
|
includePlateTrack: boolean;
|
|
|
|
|
includePlateTrackSecondary: boolean;
|
|
|
|
|
includePreferredCountry: boolean;
|
|
|
|
|
includeRawReads: boolean;
|
|
|
|
|
includeRawREADSSecondary: boolean;
|
|
|
|
|
includeRef: boolean;
|
|
|
|
|
includeSeenCount: boolean;
|
|
|
|
|
includeRepeatedPlate: boolean;
|
|
|
|
|
includeSerialCount: boolean;
|
|
|
|
|
includeTimeStamp: boolean;
|
|
|
|
|
includeTraceCount: boolean;
|
|
|
|
|
includeTrack: boolean;
|
|
|
|
|
includeTrackSecondary: boolean;
|
|
|
|
|
includeVertSlew: boolean;
|
|
|
|
|
includeVRM: boolean;
|
|
|
|
|
includeVRMSecondary: boolean;
|
|
|
|
|
includeHotListMatches: boolean;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type FormTypes = BearerTypeFields &
|
|
|
|
|
OptionalConstants &
|
|
|
|
|
OptionalLaneIDs &
|
|
|
|
|
CustomFields &
|
|
|
|
|
OSDConfigFields &
|
|
|
|
|
PayloadConfigFields;
|
|
|
|
|
|
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-12-17 14:19:23 +00:00
|
|
|
cameraFeedID: CameraID;
|
|
|
|
|
paintedCells: Record<CameraID, Map<string, PaintedCell>>;
|
|
|
|
|
|
|
|
|
|
regionsByCamera: Record<CameraID, Region[]>;
|
2025-11-27 16:16:15 +00:00
|
|
|
selectedRegionIndex: number;
|
2025-12-17 14:19:23 +00:00
|
|
|
modeByCamera: Record<CameraID, string>;
|
2025-11-27 10:43:56 +00:00
|
|
|
|
2025-11-27 16:16:15 +00:00
|
|
|
tabIndex?: number;
|
2025-12-17 14:19:23 +00:00
|
|
|
zoomLevel: Record<CameraID, number>;
|
2025-11-27 10:43:56 +00:00
|
|
|
};
|
2025-11-27 16:16:15 +00:00
|
|
|
|
|
|
|
|
export type CameraFeedAction =
|
|
|
|
|
| {
|
|
|
|
|
type: "SET_CAMERA_FEED";
|
2025-12-17 14:19:23 +00:00
|
|
|
payload: CameraID;
|
2025-11-27 16:16:15 +00:00
|
|
|
}
|
|
|
|
|
| {
|
|
|
|
|
type: "CHANGE_MODE";
|
2025-12-17 14:19:23 +00:00
|
|
|
payload: { cameraFeedID: CameraID; mode: string };
|
2025-11-27 16:16:15 +00:00
|
|
|
}
|
|
|
|
|
| { type: "SET_SELECTED_REGION_INDEX"; payload: number }
|
|
|
|
|
| {
|
|
|
|
|
type: "SET_SELECTED_REGION_COLOUR";
|
2025-12-17 14:19:23 +00:00
|
|
|
payload: { cameraFeedID: CameraID; regionName: string; newColour: string };
|
2025-11-27 16:16:15 +00:00
|
|
|
}
|
|
|
|
|
| {
|
|
|
|
|
type: "ADD_NEW_REGION";
|
2025-12-17 14:19:23 +00:00
|
|
|
payload: { cameraFeedID: CameraID; regionName: string; brushColour: string };
|
2025-11-27 16:16:15 +00:00
|
|
|
}
|
|
|
|
|
| {
|
|
|
|
|
type: "REMOVE_REGION";
|
2025-12-17 14:19:23 +00:00
|
|
|
payload: { cameraFeedID: CameraID; regionName: string };
|
2025-11-27 16:16:15 +00:00
|
|
|
}
|
|
|
|
|
| {
|
|
|
|
|
type: "RESET_PAINTED_CELLS";
|
2025-12-17 14:19:23 +00:00
|
|
|
payload: { cameraFeedID: CameraID; paintedCells: Map<string, PaintedCell> };
|
2025-12-08 10:59:46 +00:00
|
|
|
}
|
|
|
|
|
| {
|
|
|
|
|
type: "SET_CAMERA_FEED_DATA";
|
|
|
|
|
cameraState: CameraFeedState;
|
|
|
|
|
}
|
|
|
|
|
| {
|
|
|
|
|
type: "RESET_CAMERA_FEED";
|
2025-12-09 08:47:21 +00:00
|
|
|
}
|
|
|
|
|
| {
|
|
|
|
|
type: "SET_ZOOM_LEVEL";
|
2025-12-17 14:19:23 +00:00
|
|
|
payload: { cameraFeedID: CameraID; zoomLevel: number };
|
2025-11-27 16:16:15 +00:00
|
|
|
};
|
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-10 22:32:30 +00:00
|
|
|
plate?: string;
|
2025-11-28 12:58:42 +00:00
|
|
|
};
|
2025-12-01 14:36:25 +00:00
|
|
|
|
|
|
|
|
export type ColourData = {
|
|
|
|
|
id: string | number;
|
|
|
|
|
cells: number[][];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type ColourDetectionPayload = {
|
2025-12-17 14:19:23 +00:00
|
|
|
cameraFeedID: CameraID;
|
2025-12-01 14:36:25 +00:00
|
|
|
regions: ColourData[];
|
|
|
|
|
};
|
2025-12-02 13:45:44 +00:00
|
|
|
|
|
|
|
|
export type SystemSettings = {
|
|
|
|
|
deviceName: string;
|
|
|
|
|
localTimeZone: string;
|
|
|
|
|
timeSource: string;
|
|
|
|
|
SNTPServer: string;
|
|
|
|
|
SNTPIntervalMinutes: number;
|
2025-12-04 19:14:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type NetworkConfig = {
|
|
|
|
|
ipAddress: string;
|
|
|
|
|
subnetMask: string;
|
|
|
|
|
gateway: string;
|
2025-12-02 13:45:44 +00:00
|
|
|
primaryServer?: string;
|
|
|
|
|
secondaryServer?: string;
|
|
|
|
|
};
|
2025-12-05 12:53:42 +00:00
|
|
|
|
|
|
|
|
export type CustomFieldConfig = {
|
|
|
|
|
label: string;
|
|
|
|
|
value: string;
|
|
|
|
|
};
|
2025-12-08 10:59:46 +00:00
|
|
|
|
|
|
|
|
export type BlackBoardOptions = {
|
|
|
|
|
operation?: string;
|
|
|
|
|
path?: string;
|
|
|
|
|
value?: object | string | number | (string | number)[] | null;
|
|
|
|
|
};
|
2025-12-09 08:47:21 +00:00
|
|
|
|
|
|
|
|
export type CameraZoomConfig = { cameraFeedID: string; zoomLevel: number };
|
2025-12-12 12:18:17 +00:00
|
|
|
|
|
|
|
|
export type versionInfo = {
|
|
|
|
|
version: string;
|
|
|
|
|
revision: string;
|
|
|
|
|
buildtime: string;
|
|
|
|
|
appname: string;
|
|
|
|
|
MAC: string;
|
|
|
|
|
timeStamp: number;
|
|
|
|
|
UUID: string;
|
|
|
|
|
proquint: string;
|
|
|
|
|
"Serial No.": string;
|
|
|
|
|
"Model No.": string;
|
|
|
|
|
};
|