@evercam/api 1.0.0-ea5c7d976 → 1.0.0-eb137e485
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 +4 -0
- package/dist/api/api/3dFirebaseApi.d.ts +224 -0
- package/dist/api/api/adminApi.d.ts +379 -0
- package/dist/api/api/aiApi.d.ts +251 -0
- package/dist/api/api/authzApi.d.ts +40 -0
- package/dist/api/{client → api/client}/axios.d.ts +2 -1
- package/dist/api/{client → api/client}/customErrors.d.ts +10 -0
- package/dist/api/{client → api/client}/interceptors.d.ts +1 -1
- package/dist/api/api/client/swr/Swr.d.ts +14 -0
- package/dist/api/api/client/swr/SwrStore.d.ts +10 -0
- package/dist/api/api/evercamApi.d.ts +353 -0
- package/dist/api/api/evercamLabsApi.d.ts +37 -0
- package/dist/api/{exNvrApi.d.ts → api/exNvrApi.d.ts} +2 -2
- package/dist/api/api/index.d.ts +14 -0
- package/dist/api/api/ingestApi.d.ts +170 -0
- package/dist/api/{ptzApi.d.ts → api/ptzApi.d.ts} +12 -3
- package/dist/api/api/reportsApi.d.ts +15 -0
- package/dist/api/api/videoWallApi.d.ts +9 -0
- package/dist/api/api/weatherApi.d.ts +9 -0
- package/dist/api/index.d.ts +3 -13
- package/dist/api/types/360.d.ts +368 -0
- package/dist/api/types/aconex.d.ts +143 -0
- package/dist/api/types/admin.d.ts +85 -0
- package/dist/api/types/aiConfigs.d.ts +244 -0
- package/dist/{types → api/types}/analytics.d.ts +265 -96
- package/dist/{types → api/types}/anpr.d.ts +57 -13
- package/dist/api/types/apiKey.d.ts +70 -0
- package/dist/api/types/auditLogs.d.ts +257 -0
- package/dist/api/types/authz.d.ts +132 -0
- package/dist/{types → api/types}/autodesk.d.ts +7 -7
- package/dist/api/types/automation.d.ts +123 -0
- package/dist/{types → api/types}/axios.d.ts +32 -11
- package/dist/{types → api/types}/bim.d.ts +65 -16
- package/dist/api/types/camera.d.ts +660 -0
- package/dist/api/types/comments.d.ts +96 -0
- package/dist/api/types/company.d.ts +121 -0
- package/dist/{types → api/types}/compare.d.ts +21 -6
- package/dist/api/types/connector.d.ts +21 -0
- package/dist/api/types/coolify.d.ts +36 -0
- package/dist/{types → api/types}/countries.d.ts +0 -7
- package/dist/{types → api/types}/credentials.d.ts +1 -0
- package/dist/api/types/detections.d.ts +120 -0
- package/dist/api/types/drone.d.ts +106 -0
- package/dist/api/types/emailMessages.d.ts +27 -0
- package/dist/{types → api/types}/errors.d.ts +31 -1
- package/dist/{types → api/types}/gateReport.d.ts +51 -169
- package/dist/api/types/gateReportManagement.d.ts +170 -0
- package/dist/api/types/hammertech.d.ts +98 -0
- package/dist/{types → api/types}/hdd.d.ts +27 -2
- package/dist/{types → api/types}/index.d.ts +23 -4
- package/dist/api/types/ingest.d.ts +314 -0
- package/dist/{types → api/types}/kit.d.ts +170 -108
- package/dist/api/types/map.d.ts +16 -0
- package/dist/{types → api/types}/media.d.ts +33 -4
- package/dist/api/types/notification.d.ts +107 -0
- package/dist/api/types/nvr.d.ts +67 -0
- package/dist/api/types/oauth.d.ts +62 -0
- package/dist/api/types/observationEvents.d.ts +167 -0
- package/dist/api/types/observations.d.ts +89 -0
- package/dist/api/types/planner.d.ts +125 -0
- package/dist/api/types/posthog.d.ts +89 -0
- package/dist/api/types/procore.d.ts +229 -0
- package/dist/{types → api/types}/progressPhoto.d.ts +41 -40
- package/dist/api/types/project.d.ts +293 -0
- package/dist/{types → api/types}/recording.d.ts +10 -16
- package/dist/api/types/recycleBin.d.ts +20 -0
- package/dist/api/types/reports.d.ts +109 -0
- package/dist/api/types/ring.d.ts +53 -0
- package/dist/{types → api/types}/roi.d.ts +2 -9
- package/dist/{types → api/types}/routeParams.d.ts +5 -2
- package/dist/{types → api/types}/router.d.ts +34 -10
- package/dist/{types → api/types}/shared.d.ts +48 -36
- package/dist/api/types/shares.d.ts +45 -0
- package/dist/{types → api/types}/sim.d.ts +23 -11
- package/dist/api/types/siteAnalytics.d.ts +285 -0
- package/dist/api/types/siteAnalyticsManagement.d.ts +127 -0
- package/dist/api/types/siteView.d.ts +80 -0
- package/dist/api/types/smartSeach.d.ts +5 -0
- package/dist/api/types/snapshots.d.ts +144 -0
- package/dist/api/types/socket.d.ts +4 -0
- package/dist/api/types/sso.d.ts +29 -0
- package/dist/api/types/storageProvider.d.ts +30 -0
- package/dist/api/types/storyblok.d.ts +27 -0
- package/dist/{types → api/types}/streaming.d.ts +4 -25
- package/dist/api/types/systemCheck.d.ts +11 -0
- package/dist/{types → api/types}/tag.d.ts +1 -1
- package/dist/api/types/time.d.ts +7 -0
- package/dist/{types → api/types}/timelapse.d.ts +7 -11
- package/dist/{types → api/types}/user.d.ts +143 -59
- package/dist/api/types/videoWall.d.ts +66 -0
- package/dist/api/types/weather.d.ts +153 -0
- package/dist/{types → api/types}/widget.d.ts +108 -19
- package/dist/api/types/xweather.d.ts +12 -0
- package/dist/{utils.d.ts → api/utils.d.ts} +1 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.js +3174 -1147
- 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/api/index.d.ts +3 -0
- package/dist/shared/components/timelinePlayer/providers/index.d.ts +3 -0
- package/dist/shared/components/timelinePlayer/providers/timelineAnprProvider.d.ts +17 -0
- package/dist/shared/components/timelinePlayer/providers/timelineDataProvider.d.ts +13 -0
- package/dist/shared/components/timelinePlayer/providers/timelineLuminanceProvider.d.ts +16 -0
- package/dist/shared/types/components.d.ts +763 -0
- package/dist/shared/types/customDataTableFilters.d.ts +10 -0
- package/dist/shared/types/droneUpload.d.ts +93 -0
- package/dist/shared/types/imagePlayer.d.ts +41 -0
- package/dist/shared/types/index.d.ts +9 -0
- package/dist/shared/types/observations.d.ts +25 -0
- package/dist/shared/types/rbac.d.ts +67 -0
- package/dist/shared/types/report.d.ts +107 -0
- package/dist/shared/types/timeline.d.ts +10 -0
- package/dist/shared/utils/datePickerValue.d.ts +36 -0
- package/dist/shared/utils/datePresets.d.ts +31 -0
- package/package.json +7 -4
- package/dist/api/3dFirebaseApi.d.ts +0 -9
- package/dist/api/adminApi.d.ts +0 -313
- package/dist/api/aiApi.d.ts +0 -110
- package/dist/api/authzApi.d.ts +0 -21
- package/dist/api/evercamApi.d.ts +0 -266
- package/dist/api/evercamLabsApi.d.ts +0 -46
- package/dist/api/ingestApi.d.ts +0 -65
- package/dist/api/videoWallApi.d.ts +0 -9
- package/dist/api/weatherApi.d.ts +0 -27
- package/dist/types/360.d.ts +0 -83
- package/dist/types/aconex.d.ts +0 -45
- package/dist/types/auditLogs.d.ts +0 -99
- package/dist/types/automation.d.ts +0 -6
- package/dist/types/camera.d.ts +0 -565
- package/dist/types/comments.d.ts +0 -36
- package/dist/types/company.d.ts +0 -46
- package/dist/types/connector.d.ts +0 -16
- package/dist/types/coolify.d.ts +0 -18
- package/dist/types/copilot.d.ts +0 -157
- package/dist/types/detections.d.ts +0 -76
- package/dist/types/devices.d.ts +0 -228
- package/dist/types/drone.d.ts +0 -17
- package/dist/types/ingest.d.ts +0 -43
- package/dist/types/map.d.ts +0 -4
- package/dist/types/notification.d.ts +0 -27
- package/dist/types/nvr.d.ts +0 -36
- package/dist/types/planner.d.ts +0 -28
- package/dist/types/procore.d.ts +0 -76
- package/dist/types/project.d.ts +0 -119
- package/dist/types/shares.d.ts +0 -192
- package/dist/types/siteAnalytics.d.ts +0 -84
- package/dist/types/snapshots.d.ts +0 -50
- package/dist/types/storageServers.d.ts +0 -4
- package/dist/types/time.d.ts +0 -19
- package/dist/types/vendorModel.d.ts +0 -15
- package/dist/types/videoWall.d.ts +0 -33
- package/dist/types/weather.d.ts +0 -83
- /package/dist/api/{client → api/client}/index.d.ts +0 -0
- /package/dist/api/{webRtcApi.d.ts → api/webRtcApi.d.ts} +0 -0
- /package/dist/{types → api/types}/voyageControl.d.ts +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum MapType {
|
|
2
|
+
Hybrid = "hybrid",
|
|
3
|
+
Terrain = "terrain"
|
|
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
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { CameraExid, Exid, DateType } from "
|
|
1
|
+
import type { CameraExid, Exid, DateType } from "@evercam/api/types";
|
|
2
2
|
export type MediaExid = Exid;
|
|
3
3
|
export type Media = {
|
|
4
|
-
project_exid?: string;
|
|
5
4
|
cameraExid?: CameraExid;
|
|
5
|
+
cameraId?: number;
|
|
6
|
+
projectId?: number;
|
|
6
7
|
cameraName: string;
|
|
7
8
|
cameraTimezone: string;
|
|
8
9
|
createdAt: string;
|
|
@@ -25,6 +26,13 @@ export type Media = {
|
|
|
25
26
|
projectExid?: string;
|
|
26
27
|
thumbnailUrl?: string;
|
|
27
28
|
mediaUrl?: string;
|
|
29
|
+
camera?: string;
|
|
30
|
+
notes?: string;
|
|
31
|
+
category?: MediaCategory | ClipsCategory;
|
|
32
|
+
isUrgent?: boolean;
|
|
33
|
+
bucket?: string;
|
|
34
|
+
sourceProduct?: string;
|
|
35
|
+
featureType?: string;
|
|
28
36
|
};
|
|
29
37
|
export declare enum MediaType {
|
|
30
38
|
EditedImage = "edit",
|
|
@@ -42,7 +50,8 @@ export declare enum MediaFileType {
|
|
|
42
50
|
Mp4 = "mp4",
|
|
43
51
|
Png = "png",
|
|
44
52
|
Pdf = "pdf",
|
|
45
|
-
Jpeg = "jpeg"
|
|
53
|
+
Jpeg = "jpeg",
|
|
54
|
+
Csv = "csv"
|
|
46
55
|
}
|
|
47
56
|
export declare enum MediaStatus {
|
|
48
57
|
Pending = "Pending",
|
|
@@ -75,6 +84,22 @@ export type MediaFilterQueryParams = {
|
|
|
75
84
|
limit?: number;
|
|
76
85
|
camera?: string;
|
|
77
86
|
};
|
|
87
|
+
export type AdminMediaFilterQueryParams = Partial<{
|
|
88
|
+
title: string;
|
|
89
|
+
sort: string;
|
|
90
|
+
cameraName: string;
|
|
91
|
+
cameraExid: string;
|
|
92
|
+
requesterName: string;
|
|
93
|
+
type: MediaType;
|
|
94
|
+
projectExid: string;
|
|
95
|
+
projectName: string;
|
|
96
|
+
status: MediaStatus;
|
|
97
|
+
notes: string;
|
|
98
|
+
category: MediaCategory | ClipsCategory;
|
|
99
|
+
isUrgent: boolean;
|
|
100
|
+
page: number;
|
|
101
|
+
limit: number;
|
|
102
|
+
}>;
|
|
78
103
|
export type MediaUpdateRequestPayload = {
|
|
79
104
|
name?: string;
|
|
80
105
|
title?: string;
|
|
@@ -92,7 +117,7 @@ export type MediaCreateRequestPayload = {
|
|
|
92
117
|
cameraExid?: string;
|
|
93
118
|
requestedBy?: string;
|
|
94
119
|
notes?: string;
|
|
95
|
-
category?: ClipsCategory;
|
|
120
|
+
category?: MediaCategory | ClipsCategory;
|
|
96
121
|
isUrgent?: boolean;
|
|
97
122
|
storeAsType?: MediaType;
|
|
98
123
|
};
|
|
@@ -107,6 +132,10 @@ export declare enum ClipsCategory {
|
|
|
107
132
|
Marketing = "marketing",
|
|
108
133
|
BestPracticies = "best_practices"
|
|
109
134
|
}
|
|
135
|
+
export declare enum MediaCategory {
|
|
136
|
+
Weather = "weather",
|
|
137
|
+
SmartSearch = "smart_search"
|
|
138
|
+
}
|
|
110
139
|
export type MediaDeleteRequestPayload = {
|
|
111
140
|
timelapseIds: (string | number)[];
|
|
112
141
|
compareIds: (string | number)[];
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { CommentsScope, CommentThreeSixtyContext } from "./comments";
|
|
2
|
+
export declare enum NotificationType {
|
|
3
|
+
CameraShare = "camera_share",
|
|
4
|
+
CameraStatusChange = "camera_status_changed",
|
|
5
|
+
Mention = "mention",
|
|
6
|
+
CommentMention = "comment_mention",
|
|
7
|
+
TimelapseCreated = "timelapse_created",
|
|
8
|
+
TimelapseFailed = "timelapse_failed",
|
|
9
|
+
DroneProcessing = "drone_processing_done",
|
|
10
|
+
Processing360 = "three_sixty_done",
|
|
11
|
+
SmartSearchExportReady = "smart_search_export_ready",
|
|
12
|
+
SmartSearchExportFailed = "smart_search_export_failed",
|
|
13
|
+
GateReportExportReady = "gate_report_export_ready",
|
|
14
|
+
GateReportExportFailed = "gate_report_export_failed",
|
|
15
|
+
PpeExportReady = "ppe_export_ready",
|
|
16
|
+
PpeExportFailed = "ppe_export_failed",
|
|
17
|
+
WeatherExportReady = "weather_export_ready",
|
|
18
|
+
WeatherExportFailed = "weather_export_failed",
|
|
19
|
+
CompareReady = "compare_ready",
|
|
20
|
+
CompareFailed = "compare_failed",
|
|
21
|
+
ClipExportReady = "clip_export_ready",
|
|
22
|
+
ClipExportFailed = "clip_export_failed",
|
|
23
|
+
NvrClipReady = "nvr_clip_ready",
|
|
24
|
+
NvrClipFailed = "nvr_clip_failed",
|
|
25
|
+
UploadComplete = "upload_complete",
|
|
26
|
+
UploadFailed = "upload_failed",
|
|
27
|
+
RingCamerasImported = "ring_cameras_imported",
|
|
28
|
+
StorageWarning = "storage_warning",
|
|
29
|
+
Other = "other"
|
|
30
|
+
}
|
|
31
|
+
export interface NotificationContextBase {
|
|
32
|
+
cameraExid?: string;
|
|
33
|
+
projectExid?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface CameraShareContext extends NotificationContextBase {
|
|
36
|
+
cameraExid: string;
|
|
37
|
+
projectExid: string;
|
|
38
|
+
shareId: number;
|
|
39
|
+
}
|
|
40
|
+
export interface CameraStatusChangeContext extends NotificationContextBase {
|
|
41
|
+
cameraExid: string;
|
|
42
|
+
projectExid: string;
|
|
43
|
+
newStatus: string;
|
|
44
|
+
}
|
|
45
|
+
export interface MentionContext extends NotificationContextBase {
|
|
46
|
+
}
|
|
47
|
+
export interface TimelapseCreatedContext extends NotificationContextBase {
|
|
48
|
+
cameraExid: string;
|
|
49
|
+
projectExid: string;
|
|
50
|
+
archiveExid: string;
|
|
51
|
+
}
|
|
52
|
+
export interface TimelapseFailedContext extends NotificationContextBase {
|
|
53
|
+
cameraExid: string;
|
|
54
|
+
projectExid: string;
|
|
55
|
+
}
|
|
56
|
+
export interface DroneProcessingContext extends NotificationContextBase {
|
|
57
|
+
projectExid: string;
|
|
58
|
+
droneDate: string;
|
|
59
|
+
}
|
|
60
|
+
export interface Processing360Context extends NotificationContextBase {
|
|
61
|
+
projectExid: string;
|
|
62
|
+
date: string;
|
|
63
|
+
floor: string;
|
|
64
|
+
}
|
|
65
|
+
export interface ExportNotificationContext extends NotificationContextBase {
|
|
66
|
+
projectExid: string;
|
|
67
|
+
archiveExid?: string;
|
|
68
|
+
compareExid?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface UploadNotificationContext extends NotificationContextBase {
|
|
71
|
+
projectExid: string;
|
|
72
|
+
}
|
|
73
|
+
export interface RingCamerasImportedContext extends NotificationContextBase {
|
|
74
|
+
projectExid: string;
|
|
75
|
+
projectName: string;
|
|
76
|
+
cameras: Array<{
|
|
77
|
+
exid: string;
|
|
78
|
+
name: string;
|
|
79
|
+
}>;
|
|
80
|
+
}
|
|
81
|
+
export interface StorageWarningContext extends NotificationContextBase {
|
|
82
|
+
projectExid: string;
|
|
83
|
+
cameraName: string;
|
|
84
|
+
}
|
|
85
|
+
export interface CommentMentionContext extends NotificationContextBase {
|
|
86
|
+
projectExid: string;
|
|
87
|
+
commentId: number;
|
|
88
|
+
scope: CommentsScope;
|
|
89
|
+
commentContext: CommentThreeSixtyContext;
|
|
90
|
+
content?: string;
|
|
91
|
+
label?: string;
|
|
92
|
+
projectName?: string;
|
|
93
|
+
}
|
|
94
|
+
export type NotificationContext = CameraShareContext | CameraStatusChangeContext | MentionContext | TimelapseCreatedContext | TimelapseFailedContext | DroneProcessingContext | Processing360Context | ExportNotificationContext | UploadNotificationContext | RingCamerasImportedContext | StorageWarningContext | CommentMentionContext;
|
|
95
|
+
export type Notification = {
|
|
96
|
+
id: number;
|
|
97
|
+
type: NotificationType;
|
|
98
|
+
insertedAt: string;
|
|
99
|
+
initiatorId: number;
|
|
100
|
+
initiatorFullname: string;
|
|
101
|
+
initiatorEmail: string;
|
|
102
|
+
targetId: number;
|
|
103
|
+
targetFullname: string;
|
|
104
|
+
targetEmail: string;
|
|
105
|
+
readTimestamp: string | null;
|
|
106
|
+
context: NotificationContext;
|
|
107
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { NvrModel } from "@evercam/api/types";
|
|
2
|
+
export type Nvr = {
|
|
3
|
+
id?: number;
|
|
4
|
+
kitId?: number;
|
|
5
|
+
deviceType: NvrDeviceType;
|
|
6
|
+
serial: string;
|
|
7
|
+
model: NvrModel;
|
|
8
|
+
httpUrl: string | null;
|
|
9
|
+
rtspUrl: string | null;
|
|
10
|
+
macAddress: string;
|
|
11
|
+
username: string | null;
|
|
12
|
+
password: string | null;
|
|
13
|
+
nerves: boolean;
|
|
14
|
+
version?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare enum NvrDeviceType {
|
|
17
|
+
Rpi4 = "rpi4",
|
|
18
|
+
Rpi5 = "rpi5",
|
|
19
|
+
OrinNano = "orin_nano",
|
|
20
|
+
Giraffe = "giraffe"
|
|
21
|
+
}
|
|
22
|
+
export declare enum NvrHddStatus {
|
|
23
|
+
Error = "error",
|
|
24
|
+
Idle = "idle",
|
|
25
|
+
NotExist = "notexist",
|
|
26
|
+
Ok = "ok",
|
|
27
|
+
Unformatted = "unformatted"
|
|
28
|
+
}
|
|
29
|
+
export type NvrCreatePayload = {
|
|
30
|
+
serial?: string;
|
|
31
|
+
httpUrl?: string | null;
|
|
32
|
+
rtspUrl?: string | null;
|
|
33
|
+
deviceType?: NvrDeviceType;
|
|
34
|
+
model: NvrModel;
|
|
35
|
+
username?: string | null;
|
|
36
|
+
password?: string | null;
|
|
37
|
+
kitId?: number;
|
|
38
|
+
};
|
|
39
|
+
export type NvrConnectionFields = Pick<NvrCreatePayload, "username" | "password" | "httpUrl" | "rtspUrl">;
|
|
40
|
+
export type AdminNvr = {
|
|
41
|
+
name: string;
|
|
42
|
+
exid: string;
|
|
43
|
+
externalHost: string | null;
|
|
44
|
+
model: string | null;
|
|
45
|
+
deviceName: string | null;
|
|
46
|
+
macAddress: string | null;
|
|
47
|
+
firmwareVersion: string | null;
|
|
48
|
+
resolution: string | null;
|
|
49
|
+
bitrateType: string | null;
|
|
50
|
+
videoQuality: string | null;
|
|
51
|
+
frameRate: number | null;
|
|
52
|
+
bitrate: string | null;
|
|
53
|
+
videoEncoding: string | null;
|
|
54
|
+
hddName: string | null;
|
|
55
|
+
hddCapacity: string | null;
|
|
56
|
+
freeSpace: string | null;
|
|
57
|
+
hddStatus: string | null;
|
|
58
|
+
hddProperty: string | null;
|
|
59
|
+
nvrStatus: string;
|
|
60
|
+
timeMode: string | null;
|
|
61
|
+
localTime: string | null;
|
|
62
|
+
timezone: string | null;
|
|
63
|
+
addressingFormatType: string | null;
|
|
64
|
+
hostName: string | null;
|
|
65
|
+
portNo: string | null;
|
|
66
|
+
synchronizeInterval: string | null;
|
|
67
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export type OAuthClient = {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
clientId: string;
|
|
5
|
+
redirectUris: string[];
|
|
6
|
+
logoUrl: string | null;
|
|
7
|
+
scopes: string[];
|
|
8
|
+
active: boolean;
|
|
9
|
+
description: string | null;
|
|
10
|
+
owner: {
|
|
11
|
+
id: number;
|
|
12
|
+
name: string;
|
|
13
|
+
email: string;
|
|
14
|
+
} | null;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
updatedAt: string;
|
|
17
|
+
};
|
|
18
|
+
export type OAuthClientWithSecret = OAuthClient & {
|
|
19
|
+
clientSecret: string;
|
|
20
|
+
};
|
|
21
|
+
export type CreateOAuthClientPayload = {
|
|
22
|
+
name: string;
|
|
23
|
+
redirectUris: string[];
|
|
24
|
+
scopes?: string[];
|
|
25
|
+
description?: string;
|
|
26
|
+
logoUrl?: string;
|
|
27
|
+
};
|
|
28
|
+
export type AdminCreateOAuthClientPayload = CreateOAuthClientPayload & {
|
|
29
|
+
clientId?: string;
|
|
30
|
+
clientSecret?: string;
|
|
31
|
+
};
|
|
32
|
+
export type UpdateOAuthClientPayload = {
|
|
33
|
+
name?: string;
|
|
34
|
+
redirectUris?: string[];
|
|
35
|
+
scopes?: string[];
|
|
36
|
+
description?: string;
|
|
37
|
+
logoUrl?: string;
|
|
38
|
+
active?: boolean;
|
|
39
|
+
};
|
|
40
|
+
export type OAuthScopeDetail = {
|
|
41
|
+
scope: string;
|
|
42
|
+
description: string;
|
|
43
|
+
group: string;
|
|
44
|
+
};
|
|
45
|
+
export type OAuthConsentInfo = {
|
|
46
|
+
client: {
|
|
47
|
+
name: string;
|
|
48
|
+
logoUrl: string | null;
|
|
49
|
+
description: string | null;
|
|
50
|
+
};
|
|
51
|
+
scopes: OAuthScopeDetail[];
|
|
52
|
+
};
|
|
53
|
+
export type OAuthConsentPayload = {
|
|
54
|
+
clientId: string;
|
|
55
|
+
scope: string;
|
|
56
|
+
redirectUri: string;
|
|
57
|
+
state: string;
|
|
58
|
+
decision: "allow" | "deny";
|
|
59
|
+
};
|
|
60
|
+
export type OAuthConsentResponse = {
|
|
61
|
+
redirectUrl: string;
|
|
62
|
+
};
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type { VisionProvider } from "@evercam/api/types";
|
|
2
|
+
export declare enum ObservationEventStatus {
|
|
3
|
+
Detected = "detected",
|
|
4
|
+
Approved = "approved",
|
|
5
|
+
Disapproved = "disapproved",
|
|
6
|
+
Unsure = "unsure"
|
|
7
|
+
}
|
|
8
|
+
export interface ObservationEventStatusConfig {
|
|
9
|
+
bg: string;
|
|
10
|
+
fg: string;
|
|
11
|
+
border: string;
|
|
12
|
+
label: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const OBSERVATION_EVENT_STATUS_CONFIGS: Record<ObservationEventStatus, ObservationEventStatusConfig>;
|
|
15
|
+
export interface SiteAnalyticsObservationEvent {
|
|
16
|
+
id: number;
|
|
17
|
+
sourceType?: ObservationSourceType;
|
|
18
|
+
sessionId?: string | null;
|
|
19
|
+
markerId?: string | null;
|
|
20
|
+
drawingId?: string | null;
|
|
21
|
+
drawingName?: string | null;
|
|
22
|
+
walkName?: string | null;
|
|
23
|
+
sightings?: Array<Record<string, unknown>> | null;
|
|
24
|
+
observationTypeId: number;
|
|
25
|
+
observationName: string | null;
|
|
26
|
+
observationCode: string | null;
|
|
27
|
+
cameraExid: string;
|
|
28
|
+
projectExid: string | null;
|
|
29
|
+
startTime: string;
|
|
30
|
+
endTime: string | null;
|
|
31
|
+
confidence: number | null;
|
|
32
|
+
status: ObservationEventStatus;
|
|
33
|
+
aiEvidence: string | null;
|
|
34
|
+
bbox: number[] | null;
|
|
35
|
+
model: string | null;
|
|
36
|
+
promptId: number | null;
|
|
37
|
+
observationMetadata: Record<string, unknown> | null;
|
|
38
|
+
trigger: ObservationEventTrigger | string;
|
|
39
|
+
reviewedBy: string | null;
|
|
40
|
+
reviewedAt: string | null;
|
|
41
|
+
insertedAt: string;
|
|
42
|
+
}
|
|
43
|
+
export type ObservationEventQueryParams = {
|
|
44
|
+
cameraExid?: string;
|
|
45
|
+
projectExid?: string;
|
|
46
|
+
observationTypeIds?: string;
|
|
47
|
+
status?: ObservationEventStatus | string;
|
|
48
|
+
sourceType?: ObservationSourceType | string;
|
|
49
|
+
modelName?: string;
|
|
50
|
+
sortBy?: string;
|
|
51
|
+
sortDir?: "asc" | "desc";
|
|
52
|
+
page?: number;
|
|
53
|
+
limit?: number;
|
|
54
|
+
};
|
|
55
|
+
export interface ObservationModelOption {
|
|
56
|
+
modelName: string;
|
|
57
|
+
total: number;
|
|
58
|
+
}
|
|
59
|
+
export interface ObservationEventListResponse {
|
|
60
|
+
items: SiteAnalyticsObservationEvent[];
|
|
61
|
+
total: number;
|
|
62
|
+
page: number;
|
|
63
|
+
limit: number;
|
|
64
|
+
from: number;
|
|
65
|
+
to: number;
|
|
66
|
+
}
|
|
67
|
+
export interface SiteAnalyticsObservationEventRaw {
|
|
68
|
+
id: number;
|
|
69
|
+
observationTypeId: number;
|
|
70
|
+
observationCode: string | null;
|
|
71
|
+
cameraExid: string;
|
|
72
|
+
projectExid: string | null;
|
|
73
|
+
capturedAt: string;
|
|
74
|
+
endTime: string | null;
|
|
75
|
+
confidence: number | null;
|
|
76
|
+
status: ObservationEventStatus;
|
|
77
|
+
reason: string | null;
|
|
78
|
+
personBbox: number[] | null;
|
|
79
|
+
modelVersion: string | null;
|
|
80
|
+
observationMetadata: Record<string, unknown> | null;
|
|
81
|
+
trigger: string;
|
|
82
|
+
reviewedBy: string | null;
|
|
83
|
+
reviewedAt: string | null;
|
|
84
|
+
}
|
|
85
|
+
export interface ObservationEventListResponseRaw {
|
|
86
|
+
items: SiteAnalyticsObservationEventRaw[];
|
|
87
|
+
total: number;
|
|
88
|
+
page: number;
|
|
89
|
+
limit: number;
|
|
90
|
+
from: number;
|
|
91
|
+
to: number;
|
|
92
|
+
}
|
|
93
|
+
export type ObservationEventVerdict = ObservationEventStatus.Approved | ObservationEventStatus.Disapproved | ObservationEventStatus.Unsure;
|
|
94
|
+
export interface ObservationEventReviewPayload {
|
|
95
|
+
status: ObservationEventVerdict;
|
|
96
|
+
}
|
|
97
|
+
export interface ObservationEventReviewResponse {
|
|
98
|
+
updated: boolean;
|
|
99
|
+
id: number | string;
|
|
100
|
+
message: string;
|
|
101
|
+
}
|
|
102
|
+
export declare enum ObservationSourceType {
|
|
103
|
+
Camera = "camera",
|
|
104
|
+
Walk360 = "walk360",
|
|
105
|
+
Drone = "drone"
|
|
106
|
+
}
|
|
107
|
+
export declare enum ObservationEventTrigger {
|
|
108
|
+
CameraDetection = "camera_detection",
|
|
109
|
+
Walk = "walk"
|
|
110
|
+
}
|
|
111
|
+
export declare enum Walk360ProcessedSessionStatus {
|
|
112
|
+
Done = "done",
|
|
113
|
+
Processing = "processing",
|
|
114
|
+
Retryable = "retryable",
|
|
115
|
+
Error = "error"
|
|
116
|
+
}
|
|
117
|
+
export interface Walk360Activity {
|
|
118
|
+
observationTypeId: number;
|
|
119
|
+
}
|
|
120
|
+
export interface Walk360WorkerInfo {
|
|
121
|
+
coolifyAppId?: string | null;
|
|
122
|
+
workerStatus?: string | null;
|
|
123
|
+
workerIsRunning?: boolean;
|
|
124
|
+
appUrl?: string | null;
|
|
125
|
+
visionProvider?: VisionProvider;
|
|
126
|
+
}
|
|
127
|
+
export interface Walk360Config extends Walk360WorkerInfo {
|
|
128
|
+
projectExid: string;
|
|
129
|
+
enabled: boolean;
|
|
130
|
+
startDate: string | null;
|
|
131
|
+
activities: Walk360Activity[];
|
|
132
|
+
configured: boolean;
|
|
133
|
+
maxParallelWalks?: number;
|
|
134
|
+
}
|
|
135
|
+
export interface Walk360ConfigSummary extends Walk360WorkerInfo {
|
|
136
|
+
projectExid: string;
|
|
137
|
+
projectName?: string | null;
|
|
138
|
+
enabled: boolean;
|
|
139
|
+
startDate: string | null;
|
|
140
|
+
activities: Walk360Activity[];
|
|
141
|
+
maxParallelWalks: number;
|
|
142
|
+
walksDone: number;
|
|
143
|
+
walksProcessing: number;
|
|
144
|
+
walksRetryable: number;
|
|
145
|
+
eventsCreated: number;
|
|
146
|
+
lastProcessedAt: string | null;
|
|
147
|
+
updatedAt: string | null;
|
|
148
|
+
}
|
|
149
|
+
export interface Walk360WorkerAction {
|
|
150
|
+
projectExid: string;
|
|
151
|
+
appUuid: string | null;
|
|
152
|
+
message: string;
|
|
153
|
+
state: string;
|
|
154
|
+
}
|
|
155
|
+
export interface Walk360ProcessedSession {
|
|
156
|
+
id: number;
|
|
157
|
+
projectExid: string;
|
|
158
|
+
sourceType: ObservationSourceType;
|
|
159
|
+
sessionId: string;
|
|
160
|
+
status: Walk360ProcessedSessionStatus;
|
|
161
|
+
markersTotal: number | null;
|
|
162
|
+
markersProcessed: number | null;
|
|
163
|
+
eventsCreated: number | null;
|
|
164
|
+
error: string | null;
|
|
165
|
+
startedAt: string;
|
|
166
|
+
finishedAt: string | null;
|
|
167
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { type ProjectExid, type CameraExid, type DateType, type BBox, AiObservationFeasibilityStatus, ObservationEventStatus, ObservationSourceType, 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 | null;
|
|
8
|
+
projectExid: ProjectExid | null;
|
|
9
|
+
sourceType: ObservationSourceType;
|
|
10
|
+
sessionId?: string | null;
|
|
11
|
+
markerId?: string | null;
|
|
12
|
+
drawingId?: string | null;
|
|
13
|
+
drawingName?: string | null;
|
|
14
|
+
walkName?: string | null;
|
|
15
|
+
capturedAt: DateType;
|
|
16
|
+
endTime: DateType | null;
|
|
17
|
+
confidence: number | null;
|
|
18
|
+
status: ObservationEventStatus;
|
|
19
|
+
isApproved: ObservationApproval;
|
|
20
|
+
reason: string | null;
|
|
21
|
+
personBbox: BBox | null;
|
|
22
|
+
modelVersion: string | null;
|
|
23
|
+
observationMetadata: Record<string, unknown> | null;
|
|
24
|
+
trigger: string;
|
|
25
|
+
reviewedBy: string | null;
|
|
26
|
+
reviewedAt: DateType | null;
|
|
27
|
+
};
|
|
28
|
+
export type ObservationType = {
|
|
29
|
+
id: number;
|
|
30
|
+
observationCode: string;
|
|
31
|
+
name: string;
|
|
32
|
+
description: string | null;
|
|
33
|
+
type: string;
|
|
34
|
+
severity: number | null;
|
|
35
|
+
feasibilityStatus: AiObservationFeasibilityStatus;
|
|
36
|
+
};
|
|
37
|
+
export declare enum ObservationMissingItem {
|
|
38
|
+
Helmet = "helmet",
|
|
39
|
+
HighVisVest = "high_vis_vest",
|
|
40
|
+
Gloves = "gloves",
|
|
41
|
+
Glasses = "glasses"
|
|
42
|
+
}
|
|
43
|
+
export type ObservationEventsQueryParams = {
|
|
44
|
+
cameraExid?: CameraExid;
|
|
45
|
+
observationCode?: string;
|
|
46
|
+
type?: string;
|
|
47
|
+
fromDate?: string;
|
|
48
|
+
toDate?: string;
|
|
49
|
+
missingItems?: string;
|
|
50
|
+
status?: ObservationEventStatus;
|
|
51
|
+
sort?: string;
|
|
52
|
+
page?: number;
|
|
53
|
+
limit?: number;
|
|
54
|
+
};
|
|
55
|
+
export type ObservationEventsExportQueryParams = {
|
|
56
|
+
cameraExid?: CameraExid;
|
|
57
|
+
observationCode?: string;
|
|
58
|
+
type?: string;
|
|
59
|
+
missingItems?: string;
|
|
60
|
+
status?: ObservationEventStatus;
|
|
61
|
+
fromDate: string;
|
|
62
|
+
toDate: string;
|
|
63
|
+
fileType: DownloadFileType;
|
|
64
|
+
directDownload?: boolean;
|
|
65
|
+
};
|
|
66
|
+
export type ObservationApprovalUpdateResponse = {
|
|
67
|
+
updated: boolean;
|
|
68
|
+
id: number | string | null;
|
|
69
|
+
message: string;
|
|
70
|
+
};
|
|
71
|
+
export declare enum ObservationCountsGranularity {
|
|
72
|
+
Day = "day",
|
|
73
|
+
Week = "week",
|
|
74
|
+
Month = "month"
|
|
75
|
+
}
|
|
76
|
+
export type ObservationEventsCountsQueryParams = {
|
|
77
|
+
cameraExid?: CameraExid;
|
|
78
|
+
observationCode?: string;
|
|
79
|
+
type?: string;
|
|
80
|
+
fromDate?: string;
|
|
81
|
+
toDate?: string;
|
|
82
|
+
missingItems?: string;
|
|
83
|
+
status?: ObservationEventStatus;
|
|
84
|
+
granularity?: ObservationCountsGranularity;
|
|
85
|
+
};
|
|
86
|
+
export type ObservationEventCount = {
|
|
87
|
+
bucket: DateType;
|
|
88
|
+
total: number;
|
|
89
|
+
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { GeoPoint, TuplePoint2D } from "./shared";
|
|
2
|
+
import { MapType } from "./map";
|
|
3
|
+
export type PlannerListItem = {
|
|
4
|
+
id: string;
|
|
5
|
+
projectId: string;
|
|
6
|
+
projectName: string;
|
|
7
|
+
projectLocation: string;
|
|
8
|
+
createdDate: string;
|
|
9
|
+
updatedDate: string;
|
|
10
|
+
owner?: string;
|
|
11
|
+
lastUpdatedBy?: string;
|
|
12
|
+
camerasCount?: number;
|
|
13
|
+
hasPlan?: boolean;
|
|
14
|
+
thumbnailUrl?: string;
|
|
15
|
+
projectMapType?: MapType;
|
|
16
|
+
sessionId?: string;
|
|
17
|
+
};
|
|
18
|
+
export type PolygonPath = TuplePoint2D[];
|
|
19
|
+
export type PolygonCoordinates = PolygonPath[];
|
|
20
|
+
export interface GeoJSONPolygon {
|
|
21
|
+
type: "Polygon";
|
|
22
|
+
coordinates: PolygonCoordinates;
|
|
23
|
+
}
|
|
24
|
+
export declare enum PlannerUrlParams {
|
|
25
|
+
SitePlanId = "site_plan_id",
|
|
26
|
+
IsNewSitePlan = "is_new_site_plan",
|
|
27
|
+
IsBoundsMode = "is_bounds_mode",
|
|
28
|
+
ProjectPosition = "project_position",
|
|
29
|
+
DealId = "deal_id"
|
|
30
|
+
}
|
|
31
|
+
export declare enum EDistortImageModes {
|
|
32
|
+
Edit = "edit",
|
|
33
|
+
FreeRotate = "freeRotate",
|
|
34
|
+
Lock = "lock",
|
|
35
|
+
Rotate = "rotate",
|
|
36
|
+
Scale = "scale",
|
|
37
|
+
Pan = "drag"
|
|
38
|
+
}
|
|
39
|
+
export declare enum EMapTypes {
|
|
40
|
+
Blank = "Blank",
|
|
41
|
+
Satellite = "Satellite",
|
|
42
|
+
Street = "Street",
|
|
43
|
+
GoogleSatellite = "hybrid",
|
|
44
|
+
GoogleStreet = "roadmap",
|
|
45
|
+
GoogleTerrain = "terrain"
|
|
46
|
+
}
|
|
47
|
+
export declare enum EMarkers {
|
|
48
|
+
CameraMarker = "cameraMarker",
|
|
49
|
+
ThreeSixtyMarker = "threeSixtyMarkers"
|
|
50
|
+
}
|
|
51
|
+
export declare enum EPageType {
|
|
52
|
+
List = "list",
|
|
53
|
+
Item = "item"
|
|
54
|
+
}
|
|
55
|
+
export declare enum ERoles {
|
|
56
|
+
Admin = "admin",
|
|
57
|
+
User = "user"
|
|
58
|
+
}
|
|
59
|
+
export type PlannerOverlay = {
|
|
60
|
+
imageUrl?: string;
|
|
61
|
+
corners?: {
|
|
62
|
+
topLeft: GeoPoint;
|
|
63
|
+
topRight: GeoPoint;
|
|
64
|
+
bottomLeft: GeoPoint;
|
|
65
|
+
bottomRight: GeoPoint;
|
|
66
|
+
} | null;
|
|
67
|
+
};
|
|
68
|
+
export type PlannerCameraMarker = {
|
|
69
|
+
name?: string;
|
|
70
|
+
location?: GeoPoint;
|
|
71
|
+
heading?: number;
|
|
72
|
+
fovAngle?: number;
|
|
73
|
+
fovRadius?: number;
|
|
74
|
+
isVisible?: boolean;
|
|
75
|
+
color?: string;
|
|
76
|
+
};
|
|
77
|
+
export type SitePlanBounds = {
|
|
78
|
+
northEast: GeoPoint;
|
|
79
|
+
southWest: GeoPoint;
|
|
80
|
+
};
|
|
81
|
+
export type SitePlan = {
|
|
82
|
+
id?: string;
|
|
83
|
+
projectId?: string;
|
|
84
|
+
owner?: string;
|
|
85
|
+
lastUpdatedBy?: string;
|
|
86
|
+
projectName?: string;
|
|
87
|
+
projectLocation?: string;
|
|
88
|
+
projectMapType?: EMapTypes;
|
|
89
|
+
projectBounds?: SitePlanBounds;
|
|
90
|
+
overlay?: PlannerOverlay;
|
|
91
|
+
markers?: PlannerCameraMarker[];
|
|
92
|
+
thumbnailUrl?: string;
|
|
93
|
+
createdDate?: string;
|
|
94
|
+
updatedDate?: string;
|
|
95
|
+
};
|
|
96
|
+
export interface IDrawControl {
|
|
97
|
+
_toolbars: {
|
|
98
|
+
draw: {
|
|
99
|
+
_activeMode: {
|
|
100
|
+
handler: {
|
|
101
|
+
disable(): void;
|
|
102
|
+
completeShape(): void;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
_modes: {
|
|
106
|
+
polygon: {
|
|
107
|
+
handler: {
|
|
108
|
+
enable(): void;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
edit: {
|
|
114
|
+
_modes: {
|
|
115
|
+
edit: {
|
|
116
|
+
handler: {
|
|
117
|
+
enable(): void;
|
|
118
|
+
disable(): void;
|
|
119
|
+
save(): void;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
}
|