@evercam/api 1.0.0-bc158a880 → 1.0.0-bc621a120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/api/api/3dFirebaseApi.d.ts +197 -15
- package/dist/api/api/adminApi.d.ts +26 -15
- package/dist/api/api/aiApi.d.ts +126 -4
- package/dist/api/api/authzApi.d.ts +5 -3
- package/dist/api/api/evercamApi.d.ts +42 -14
- package/dist/api/api/evercamLabsApi.d.ts +5 -5
- package/dist/api/api/ingestApi.d.ts +63 -48
- package/dist/api/types/360.d.ts +167 -83
- package/dist/api/types/aiConfigs.d.ts +244 -0
- package/dist/api/types/analytics.d.ts +45 -23
- package/dist/api/types/anpr.d.ts +31 -2
- package/dist/api/types/auditLogs.d.ts +18 -0
- package/dist/api/types/authz.d.ts +72 -0
- package/dist/api/types/automation.d.ts +23 -4
- package/dist/api/types/axios.d.ts +11 -12
- package/dist/api/types/bim.d.ts +28 -5
- package/dist/api/types/camera.d.ts +16 -32
- package/dist/api/types/comments.d.ts +10 -7
- package/dist/api/types/connector.d.ts +2 -0
- package/dist/api/types/copilot.d.ts +0 -3
- package/dist/api/types/detections.d.ts +3 -10
- package/dist/api/types/drone.d.ts +95 -6
- package/dist/api/types/errors.d.ts +13 -1
- package/dist/api/types/gateReport.d.ts +7 -22
- package/dist/api/types/gateReportManagement.d.ts +170 -0
- package/dist/api/types/hammertech.d.ts +98 -0
- package/dist/api/types/index.d.ts +8 -1
- package/dist/api/types/ingest.d.ts +104 -4
- package/dist/api/types/kit.d.ts +41 -51
- package/dist/api/types/map.d.ts +12 -0
- package/dist/api/types/media.d.ts +8 -2
- package/dist/api/types/notification.d.ts +41 -2
- package/dist/api/types/observationEvents.d.ts +140 -0
- package/dist/api/types/observations.d.ts +84 -0
- package/dist/api/types/planner.d.ts +98 -8
- package/dist/api/types/posthog.d.ts +20 -0
- package/dist/api/types/project.d.ts +15 -3
- package/dist/api/types/recording.d.ts +8 -13
- package/dist/api/types/ring.d.ts +16 -16
- package/dist/api/types/roi.d.ts +3 -11
- package/dist/api/types/routeParams.d.ts +1 -0
- package/dist/api/types/shared.d.ts +18 -18
- package/dist/api/types/shares.d.ts +0 -13
- package/dist/api/types/siteAnalytics.d.ts +3 -5
- package/dist/api/types/siteAnalyticsManagement.d.ts +117 -0
- package/dist/api/types/siteView.d.ts +73 -0
- package/dist/api/types/snapshots.d.ts +48 -3
- package/dist/api/types/socket.d.ts +4 -0
- package/dist/api/types/storyblok.d.ts +0 -13
- package/dist/api/types/timelapse.d.ts +6 -9
- package/dist/api/types/user.d.ts +1 -5
- package/dist/api/utils.d.ts +0 -1
- package/dist/index.js +1962 -767
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/shared/types/components.d.ts +144 -38
- package/dist/shared/types/customDataTableFilters.d.ts +10 -0
- package/dist/shared/types/imagePlayer.d.ts +8 -1
- package/dist/shared/types/index.d.ts +3 -0
- package/dist/shared/types/observations.d.ts +25 -0
- package/dist/shared/types/rbac.d.ts +67 -0
- package/package.json +4 -2
- package/dist/api/types/vendorModel.d.ts +0 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PaginationParams, DateType, JsonValue } from "@evercam/api/types";
|
|
1
|
+
import { PaginationParams, DateType, JsonValue, TuplePoint2D } from "@evercam/api/types";
|
|
2
2
|
import type { _360FloorV2, _360WalkV2 } from "@evercam/api/types/360";
|
|
3
3
|
export declare enum IngestProcessingStatus {
|
|
4
4
|
Completed = "completed",
|
|
@@ -8,7 +8,8 @@ export declare enum IngestProcessingStatus {
|
|
|
8
8
|
Aborted = "aborted",
|
|
9
9
|
Paused = "paused",
|
|
10
10
|
InProgress = "inprogress",
|
|
11
|
-
Pending = "pending"
|
|
11
|
+
Pending = "pending",
|
|
12
|
+
Downloading = "downloading"
|
|
12
13
|
}
|
|
13
14
|
export declare enum MobileAssetsType {
|
|
14
15
|
Audio = "mobile_audios",
|
|
@@ -18,7 +19,12 @@ export declare enum IngestVersions {
|
|
|
18
19
|
V1 = "v1",
|
|
19
20
|
V2 = "v2",
|
|
20
21
|
V3 = "v3",
|
|
21
|
-
V4 = "v4"
|
|
22
|
+
V4 = "v4",
|
|
23
|
+
V5 = "v5"
|
|
24
|
+
}
|
|
25
|
+
export declare enum IngestTypes {
|
|
26
|
+
Drone = "drone",
|
|
27
|
+
ThreeSixty = "360"
|
|
22
28
|
}
|
|
23
29
|
export type DronesQueryParams = Omit<PaginationParams, "sort"> & {
|
|
24
30
|
projectId: string;
|
|
@@ -33,6 +39,80 @@ export type IngestPaginatedResponse<T> = {
|
|
|
33
39
|
total: number;
|
|
34
40
|
pageCount?: number;
|
|
35
41
|
};
|
|
42
|
+
export declare enum IngestProcessingStepStatus {
|
|
43
|
+
Running = "running",
|
|
44
|
+
Completed = "completed",
|
|
45
|
+
Failed = "failed",
|
|
46
|
+
Skipped = "skipped"
|
|
47
|
+
}
|
|
48
|
+
export declare enum IngestProcessingRunStatus {
|
|
49
|
+
Processing = "processing",
|
|
50
|
+
Completed = "completed",
|
|
51
|
+
Failed = "failed"
|
|
52
|
+
}
|
|
53
|
+
export type IngestProcessingMetricStat = {
|
|
54
|
+
avg?: number;
|
|
55
|
+
peak?: number;
|
|
56
|
+
};
|
|
57
|
+
export type IngestProcessingStepMetrics = {
|
|
58
|
+
cpu?: IngestProcessingMetricStat;
|
|
59
|
+
ram?: IngestProcessingMetricStat;
|
|
60
|
+
gpuUtil?: IngestProcessingMetricStat;
|
|
61
|
+
gpuMemDevice?: IngestProcessingMetricStat;
|
|
62
|
+
gpuMemStep?: IngestProcessingMetricStat;
|
|
63
|
+
ramTotalMb?: number;
|
|
64
|
+
diskTotalMb?: number;
|
|
65
|
+
};
|
|
66
|
+
export type IngestProcessingStepDetail = {
|
|
67
|
+
input?: Record<string, JsonValue>;
|
|
68
|
+
params?: Record<string, JsonValue>;
|
|
69
|
+
output?: Record<string, JsonValue>;
|
|
70
|
+
metrics?: IngestProcessingStepMetrics;
|
|
71
|
+
error?: string;
|
|
72
|
+
};
|
|
73
|
+
export type IngestProcessingStep = {
|
|
74
|
+
name: string;
|
|
75
|
+
tool?: string;
|
|
76
|
+
status: IngestProcessingStepStatus | string;
|
|
77
|
+
startedAt?: string;
|
|
78
|
+
endedAt?: string;
|
|
79
|
+
durationSec?: number;
|
|
80
|
+
durationPct?: number;
|
|
81
|
+
detail?: IngestProcessingStepDetail;
|
|
82
|
+
};
|
|
83
|
+
export type IngestProcessingDiskUsage = {
|
|
84
|
+
sourceMb?: number;
|
|
85
|
+
framesMb?: number;
|
|
86
|
+
resultMb?: number;
|
|
87
|
+
totalMb?: number;
|
|
88
|
+
};
|
|
89
|
+
export type IngestProcessingPeakUsage = {
|
|
90
|
+
cpu?: number;
|
|
91
|
+
ram?: number;
|
|
92
|
+
gpuUtil?: number;
|
|
93
|
+
gpuMemDevice?: number;
|
|
94
|
+
gpuMemStep?: number;
|
|
95
|
+
};
|
|
96
|
+
export type IngestProcessingFootprint = {
|
|
97
|
+
disk?: IngestProcessingDiskUsage;
|
|
98
|
+
peak?: IngestProcessingPeakUsage;
|
|
99
|
+
};
|
|
100
|
+
export type IngestProcessingProgress = {
|
|
101
|
+
available: boolean;
|
|
102
|
+
status?: IngestProcessingRunStatus | string;
|
|
103
|
+
processingStatus?: IngestProcessingStatus | string;
|
|
104
|
+
currentStep?: string | null;
|
|
105
|
+
error?: string | null;
|
|
106
|
+
startedAt?: string;
|
|
107
|
+
steps: IngestProcessingStep[];
|
|
108
|
+
footprint?: IngestProcessingFootprint;
|
|
109
|
+
};
|
|
110
|
+
export type IngestTrackedAsset = {
|
|
111
|
+
id: number;
|
|
112
|
+
projectId: string;
|
|
113
|
+
name?: string;
|
|
114
|
+
processingStatus?: IngestProcessingStatus | string;
|
|
115
|
+
};
|
|
36
116
|
export type DroneUploadItem = {
|
|
37
117
|
id: number;
|
|
38
118
|
projectId: string;
|
|
@@ -43,11 +123,14 @@ export type DroneUploadItem = {
|
|
|
43
123
|
modelZip: string;
|
|
44
124
|
orthomosaicZip: string;
|
|
45
125
|
reportPdf: string;
|
|
126
|
+
processingLog: string;
|
|
46
127
|
uploadedBy: string;
|
|
47
128
|
processingStatus: IngestProcessingStatus | string;
|
|
48
129
|
modelCesiumAssetId: string;
|
|
49
130
|
updatedAt: string;
|
|
50
131
|
hasTusLinks: boolean;
|
|
132
|
+
hasSteps: boolean;
|
|
133
|
+
aerialShots: AerialShotItem[];
|
|
51
134
|
};
|
|
52
135
|
export type DroneUploadsResponse = IngestPaginatedResponse<DroneUploadItem>;
|
|
53
136
|
export type DroneQueueResponse = {
|
|
@@ -65,16 +148,33 @@ export type DroneUploadUpdateRequestPayload = {
|
|
|
65
148
|
title: string;
|
|
66
149
|
fileExtension: string;
|
|
67
150
|
}[];
|
|
151
|
+
aerialShots: {
|
|
152
|
+
url: string;
|
|
153
|
+
title: string;
|
|
154
|
+
fileExtension: string;
|
|
155
|
+
gpsLatitude: string;
|
|
156
|
+
gpsLongitude: string;
|
|
157
|
+
gpsAltitude: string;
|
|
158
|
+
}[];
|
|
68
159
|
projectName: string;
|
|
69
160
|
};
|
|
70
161
|
export type CalculateMeasuringOperationRequestPayload = {
|
|
71
162
|
date: DateType;
|
|
72
|
-
points: [
|
|
163
|
+
points: TuplePoint2D[];
|
|
73
164
|
operation: string;
|
|
74
165
|
};
|
|
75
166
|
export type FlightImagesQueryParams = Partial<Omit<PaginationParams, "sort">> & {
|
|
76
167
|
date: DateType;
|
|
77
168
|
};
|
|
169
|
+
export type AerialShotItem = {
|
|
170
|
+
id: number;
|
|
171
|
+
droneUploadId: number;
|
|
172
|
+
fileLink: string;
|
|
173
|
+
thumbnailLink: string;
|
|
174
|
+
gpsLatitude: string;
|
|
175
|
+
gpsLongitude: string;
|
|
176
|
+
gpsAltitude: string;
|
|
177
|
+
};
|
|
78
178
|
export type InspectionToolRequestPayload = {
|
|
79
179
|
date: DateType;
|
|
80
180
|
gpsAltitude: string;
|
package/dist/api/types/kit.d.ts
CHANGED
|
@@ -22,6 +22,36 @@ export type Kit = {
|
|
|
22
22
|
storages: KitStorage[];
|
|
23
23
|
createdAt: string;
|
|
24
24
|
};
|
|
25
|
+
export declare enum KitSupportCheckId {
|
|
26
|
+
RouterSmsRoundTrip = "router_sms_round_trip",
|
|
27
|
+
NvrRecordingAllCameras = "nvr_recording_all_cameras",
|
|
28
|
+
NvrRecordingThirdStream = "nvr_recording_third_stream",
|
|
29
|
+
CamerasHaveDeviceId = "cameras_have_device_id",
|
|
30
|
+
CamerasRecording = "cameras_recording",
|
|
31
|
+
CamerasSdCardMounted = "cameras_sd_card_mounted",
|
|
32
|
+
BatteryReadings = "battery_readings"
|
|
33
|
+
}
|
|
34
|
+
export declare enum KitSupportCheckStatus {
|
|
35
|
+
Passed = "passed",
|
|
36
|
+
Failed = "failed",
|
|
37
|
+
Skipped = "skipped"
|
|
38
|
+
}
|
|
39
|
+
export type KitSupportCheck = {
|
|
40
|
+
id: KitSupportCheckId;
|
|
41
|
+
name: string;
|
|
42
|
+
status: KitSupportCheckStatus;
|
|
43
|
+
error: string | null;
|
|
44
|
+
};
|
|
45
|
+
export type KitSupportChecklist = {
|
|
46
|
+
checks: KitSupportCheck[];
|
|
47
|
+
};
|
|
48
|
+
export type KitDiagnosticRun = {
|
|
49
|
+
kitId: number;
|
|
50
|
+
kitSerial: string;
|
|
51
|
+
checks: KitSupportCheck[];
|
|
52
|
+
ranAt: string;
|
|
53
|
+
isSeen: boolean;
|
|
54
|
+
};
|
|
25
55
|
export declare enum KitStatus {
|
|
26
56
|
New = "new",
|
|
27
57
|
Active = "active",
|
|
@@ -45,11 +75,14 @@ export declare enum KitAlarm {
|
|
|
45
75
|
NoHdd = "no_hdd",
|
|
46
76
|
MissingRouterInfo = "missing_router_info",
|
|
47
77
|
AcFailure = "ac_failure",
|
|
48
|
-
LowBattery = "low_battery"
|
|
78
|
+
LowBattery = "low_battery",
|
|
79
|
+
GeneratorOff = "generator_off"
|
|
49
80
|
}
|
|
50
81
|
export declare enum KitMetricId {
|
|
51
82
|
SolarCharger = "solar_charger",
|
|
52
|
-
PanelPower = "panel_power"
|
|
83
|
+
PanelPower = "panel_power",
|
|
84
|
+
Fan = "fan",
|
|
85
|
+
FanTemperature = "fan_temperature"
|
|
53
86
|
}
|
|
54
87
|
export declare enum KitMetricPeriod {
|
|
55
88
|
Last15Minutes = "now-15m",
|
|
@@ -115,55 +148,6 @@ export declare enum KitChartType {
|
|
|
115
148
|
TimeSeries = "timeseries",
|
|
116
149
|
BarChart = "barchart"
|
|
117
150
|
}
|
|
118
|
-
export type GrafanaDataSource = {
|
|
119
|
-
type: string;
|
|
120
|
-
uid: string;
|
|
121
|
-
};
|
|
122
|
-
export type GrafanaTarget = {
|
|
123
|
-
expr: string;
|
|
124
|
-
refId: string;
|
|
125
|
-
datasourceId?: string;
|
|
126
|
-
intervalMs?: number;
|
|
127
|
-
maxDataPoints?: number;
|
|
128
|
-
};
|
|
129
|
-
export type GrafanaPanel = {
|
|
130
|
-
[key: string]: unknown;
|
|
131
|
-
id: GrafanaMetricId;
|
|
132
|
-
name: keyof GrafanaMetricId;
|
|
133
|
-
title: string;
|
|
134
|
-
description: string;
|
|
135
|
-
type: KitChartType;
|
|
136
|
-
datasource: GrafanaDataSource;
|
|
137
|
-
targets: GrafanaTarget[];
|
|
138
|
-
maxDataPoints?: number;
|
|
139
|
-
interval?: string;
|
|
140
|
-
timeFrom?: string;
|
|
141
|
-
timeShift?: string;
|
|
142
|
-
options?: {
|
|
143
|
-
maxDataPoints?: number;
|
|
144
|
-
interval?: string;
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
export type GrafanaDashboard = {
|
|
148
|
-
[key: string]: unknown;
|
|
149
|
-
panels: GrafanaPanel[];
|
|
150
|
-
time?: {
|
|
151
|
-
from: string;
|
|
152
|
-
to: string;
|
|
153
|
-
};
|
|
154
|
-
timepicker?: {
|
|
155
|
-
refresh_intervals: string[];
|
|
156
|
-
time_options: string[];
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
export type GrafanaQueryOptions = {
|
|
160
|
-
metricId: GrafanaMetricId;
|
|
161
|
-
host: string;
|
|
162
|
-
job?: string;
|
|
163
|
-
from?: string;
|
|
164
|
-
to?: string;
|
|
165
|
-
variables?: Record<string, string>;
|
|
166
|
-
};
|
|
167
151
|
export type GrafanaTimeSeriesValue = number | string | null;
|
|
168
152
|
export type GrafanaTimeSeriesValues = GrafanaTimeSeriesValue[][];
|
|
169
153
|
export type GrafanaFieldConfig = {
|
|
@@ -312,6 +296,12 @@ export type KitMetricStatsEntry = {
|
|
|
312
296
|
panelVoltage: number;
|
|
313
297
|
panelPower: number;
|
|
314
298
|
};
|
|
299
|
+
export type KitFanStatsEntry = {
|
|
300
|
+
timestamp: string;
|
|
301
|
+
speed: number;
|
|
302
|
+
internalTemperature: number;
|
|
303
|
+
externalTemperature: number | null;
|
|
304
|
+
};
|
|
315
305
|
export type KitUpdatePayload = {
|
|
316
306
|
countryId: number;
|
|
317
307
|
name: string;
|
package/dist/api/types/map.d.ts
CHANGED
|
@@ -2,3 +2,15 @@ export declare enum MapType {
|
|
|
2
2
|
Hybrid = "hybrid",
|
|
3
3
|
Terrain = "terrain"
|
|
4
4
|
}
|
|
5
|
+
export type MapView = {
|
|
6
|
+
east?: number;
|
|
7
|
+
floorID?: string;
|
|
8
|
+
image?: string;
|
|
9
|
+
mapStyle?: MapType;
|
|
10
|
+
name: string;
|
|
11
|
+
north?: number;
|
|
12
|
+
projectId: string;
|
|
13
|
+
projectName: string;
|
|
14
|
+
south?: number;
|
|
15
|
+
west?: number;
|
|
16
|
+
};
|
|
@@ -43,7 +43,8 @@ export declare enum MediaFileType {
|
|
|
43
43
|
Mp4 = "mp4",
|
|
44
44
|
Png = "png",
|
|
45
45
|
Pdf = "pdf",
|
|
46
|
-
Jpeg = "jpeg"
|
|
46
|
+
Jpeg = "jpeg",
|
|
47
|
+
Csv = "csv"
|
|
47
48
|
}
|
|
48
49
|
export declare enum MediaStatus {
|
|
49
50
|
Pending = "Pending",
|
|
@@ -93,7 +94,7 @@ export type MediaCreateRequestPayload = {
|
|
|
93
94
|
cameraExid?: string;
|
|
94
95
|
requestedBy?: string;
|
|
95
96
|
notes?: string;
|
|
96
|
-
category?: ClipsCategory;
|
|
97
|
+
category?: MediaCategory | ClipsCategory;
|
|
97
98
|
isUrgent?: boolean;
|
|
98
99
|
storeAsType?: MediaType;
|
|
99
100
|
};
|
|
@@ -108,6 +109,11 @@ export declare enum ClipsCategory {
|
|
|
108
109
|
Marketing = "marketing",
|
|
109
110
|
BestPracticies = "best_practices"
|
|
110
111
|
}
|
|
112
|
+
export declare enum MediaCategory {
|
|
113
|
+
Weather = "weather",
|
|
114
|
+
SmartSearch = "smart_search",
|
|
115
|
+
Copilot = "copilot"
|
|
116
|
+
}
|
|
111
117
|
export type MediaDeleteRequestPayload = {
|
|
112
118
|
timelapseIds: (string | number)[];
|
|
113
119
|
compareIds: (string | number)[];
|
|
@@ -5,7 +5,26 @@ export declare enum NotificationType {
|
|
|
5
5
|
TimelapseCreated = "timelapse_created",
|
|
6
6
|
TimelapseFailed = "timelapse_failed",
|
|
7
7
|
DroneProcessing = "drone_processing_done",
|
|
8
|
-
Processing360 = "three_sixty_done"
|
|
8
|
+
Processing360 = "three_sixty_done",
|
|
9
|
+
SmartSearchExportReady = "smart_search_export_ready",
|
|
10
|
+
SmartSearchExportFailed = "smart_search_export_failed",
|
|
11
|
+
GateReportExportReady = "gate_report_export_ready",
|
|
12
|
+
GateReportExportFailed = "gate_report_export_failed",
|
|
13
|
+
PpeExportReady = "ppe_export_ready",
|
|
14
|
+
PpeExportFailed = "ppe_export_failed",
|
|
15
|
+
WeatherExportReady = "weather_export_ready",
|
|
16
|
+
WeatherExportFailed = "weather_export_failed",
|
|
17
|
+
CompareReady = "compare_ready",
|
|
18
|
+
CompareFailed = "compare_failed",
|
|
19
|
+
ClipExportReady = "clip_export_ready",
|
|
20
|
+
ClipExportFailed = "clip_export_failed",
|
|
21
|
+
NvrClipReady = "nvr_clip_ready",
|
|
22
|
+
NvrClipFailed = "nvr_clip_failed",
|
|
23
|
+
UploadComplete = "upload_complete",
|
|
24
|
+
UploadFailed = "upload_failed",
|
|
25
|
+
RingCamerasImported = "ring_cameras_imported",
|
|
26
|
+
StorageWarning = "storage_warning",
|
|
27
|
+
Other = "other"
|
|
9
28
|
}
|
|
10
29
|
export interface NotificationContextBase {
|
|
11
30
|
cameraExid?: string;
|
|
@@ -41,7 +60,27 @@ export interface Processing360Context extends NotificationContextBase {
|
|
|
41
60
|
date: string;
|
|
42
61
|
floor: string;
|
|
43
62
|
}
|
|
44
|
-
export
|
|
63
|
+
export interface ExportNotificationContext extends NotificationContextBase {
|
|
64
|
+
projectExid: string;
|
|
65
|
+
archiveExid?: string;
|
|
66
|
+
compareExid?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface UploadNotificationContext extends NotificationContextBase {
|
|
69
|
+
projectExid: string;
|
|
70
|
+
}
|
|
71
|
+
export interface RingCamerasImportedContext extends NotificationContextBase {
|
|
72
|
+
projectExid: string;
|
|
73
|
+
projectName: string;
|
|
74
|
+
cameras: Array<{
|
|
75
|
+
exid: string;
|
|
76
|
+
name: string;
|
|
77
|
+
}>;
|
|
78
|
+
}
|
|
79
|
+
export interface StorageWarningContext extends NotificationContextBase {
|
|
80
|
+
projectExid: string;
|
|
81
|
+
cameraName: string;
|
|
82
|
+
}
|
|
83
|
+
export type NotificationContext = CameraShareContext | CameraStatusChangeContext | MentionContext | TimelapseCreatedContext | TimelapseFailedContext | DroneProcessingContext | Processing360Context | ExportNotificationContext | UploadNotificationContext | RingCamerasImportedContext | StorageWarningContext;
|
|
45
84
|
export type Notification = {
|
|
46
85
|
id: number;
|
|
47
86
|
type: NotificationType;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
export declare enum ObservationEventStatus {
|
|
2
|
+
Detected = "detected",
|
|
3
|
+
Approved = "approved",
|
|
4
|
+
Disapproved = "disapproved",
|
|
5
|
+
Unsure = "unsure"
|
|
6
|
+
}
|
|
7
|
+
export interface ObservationEventStatusConfig {
|
|
8
|
+
bg: string;
|
|
9
|
+
fg: string;
|
|
10
|
+
border: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const OBSERVATION_EVENT_STATUS_CONFIGS: Record<ObservationEventStatus, ObservationEventStatusConfig>;
|
|
14
|
+
export interface SiteAnalyticsObservationEvent {
|
|
15
|
+
id: number;
|
|
16
|
+
sourceType?: ObservationSourceType;
|
|
17
|
+
sessionId?: string | null;
|
|
18
|
+
markerId?: string | null;
|
|
19
|
+
drawingId?: string | null;
|
|
20
|
+
drawingName?: string | null;
|
|
21
|
+
walkName?: string | null;
|
|
22
|
+
sightings?: Array<Record<string, unknown>> | null;
|
|
23
|
+
observationTypeId: number;
|
|
24
|
+
observationName: string | null;
|
|
25
|
+
observationCode: string | null;
|
|
26
|
+
cameraExid: string;
|
|
27
|
+
projectExid: string | null;
|
|
28
|
+
startTime: string;
|
|
29
|
+
endTime: string | null;
|
|
30
|
+
confidence: number | null;
|
|
31
|
+
status: ObservationEventStatus;
|
|
32
|
+
aiEvidence: string | null;
|
|
33
|
+
bbox: number[] | null;
|
|
34
|
+
model: string | null;
|
|
35
|
+
promptId: number | null;
|
|
36
|
+
observationMetadata: Record<string, unknown> | null;
|
|
37
|
+
trigger: ObservationEventTrigger | string;
|
|
38
|
+
reviewedBy: string | null;
|
|
39
|
+
reviewedAt: string | null;
|
|
40
|
+
insertedAt: string;
|
|
41
|
+
}
|
|
42
|
+
export type ObservationEventQueryParams = {
|
|
43
|
+
cameraExid?: string;
|
|
44
|
+
projectExid?: string;
|
|
45
|
+
observationTypeIds?: string;
|
|
46
|
+
status?: ObservationEventStatus | string;
|
|
47
|
+
sourceType?: ObservationSourceType | string;
|
|
48
|
+
modelName?: string;
|
|
49
|
+
sortBy?: string;
|
|
50
|
+
sortDir?: "asc" | "desc";
|
|
51
|
+
page?: number;
|
|
52
|
+
limit?: number;
|
|
53
|
+
};
|
|
54
|
+
export interface ObservationModelOption {
|
|
55
|
+
modelName: string;
|
|
56
|
+
total: number;
|
|
57
|
+
}
|
|
58
|
+
export interface ObservationEventListResponse {
|
|
59
|
+
items: SiteAnalyticsObservationEvent[];
|
|
60
|
+
total: number;
|
|
61
|
+
page: number;
|
|
62
|
+
limit: number;
|
|
63
|
+
from: number;
|
|
64
|
+
to: number;
|
|
65
|
+
}
|
|
66
|
+
export type ObservationEventVerdict = ObservationEventStatus.Approved | ObservationEventStatus.Disapproved | ObservationEventStatus.Unsure;
|
|
67
|
+
export interface ObservationEventReviewPayload {
|
|
68
|
+
status: ObservationEventVerdict;
|
|
69
|
+
}
|
|
70
|
+
export interface ObservationEventReviewResponse {
|
|
71
|
+
updated: boolean;
|
|
72
|
+
id: number | string;
|
|
73
|
+
message: string;
|
|
74
|
+
}
|
|
75
|
+
export declare enum ObservationSourceType {
|
|
76
|
+
Camera = "camera",
|
|
77
|
+
Walk360 = "walk360",
|
|
78
|
+
Drone = "drone"
|
|
79
|
+
}
|
|
80
|
+
export declare enum ObservationEventTrigger {
|
|
81
|
+
CameraDetection = "camera_detection",
|
|
82
|
+
Walk = "walk"
|
|
83
|
+
}
|
|
84
|
+
export declare enum Walk360ProcessedSessionStatus {
|
|
85
|
+
Done = "done",
|
|
86
|
+
Processing = "processing",
|
|
87
|
+
Retryable = "retryable",
|
|
88
|
+
Error = "error"
|
|
89
|
+
}
|
|
90
|
+
export interface Walk360Activity {
|
|
91
|
+
observationTypeId: number;
|
|
92
|
+
}
|
|
93
|
+
export interface Walk360WorkerInfo {
|
|
94
|
+
coolifyAppId?: string | null;
|
|
95
|
+
workerStatus?: string | null;
|
|
96
|
+
workerIsRunning?: boolean;
|
|
97
|
+
appUrl?: string | null;
|
|
98
|
+
visionProvider?: string;
|
|
99
|
+
}
|
|
100
|
+
export interface Walk360Config extends Walk360WorkerInfo {
|
|
101
|
+
projectExid: string;
|
|
102
|
+
enabled: boolean;
|
|
103
|
+
startDate: string | null;
|
|
104
|
+
activities: Walk360Activity[];
|
|
105
|
+
configured: boolean;
|
|
106
|
+
maxParallelWalks?: number;
|
|
107
|
+
}
|
|
108
|
+
export interface Walk360ConfigSummary extends Walk360WorkerInfo {
|
|
109
|
+
projectExid: string;
|
|
110
|
+
projectName?: string | null;
|
|
111
|
+
enabled: boolean;
|
|
112
|
+
startDate: string | null;
|
|
113
|
+
activities: Walk360Activity[];
|
|
114
|
+
maxParallelWalks: number;
|
|
115
|
+
walksDone: number;
|
|
116
|
+
walksProcessing: number;
|
|
117
|
+
walksRetryable: number;
|
|
118
|
+
eventsCreated: number;
|
|
119
|
+
lastProcessedAt: string | null;
|
|
120
|
+
updatedAt: string | null;
|
|
121
|
+
}
|
|
122
|
+
export interface Walk360WorkerAction {
|
|
123
|
+
projectExid: string;
|
|
124
|
+
appUuid: string | null;
|
|
125
|
+
message: string;
|
|
126
|
+
state: string;
|
|
127
|
+
}
|
|
128
|
+
export interface Walk360ProcessedSession {
|
|
129
|
+
id: number;
|
|
130
|
+
projectExid: string;
|
|
131
|
+
sourceType: ObservationSourceType;
|
|
132
|
+
sessionId: string;
|
|
133
|
+
status: Walk360ProcessedSessionStatus;
|
|
134
|
+
markersTotal: number | null;
|
|
135
|
+
markersProcessed: number | null;
|
|
136
|
+
eventsCreated: number | null;
|
|
137
|
+
error: string | null;
|
|
138
|
+
startedAt: string;
|
|
139
|
+
finishedAt: string | null;
|
|
140
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type ProjectExid, type CameraExid, type DateType, type BBox, AiObservationFeasibilityStatus, ObservationEventStatus, DownloadFileType } from "@evercam/api/types";
|
|
2
|
+
export type ObservationApproval = boolean | ObservationEventStatus.Unsure | null;
|
|
3
|
+
export type ObservationEvent = {
|
|
4
|
+
id: number;
|
|
5
|
+
observationTypeId: number;
|
|
6
|
+
observationCode: string | null;
|
|
7
|
+
cameraExid: CameraExid;
|
|
8
|
+
projectExid: ProjectExid | null;
|
|
9
|
+
capturedAt: DateType;
|
|
10
|
+
endTime: DateType | null;
|
|
11
|
+
confidence: number | null;
|
|
12
|
+
status: ObservationEventStatus;
|
|
13
|
+
isApproved: ObservationApproval;
|
|
14
|
+
reason: string | null;
|
|
15
|
+
personBbox: BBox | null;
|
|
16
|
+
modelVersion: string | null;
|
|
17
|
+
observationMetadata: Record<string, unknown> | null;
|
|
18
|
+
trigger: string;
|
|
19
|
+
reviewedBy: string | null;
|
|
20
|
+
reviewedAt: DateType | null;
|
|
21
|
+
};
|
|
22
|
+
export type ObservationType = {
|
|
23
|
+
id: number;
|
|
24
|
+
observationCode: string;
|
|
25
|
+
name: string;
|
|
26
|
+
description: string | null;
|
|
27
|
+
type: string;
|
|
28
|
+
severity: number | null;
|
|
29
|
+
feasibilityStatus: AiObservationFeasibilityStatus;
|
|
30
|
+
};
|
|
31
|
+
export declare enum ObservationMissingItem {
|
|
32
|
+
Helmet = "helmet",
|
|
33
|
+
HighVisVest = "high_vis_vest",
|
|
34
|
+
Gloves = "gloves",
|
|
35
|
+
Glasses = "glasses"
|
|
36
|
+
}
|
|
37
|
+
export type ObservationEventsQueryParams = {
|
|
38
|
+
cameraExid?: CameraExid;
|
|
39
|
+
observationCode?: string;
|
|
40
|
+
fromDate?: string;
|
|
41
|
+
toDate?: string;
|
|
42
|
+
missingItems?: string;
|
|
43
|
+
status?: ObservationEventStatus;
|
|
44
|
+
sort?: string;
|
|
45
|
+
page?: number;
|
|
46
|
+
limit?: number;
|
|
47
|
+
};
|
|
48
|
+
export type ObservationEventsExportQueryParams = {
|
|
49
|
+
cameraExid?: CameraExid;
|
|
50
|
+
fromDate: string;
|
|
51
|
+
toDate: string;
|
|
52
|
+
required?: string;
|
|
53
|
+
compliant?: boolean;
|
|
54
|
+
fileType: DownloadFileType;
|
|
55
|
+
directDownload?: boolean;
|
|
56
|
+
includeInvalid?: boolean;
|
|
57
|
+
};
|
|
58
|
+
export type ObservationApprovalUpdateResponse = {
|
|
59
|
+
updated: boolean;
|
|
60
|
+
id: number | string | null;
|
|
61
|
+
message: string;
|
|
62
|
+
};
|
|
63
|
+
export declare enum ObservationCountsGranularity {
|
|
64
|
+
Day = "day",
|
|
65
|
+
Week = "week",
|
|
66
|
+
Month = "month"
|
|
67
|
+
}
|
|
68
|
+
export type ObservationEventsCountsQueryParams = {
|
|
69
|
+
cameraExid?: CameraExid;
|
|
70
|
+
observationCode?: string;
|
|
71
|
+
fromDate?: string;
|
|
72
|
+
toDate?: string;
|
|
73
|
+
missingItems?: string;
|
|
74
|
+
status?: ObservationEventStatus;
|
|
75
|
+
granularity?: ObservationCountsGranularity;
|
|
76
|
+
};
|
|
77
|
+
export type ObservationEventCount = {
|
|
78
|
+
bucket: DateType;
|
|
79
|
+
total: number;
|
|
80
|
+
};
|
|
81
|
+
export declare enum ObservationRequiredItem {
|
|
82
|
+
Helmet = "has_helmet",
|
|
83
|
+
HighVisVest = "has_high_vis_vest"
|
|
84
|
+
}
|