thêm giao diện cảnh báo

This commit is contained in:
Tran Anh Tuan
2025-12-09 11:37:19 +07:00
parent 7c3497d159
commit df4318fed4
14 changed files with 2546 additions and 1205 deletions

View File

@@ -17,41 +17,6 @@ declare namespace Model {
fishing: boolean;
t: number;
}
interface Alarm {
name: string;
t: number; // timestamp (epoch seconds)
level: number;
id: string;
}
interface AlarmResponse {
alarms: Alarm[];
level: number;
}
interface ShipTrackPoint {
time: number;
lon: number;
lat: number;
s: number;
h: number;
}
interface EntityResponse {
id: string;
v: number;
vs: string;
t: number;
type: string;
}
interface TransformedEntity {
id: string;
value: number;
valueString: string;
time: number;
type: string;
}
// Banzones
// Banzone
interface Zone {
id?: string;
@@ -332,4 +297,43 @@ declare namespace Model {
owner_id?: string;
description?: string;
}
interface AlarmPayload {
offset: number;
limit: number;
order?: string;
dir?: "asc" | "desc";
name?: string;
level?: number;
confirmed?: boolean;
}
interface AlarmResponse {
total?: number;
limit?: number;
order?: string;
dir?: string;
alarms?: Alarm[];
}
interface Alarm {
name?: string;
time?: number;
level?: number;
id?: string;
confirmed?: boolean;
confirmed_email?: string;
confirmed_time?: number;
confirmed_desc?: string;
thing_id?: string;
thing_name?: string;
thing_type?: ThingType;
}
interface AlarmConfirmRequest {
id: string;
description?: string;
thing_id: string;
time: number;
}
}