262 lines
5.5 KiB
TypeScript
262 lines
5.5 KiB
TypeScript
export type SightingType = {
|
|
ref: number;
|
|
SaFID: string;
|
|
overviewUrl: string;
|
|
plateUrlInfrared: string;
|
|
plateUrlColour: string;
|
|
vrm: string;
|
|
vrmSecondary: string;
|
|
countryCode: string;
|
|
timeStamp: string;
|
|
detailsUrl: string;
|
|
overviewPlateRect: number[];
|
|
plateTrack: Array<number[]>;
|
|
make: string;
|
|
model: string;
|
|
color: string;
|
|
category: string;
|
|
charHeight: string;
|
|
seenCount: string;
|
|
timeStampMillis: number;
|
|
motion: string;
|
|
debug: string;
|
|
srcCam: number;
|
|
locationName: string;
|
|
laneID: string;
|
|
plateSize: string;
|
|
overviewSize: string;
|
|
radarSpeed: string;
|
|
trackSpeed: string;
|
|
metadata?: Metadata;
|
|
};
|
|
|
|
export type CameraSettingValues = {
|
|
friendlyName: string;
|
|
cameraAddress: string;
|
|
userName: string;
|
|
password: string;
|
|
id: number | string;
|
|
};
|
|
|
|
export type CameraSettingErrorValues = Partial<
|
|
Record<keyof CameraSettingValues, string>
|
|
>;
|
|
|
|
export type BearerTypeFieldType = {
|
|
format: string;
|
|
enabled: boolean;
|
|
verbose: boolean;
|
|
};
|
|
|
|
export type InitialValuesForm = {
|
|
format: string;
|
|
enabled: boolean;
|
|
verbose: boolean;
|
|
backOfficeURL: string;
|
|
username: string;
|
|
password: string;
|
|
connectTimeoutSeconds: number;
|
|
readTimeoutSeconds: number;
|
|
};
|
|
|
|
export type NPEDFieldType = {
|
|
frontId: string;
|
|
username: string;
|
|
password: string;
|
|
clientId: string;
|
|
rearId: string;
|
|
};
|
|
|
|
export type HotlistUploadType = {
|
|
file: string | null;
|
|
};
|
|
|
|
export type SightingWidgetType = {
|
|
debug: string;
|
|
SaFID: string;
|
|
ref: number; // unique, increasing
|
|
idx?: number; // client-side slot index
|
|
vrm: string;
|
|
vrmSecondary: string; // empty string means missing
|
|
countryCode: string;
|
|
timeStamp: string; // formatted string
|
|
timeStampMillis: number; // epoch millis
|
|
motion: string; // e.g., "AWAY" or "TOWARDS"
|
|
seenCount: string;
|
|
charHeight: string;
|
|
overviewUrl: string;
|
|
detailsUrl: string;
|
|
make: string;
|
|
model: string;
|
|
color: string;
|
|
category: string;
|
|
plateSize: string | number;
|
|
overviewSize: string | number;
|
|
locationName: string;
|
|
laneID: string | number;
|
|
radarSpeed: string | number;
|
|
trackSpeed: string | number;
|
|
srcCam: 0 | 1;
|
|
plateUrlInfrared: string;
|
|
plateUrlColour: string;
|
|
overviewPlateRect: [number, number, number, number]; // [x,y,w,h] normalized 0..1
|
|
plateTrack: [number, number, number, number][];
|
|
metadata: Metadata;
|
|
};
|
|
|
|
export type VersionFieldType = {
|
|
version: string;
|
|
revision: string;
|
|
buildtime: string;
|
|
MAC: string;
|
|
timeStamp: number;
|
|
UUID: string;
|
|
"Serial No.": string;
|
|
"Model No.": string;
|
|
};
|
|
|
|
export type Metadata = {
|
|
npedJSON: NpedJSON;
|
|
"hotlist-matches": HotlistMatches;
|
|
};
|
|
|
|
export type HotlistMatches = {
|
|
Hotlist0: boolean;
|
|
Hotlist1: boolean;
|
|
Hotlist2: boolean;
|
|
};
|
|
|
|
export type NpedJSON = {
|
|
status_code: number;
|
|
reason_phrase: string;
|
|
};
|
|
|
|
export type NPEDUser = {
|
|
username: string;
|
|
clientId: string;
|
|
password?: string;
|
|
};
|
|
|
|
export type NPEDErrorValues = {
|
|
username?: string | undefined;
|
|
password?: string | undefined;
|
|
clientId?: string | undefined;
|
|
};
|
|
|
|
export type NPEDCameraConfig = {
|
|
id: string;
|
|
configHash: string;
|
|
propEnabled: Prop;
|
|
propUsername: Prop;
|
|
propPassword: Prop;
|
|
propClientID: Prop;
|
|
propConnectTimeoutSeconds: Prop;
|
|
propReadTimeoutSeconds: Prop;
|
|
propNPEDAuthTokenURL: Prop;
|
|
propNPEDLookupURL: Prop;
|
|
propVerbose: Prop;
|
|
};
|
|
|
|
export interface Prop {
|
|
value: string;
|
|
datatype: string;
|
|
}
|
|
|
|
export type SystemValues = {
|
|
deviceName: string;
|
|
sntpServer: string;
|
|
sntpInterval: number;
|
|
timeZone: string;
|
|
softwareUpdate?: File | null;
|
|
};
|
|
|
|
export type SystemValuesErrors = {
|
|
deviceName?: string | undefined;
|
|
sntpServer?: string | undefined;
|
|
sntpInterval?: string | undefined;
|
|
timeZone?: string | undefined;
|
|
softwareUpdate?: File | null;
|
|
};
|
|
|
|
export type AlertState = {
|
|
alertList: SightingType[];
|
|
allAlerts: SightingType[];
|
|
};
|
|
|
|
export type AlertPayload = {
|
|
payload: SightingType | string;
|
|
type: string;
|
|
};
|
|
|
|
export type ActionType = {
|
|
payload: SightingType | string;
|
|
type: string;
|
|
};
|
|
|
|
export type CameraConfig = {
|
|
id: string;
|
|
configHash: string;
|
|
propURI: {
|
|
value: string;
|
|
datatype: "java.lang.String";
|
|
};
|
|
propMonochrome: {
|
|
value: string; // "true" or "false" as string
|
|
datatype: "boolean";
|
|
};
|
|
propControlProtocol: {
|
|
value: "NONE" | "VISCA_KTNC" | "VISCA_WONWOO" | "DUMMY";
|
|
datatype: "mav.cameracontrol.CameraController$CameraControlProtocol";
|
|
accepted: "[NONE, VISCA_KTNC, VISCA_WONWOO, DUMMY]";
|
|
};
|
|
propAllowControlProtocolInference: {
|
|
value: string;
|
|
datatype: "boolean";
|
|
};
|
|
propCameraControlDeviceURI: {
|
|
value: string;
|
|
datatype: "java.lang.String";
|
|
};
|
|
propCameraControllerBaudRate: {
|
|
value: string; // "115200" as string
|
|
datatype: "int";
|
|
};
|
|
propLEDControllerType: {
|
|
value: "None" | "Serial" | "I2C";
|
|
datatype: "mav.flexi.modules.originators.video.LEDController$InterfaceType";
|
|
accepted: "[None, Serial, I2C]";
|
|
};
|
|
propLEDDriverControlURI: {
|
|
value: string;
|
|
datatype: "java.lang.String";
|
|
};
|
|
propSourceIdentifier: {
|
|
value: string;
|
|
datatype: "java.lang.String";
|
|
};
|
|
propI2CLEDDriverSafeHex: {
|
|
value: string;
|
|
datatype: "java.lang.String";
|
|
};
|
|
propI2CLEDDriverLowHex: {
|
|
value: string;
|
|
datatype: "java.lang.String";
|
|
};
|
|
propI2CLEDDriverMidHex: {
|
|
value: string;
|
|
datatype: "java.lang.String";
|
|
};
|
|
propI2CLEDDriverHighHex: {
|
|
value: string;
|
|
datatype: "java.lang.String";
|
|
};
|
|
propRecordCameraControllerLogs: {
|
|
value: string;
|
|
datatype: "boolean";
|
|
};
|
|
propVideoFeedWatchdogEnabled: {
|
|
value: string;
|
|
datatype: "boolean";
|
|
};
|
|
};
|