@evercam/api 1.0.0-preview-fix-evercam-ui-publish-script-07a483d2b → 1.0.0-preview-test-on-pr-ff50e7c86
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 -1
- package/dist/api/3dFirebaseApi.d.ts +12 -0
- package/dist/api/adminApi.d.ts +118 -26
- package/dist/api/aiApi.d.ts +87 -5
- package/dist/api/client/customErrors.d.ts +10 -0
- package/dist/api/client/interceptors.d.ts +3 -2
- package/dist/api/client/swr/Swr.d.ts +14 -0
- package/dist/api/client/swr/SwrStore.d.ts +10 -0
- package/dist/api/evercamApi.d.ts +81 -33
- package/dist/api/evercamLabsApi.d.ts +10 -16
- package/dist/api/ingestApi.d.ts +41 -11
- package/dist/api/ptzApi.d.ts +1 -1
- package/dist/api/weatherApi.d.ts +7 -23
- package/dist/index.js +1485 -763
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/types/360.d.ts +60 -2
- package/dist/types/aconex.d.ts +103 -5
- package/dist/types/analytics.d.ts +99 -71
- package/dist/types/anpr.d.ts +16 -17
- package/dist/types/automation.d.ts +55 -0
- package/dist/types/axios.d.ts +15 -1
- package/dist/types/camera.d.ts +30 -57
- package/dist/types/comments.d.ts +31 -8
- package/dist/types/company.d.ts +29 -1
- package/dist/types/connector.d.ts +6 -1
- package/dist/types/coolify.d.ts +20 -0
- package/dist/types/copilot.d.ts +11 -9
- package/dist/types/countries.d.ts +0 -7
- package/dist/types/detections.d.ts +73 -23
- package/dist/types/errors.d.ts +13 -0
- package/dist/types/gateReport.d.ts +50 -1
- package/dist/types/hdd.d.ts +63 -0
- package/dist/types/index.d.ts +10 -2
- package/dist/types/ingest.d.ts +8 -0
- package/dist/types/kit.d.ts +94 -10
- package/dist/types/nvr.d.ts +2 -1
- package/dist/types/{sitePlanner.d.ts → planner.d.ts} +10 -1
- package/dist/types/posthog.d.ts +18 -0
- package/dist/types/procore.d.ts +149 -3
- package/dist/types/progressPhoto.d.ts +6 -22
- package/dist/types/project.d.ts +14 -2
- package/dist/types/recording.d.ts +1 -2
- package/dist/types/recycleBin.d.ts +14 -0
- package/dist/types/roi.d.ts +2 -1
- package/dist/types/routeParams.d.ts +4 -2
- package/dist/types/shared.d.ts +3 -17
- package/dist/types/shares.d.ts +5 -1
- package/dist/types/siteAnalytics.d.ts +159 -1
- package/dist/types/snapshots.d.ts +9 -0
- package/dist/types/sso.d.ts +55 -0
- package/dist/types/streaming.d.ts +4 -27
- package/dist/types/systemCheck.d.ts +11 -0
- package/dist/types/tag.d.ts +12 -0
- package/dist/types/time.d.ts +6 -0
- package/dist/types/timelapse.d.ts +15 -0
- package/dist/types/user.d.ts +1 -6
- package/dist/types/weather.d.ts +8 -2
- package/dist/types/widget.d.ts +36 -11
- package/dist/types/xweather.d.ts +12 -0
- package/dist/utils.d.ts +1 -0
- package/package.json +8 -7
- package/dist/types/devices.d.ts +0 -228
package/dist/types/axios.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, CancelTokenSource, CancelTokenStatic } from "axios";
|
|
2
|
+
import { Swr } from "@/api/client/swr/Swr";
|
|
2
3
|
export type TimedRequest<T> = Promise<AxiosResponse<T> & {
|
|
3
4
|
duration: number;
|
|
4
5
|
error?: AxiosError;
|
|
5
6
|
}>;
|
|
6
7
|
export type AxiosEnvironment = {
|
|
7
|
-
isStaging?: boolean;
|
|
8
8
|
baseUrl?: string | null;
|
|
9
9
|
stagingAiApiUrl?: string | null;
|
|
10
10
|
aiApiUrl?: string | null;
|
|
11
11
|
ingestApiUrl?: string | null;
|
|
12
|
+
ingestGpuApiUrl?: string | null;
|
|
12
13
|
posthogApiUrl?: string | null;
|
|
13
14
|
posthogProjectId?: string | null;
|
|
14
15
|
posthogPrivateApiKey?: string | null;
|
|
@@ -16,10 +17,13 @@ export type AxiosEnvironment = {
|
|
|
16
17
|
weatherApiBaseUrl?: string | null;
|
|
17
18
|
evercamLabsUrl?: string | null;
|
|
18
19
|
firebaseDbLink?: string | null;
|
|
20
|
+
firebaseStorageUrl?: string | null;
|
|
21
|
+
firebaseStorageToken?: string | null;
|
|
19
22
|
snapshotsURL?: string | null;
|
|
20
23
|
app?: string | null;
|
|
21
24
|
getAuthToken?: () => string | null;
|
|
22
25
|
errorLogger?: (error: AxiosError) => void;
|
|
26
|
+
swrKey?: string;
|
|
23
27
|
};
|
|
24
28
|
export type RequestInterceptor = (req: AxiosRequestConfig, env: AxiosEnvironment) => AxiosRequestConfig & any;
|
|
25
29
|
export type ResponseInterceptor = (res: AxiosResponse, env: AxiosEnvironment) => AxiosResponse & any;
|
|
@@ -38,7 +42,13 @@ export interface ExtendedAxiosInstance extends AxiosInstance {
|
|
|
38
42
|
addRequestInterceptor: (interceptor: RequestInterceptor, errorInterceptor?: ErrorInterceptor) => void;
|
|
39
43
|
addResponseInterceptor: (interceptor: ResponseInterceptor, errorInterceptor?: ErrorInterceptor) => void;
|
|
40
44
|
addErrorInterceptor: (interceptor: ErrorInterceptor) => void;
|
|
45
|
+
swr: Swr;
|
|
41
46
|
}
|
|
47
|
+
export type ResponseValue<T> = T | undefined;
|
|
48
|
+
export type SwrResponse<T> = {
|
|
49
|
+
cachedValue: ResponseValue<T>;
|
|
50
|
+
freshPromise: Promise<ResponseValue<T>>;
|
|
51
|
+
};
|
|
42
52
|
declare module "axios" {
|
|
43
53
|
interface AxiosRequestConfig {
|
|
44
54
|
raw?: boolean;
|
|
@@ -47,5 +57,9 @@ declare module "axios" {
|
|
|
47
57
|
_metadata?: {
|
|
48
58
|
startTime: number;
|
|
49
59
|
};
|
|
60
|
+
swr?: boolean;
|
|
61
|
+
onSwrHit?: <T>(data: T) => unknown;
|
|
62
|
+
onSwrRefresh?: <T>(data: T) => unknown;
|
|
63
|
+
onSwrError?: (error: Error) => unknown;
|
|
50
64
|
}
|
|
51
65
|
}
|
package/dist/types/camera.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { AuditLogActionType, DateTime_Z_micros, DateType, EntityByExid,
|
|
2
|
-
|
|
1
|
+
import { AuditLogActionType, DateTime_Z_micros, DateType, EntityByExid, NvrDeviceType, PaginationParams, PowerSchedule, PowerType, ProjectExid, ProjectFeatureFlag, Schedule } from "@/types";
|
|
2
|
+
import { DateRangeFilter } from "@/types/time";
|
|
3
|
+
export type CameraExid = string;
|
|
3
4
|
export type CamerasByExid = EntityByExid<Camera>;
|
|
4
5
|
export type Cartesian3 = {
|
|
5
6
|
x: number;
|
|
@@ -17,7 +18,7 @@ export type Camera = {
|
|
|
17
18
|
storageDuration: string;
|
|
18
19
|
};
|
|
19
20
|
createdAt: DateTime_Z_micros;
|
|
20
|
-
description: null;
|
|
21
|
+
description: string | null;
|
|
21
22
|
discoverable: boolean;
|
|
22
23
|
external: {
|
|
23
24
|
host: string;
|
|
@@ -62,7 +63,7 @@ export type Camera = {
|
|
|
62
63
|
offlineReason: string;
|
|
63
64
|
owned: boolean;
|
|
64
65
|
owner: string;
|
|
65
|
-
pitch: null;
|
|
66
|
+
pitch: string | null;
|
|
66
67
|
project: {
|
|
67
68
|
id: string;
|
|
68
69
|
name: string;
|
|
@@ -73,7 +74,7 @@ export type Camera = {
|
|
|
73
74
|
};
|
|
74
75
|
ptz: boolean;
|
|
75
76
|
rights: string;
|
|
76
|
-
roll: null;
|
|
77
|
+
roll: string | null;
|
|
77
78
|
routerId: number;
|
|
78
79
|
status: CameraStatus;
|
|
79
80
|
streamingServer: string;
|
|
@@ -82,6 +83,8 @@ export type Camera = {
|
|
|
82
83
|
timezone: string;
|
|
83
84
|
updatedAt: DateTime_Z_micros;
|
|
84
85
|
vendorName: string;
|
|
86
|
+
isAccessRestricted?: boolean;
|
|
87
|
+
kitAlarms?: string[];
|
|
85
88
|
};
|
|
86
89
|
export type AdminCamera = {
|
|
87
90
|
cameraHost: string;
|
|
@@ -133,7 +136,7 @@ export type AdminCamera = {
|
|
|
133
136
|
pitch: null;
|
|
134
137
|
powerSchedule: Schedule;
|
|
135
138
|
projectExid: string;
|
|
136
|
-
projectFeatureFlags: [];
|
|
139
|
+
projectFeatureFlags: ProjectFeatureFlag[];
|
|
137
140
|
projectId: number;
|
|
138
141
|
projectName: string;
|
|
139
142
|
ptz: false;
|
|
@@ -174,9 +177,18 @@ export declare enum CameraStatus {
|
|
|
174
177
|
UnderMaintenance = "under_maintenance",
|
|
175
178
|
WaitingForSiteVisit = "waiting_for_site_visit"
|
|
176
179
|
}
|
|
180
|
+
export declare enum IntensityChangeColors {
|
|
181
|
+
High = "#FF5252",
|
|
182
|
+
Moderate = "#FBC02D",
|
|
183
|
+
Low = "#006400",
|
|
184
|
+
NoChange = "#3ACF3A",
|
|
185
|
+
Default = "black"
|
|
186
|
+
}
|
|
177
187
|
export declare enum CameraFeatureFlag {
|
|
178
188
|
EdgeVideo = "edge_video",
|
|
179
189
|
BimCompare = "bim_compare",
|
|
190
|
+
TwoDBimCompare = "2d_bim_compare",
|
|
191
|
+
ForgeBIMCompare = "forge_bim_compare",
|
|
180
192
|
GateReport = "gate_report",
|
|
181
193
|
VideoStream = "video_stream",
|
|
182
194
|
WebRTC = "webrtc",
|
|
@@ -185,7 +197,8 @@ export declare enum CameraFeatureFlag {
|
|
|
185
197
|
PTZ = "ptz",
|
|
186
198
|
ObjectDetection = "object_detection",
|
|
187
199
|
Segmentation = "segmentation",
|
|
188
|
-
SegmentationAutoLabelling = "segmentation_auto_labelling"
|
|
200
|
+
SegmentationAutoLabelling = "segmentation_auto_labelling",
|
|
201
|
+
PpeMonitoring = "ppe_monitoring"
|
|
189
202
|
}
|
|
190
203
|
export type CameraLogsRequestPayload = {
|
|
191
204
|
limit: number;
|
|
@@ -227,6 +240,8 @@ export type CameraUpdateRequestPayload = {
|
|
|
227
240
|
heading?: number;
|
|
228
241
|
fovAngle?: number;
|
|
229
242
|
fovRadius?: number;
|
|
243
|
+
featureFlags: CameraFeatureFlag[];
|
|
244
|
+
isAccessRestricted?: boolean;
|
|
230
245
|
};
|
|
231
246
|
export type CamerasResponsePayload = {
|
|
232
247
|
cameras?: Camera[];
|
|
@@ -320,56 +335,6 @@ export type Hdd = {
|
|
|
320
335
|
errorStatus: string;
|
|
321
336
|
canExpand: boolean;
|
|
322
337
|
};
|
|
323
|
-
export declare enum ResolutionDimensions {
|
|
324
|
-
QVGA = "320x240",
|
|
325
|
-
VGA = "640x480",
|
|
326
|
-
SVGA = "800x600",
|
|
327
|
-
XGA = "1024x768",
|
|
328
|
-
HD = "1280x720",
|
|
329
|
-
WXGA = "1280x800",
|
|
330
|
-
HDPlus = "1366x768",
|
|
331
|
-
WXGAPlus = "1440x900",
|
|
332
|
-
HDPlusPlus = "1600x900",
|
|
333
|
-
UXGA = "1600x1200",
|
|
334
|
-
FullHD = "1920x1080",
|
|
335
|
-
WUXGA = "1920x1200",
|
|
336
|
-
TwoK = "2048x1080",
|
|
337
|
-
QHD = "2560x1440",
|
|
338
|
-
WQXGA = "2560x1600",
|
|
339
|
-
FourK = "3840x2160",
|
|
340
|
-
FourKCinema = "4096x2160",
|
|
341
|
-
FiveK = "5120x2880",
|
|
342
|
-
EightK = "7680x4320",
|
|
343
|
-
WHUXGA = "7680x4800"
|
|
344
|
-
}
|
|
345
|
-
export declare enum ResolutionLabel {
|
|
346
|
-
QVGA = "QVGA",
|
|
347
|
-
VGA = "VGA",
|
|
348
|
-
SVGA = "SVGA",
|
|
349
|
-
XGA = "XGA",
|
|
350
|
-
HD = "HD",
|
|
351
|
-
WXGA = "WXGA",
|
|
352
|
-
HDPlus = "HD+",
|
|
353
|
-
WXGAPlus = "WXGA++",
|
|
354
|
-
HDPlusPlus = "HD++",
|
|
355
|
-
UXGA = "UXGA",
|
|
356
|
-
FullHD = "FullHD",
|
|
357
|
-
WUXGA = "WUXGA",
|
|
358
|
-
TwoK = "2K",
|
|
359
|
-
QHD = "QHD",
|
|
360
|
-
WQXGA = "WQXGA",
|
|
361
|
-
FourK = "4K",
|
|
362
|
-
FourKCinema = "4KCinema",
|
|
363
|
-
FiveK = "5K",
|
|
364
|
-
EightK = "8K",
|
|
365
|
-
WHUXGA = "WHUXGA"
|
|
366
|
-
}
|
|
367
|
-
export type ResolutionInfo = {
|
|
368
|
-
ratioString: string;
|
|
369
|
-
ratioFloat: number;
|
|
370
|
-
resolutionDimensions: ResolutionDimensions;
|
|
371
|
-
resolutionLabel: ResolutionLabel;
|
|
372
|
-
};
|
|
373
338
|
export type CameraPath = {
|
|
374
339
|
projectExid: ProjectExid;
|
|
375
340
|
cameraExid: CameraExid;
|
|
@@ -377,6 +342,7 @@ export type CameraPath = {
|
|
|
377
342
|
export type CheckCameraPortPayload = {
|
|
378
343
|
address: string;
|
|
379
344
|
port: number;
|
|
345
|
+
open: boolean;
|
|
380
346
|
};
|
|
381
347
|
export type CameraCreateRequestPayload = {
|
|
382
348
|
status: CameraStatus;
|
|
@@ -561,3 +527,10 @@ export type FetchCameraQueryParams = PaginationParams & {
|
|
|
561
527
|
externalRsptPort: string;
|
|
562
528
|
nvrHttpPort: string;
|
|
563
529
|
};
|
|
530
|
+
export declare enum BimType {
|
|
531
|
+
TwoD = "2D",
|
|
532
|
+
Forge = "Forge"
|
|
533
|
+
}
|
|
534
|
+
export type CameraDateRangeFilter = DateRangeFilter & {
|
|
535
|
+
cameraExid: CameraExid;
|
|
536
|
+
};
|
package/dist/types/comments.d.ts
CHANGED
|
@@ -1,14 +1,31 @@
|
|
|
1
|
-
import { CameraExid, DateType, ProjectExid } from "@/types";
|
|
1
|
+
import { CameraExid, DateType, ProjectExid, PaginationParams } from "@/types";
|
|
2
|
+
export declare enum CommentsScope {
|
|
3
|
+
Recordings = "recordings",
|
|
4
|
+
ThreeSixty = "360",
|
|
5
|
+
Drone = "drone"
|
|
6
|
+
}
|
|
7
|
+
export declare enum CommentsLabel {
|
|
8
|
+
Info = "Info",
|
|
9
|
+
Danger = "Danger",
|
|
10
|
+
Restricted = "Restricted"
|
|
11
|
+
}
|
|
2
12
|
export type CommentsRequestPayload = {
|
|
3
13
|
cameraExid: CameraExid;
|
|
4
14
|
fromDate: string;
|
|
5
15
|
toDate: string;
|
|
16
|
+
scope: CommentsScope;
|
|
6
17
|
page?: number;
|
|
7
18
|
limit?: number;
|
|
8
19
|
};
|
|
9
|
-
export type
|
|
10
|
-
|
|
11
|
-
|
|
20
|
+
export type CommentsListRequestPayload = PaginationParams & {
|
|
21
|
+
projectExid?: ProjectExid;
|
|
22
|
+
cameraExid?: CameraExid;
|
|
23
|
+
fromDate?: string;
|
|
24
|
+
toDate?: string;
|
|
25
|
+
scope?: CommentsScope;
|
|
26
|
+
creatorEmail?: string;
|
|
27
|
+
content?: string;
|
|
28
|
+
includeArchived?: boolean;
|
|
12
29
|
};
|
|
13
30
|
export type Comment = {
|
|
14
31
|
fromDate?: string;
|
|
@@ -22,15 +39,21 @@ export type Comment = {
|
|
|
22
39
|
createdAt?: string;
|
|
23
40
|
creatorEmail?: string;
|
|
24
41
|
creatorName?: string;
|
|
25
|
-
position2d
|
|
42
|
+
position2d?: [number, number];
|
|
43
|
+
position3d?: [number, number, number];
|
|
44
|
+
context?: Record<string, unknown>;
|
|
26
45
|
canDelete?: boolean;
|
|
46
|
+
archivedAt?: string;
|
|
27
47
|
};
|
|
28
48
|
export type CommentCreationRequestPayload = {
|
|
29
49
|
fromDate?: DateType;
|
|
30
50
|
toDate?: DateType;
|
|
31
|
-
timestamp
|
|
51
|
+
timestamp?: DateType;
|
|
52
|
+
scope?: CommentsScope;
|
|
32
53
|
projectExid: ProjectExid;
|
|
33
|
-
cameraExid
|
|
54
|
+
cameraExid?: CameraExid;
|
|
34
55
|
content: string;
|
|
35
|
-
position2d
|
|
56
|
+
position2d?: [number, number];
|
|
57
|
+
position3d?: [number, number, number];
|
|
58
|
+
context?: Record<string, unknown>;
|
|
36
59
|
};
|
package/dist/types/company.d.ts
CHANGED
|
@@ -13,6 +13,34 @@ export type CompanyProject = {
|
|
|
13
13
|
status: string;
|
|
14
14
|
startedAt: DateType;
|
|
15
15
|
};
|
|
16
|
+
export type CompanyKit = {
|
|
17
|
+
id: number;
|
|
18
|
+
name: string;
|
|
19
|
+
serial: string;
|
|
20
|
+
status: string;
|
|
21
|
+
powerType: string;
|
|
22
|
+
countryName: string;
|
|
23
|
+
nvrId: string;
|
|
24
|
+
nvrSerial: string;
|
|
25
|
+
nvrVersion: string;
|
|
26
|
+
nvrNerves: boolean;
|
|
27
|
+
nvrModel: string;
|
|
28
|
+
nvrDeviceType: string;
|
|
29
|
+
routerId: string;
|
|
30
|
+
routerSerial: string;
|
|
31
|
+
projectExid: string;
|
|
32
|
+
projectName: string;
|
|
33
|
+
alarms: Array<string>;
|
|
34
|
+
sims: Array<{
|
|
35
|
+
id: number;
|
|
36
|
+
number: string;
|
|
37
|
+
}>;
|
|
38
|
+
cameras: Array<{
|
|
39
|
+
exid: string;
|
|
40
|
+
name: string;
|
|
41
|
+
status: string;
|
|
42
|
+
}>;
|
|
43
|
+
};
|
|
16
44
|
export type Company = {
|
|
17
45
|
id: number;
|
|
18
46
|
exid: string;
|
|
@@ -25,7 +53,7 @@ export type Company = {
|
|
|
25
53
|
cameras: number;
|
|
26
54
|
users: number;
|
|
27
55
|
activeUsers: number;
|
|
28
|
-
|
|
56
|
+
insertedAt: DateType;
|
|
29
57
|
};
|
|
30
58
|
export type CompanyQueryParams = PaginationParams & {
|
|
31
59
|
name: string;
|
|
@@ -7,7 +7,12 @@ export declare enum Connector {
|
|
|
7
7
|
Procore = "procore",
|
|
8
8
|
Autodesk = "autodesk",
|
|
9
9
|
AutodeskViewer = "autodesk_viewer",
|
|
10
|
-
VoyageControl = "voyage_control"
|
|
10
|
+
VoyageControl = "voyage_control",
|
|
11
|
+
XWeather = "xweather"
|
|
12
|
+
}
|
|
13
|
+
export declare enum ProcoreType {
|
|
14
|
+
Observations = "observations",
|
|
15
|
+
Photos = "photos"
|
|
11
16
|
}
|
|
12
17
|
export type ConnectorResponsePayload = Array<{
|
|
13
18
|
hostname: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DateType } from "@/types/time";
|
|
2
|
+
export type CreateCoolifyAppRequestPayload = {
|
|
3
|
+
cameraExid: string;
|
|
4
|
+
startDate: DateType;
|
|
5
|
+
modelVersion: string;
|
|
6
|
+
snapshotRequestTimeout: string | number;
|
|
7
|
+
serverUuid: string;
|
|
8
|
+
branch: string;
|
|
9
|
+
useThirdParty: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type SaveCoolifyAppRequestPayload = {
|
|
12
|
+
contextCameraExid: string;
|
|
13
|
+
coolifyServiceId: string;
|
|
14
|
+
modelVersion: string;
|
|
15
|
+
startTime: string;
|
|
16
|
+
branchName: string;
|
|
17
|
+
snapshotRequestTimeout: string | number;
|
|
18
|
+
serverUuid: string;
|
|
19
|
+
useThirdParty: boolean;
|
|
20
|
+
};
|
package/dist/types/copilot.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AnalyticsEventPageId, CameraExid, CameraFeatureFlag, CameraStatus, ProjectExid, ProjectFeatureFlag, ProjectStatus } from "@/types";
|
|
2
2
|
export declare enum CopilotMessageAuthor {
|
|
3
3
|
Copilot = "copilot",
|
|
4
|
-
User = "user"
|
|
4
|
+
User = "user",
|
|
5
|
+
System = "system"
|
|
5
6
|
}
|
|
6
7
|
export declare enum CopilotMessageType {
|
|
7
8
|
Text = "text",
|
|
@@ -33,12 +34,13 @@ export declare enum CopilotMissingFieldsLabels {
|
|
|
33
34
|
FromDate = "Start date",
|
|
34
35
|
ToDate = "End date"
|
|
35
36
|
}
|
|
36
|
-
export type CopilotMissingField = {
|
|
37
|
+
export type CopilotMissingField<T = any> = {
|
|
37
38
|
name: string;
|
|
38
39
|
label: string;
|
|
39
40
|
value: any;
|
|
40
41
|
type: string;
|
|
41
42
|
toolId: string;
|
|
43
|
+
error?: T;
|
|
42
44
|
};
|
|
43
45
|
export type CopilotMissingFields = Record<number, CopilotMissingField[]>;
|
|
44
46
|
export type UserConversations = CopilotConversation & {
|
|
@@ -57,7 +59,8 @@ export declare enum CopilotSocketEvent {
|
|
|
57
59
|
ChatError = "chat:chatError",
|
|
58
60
|
MissingFields = "chat:missingFields",
|
|
59
61
|
MissingFieldsCompleted = "chat:missingFields:completed",
|
|
60
|
-
SystemToolCallResponse = "system:toolCall:response"
|
|
62
|
+
SystemToolCallResponse = "system:toolCall:response",
|
|
63
|
+
ChangeProvider = "chat:changeProvider"
|
|
61
64
|
}
|
|
62
65
|
export type CopilotConversation = {
|
|
63
66
|
id: number;
|
|
@@ -79,7 +82,8 @@ export declare enum CopilotSuggestion {
|
|
|
79
82
|
GateReport = "gate_report",
|
|
80
83
|
Weather = "weather",
|
|
81
84
|
Clip = "clip",
|
|
82
|
-
Timelapse = "timelapse"
|
|
85
|
+
Timelapse = "timelapse",
|
|
86
|
+
Chart = "chart"
|
|
83
87
|
}
|
|
84
88
|
export declare enum CopilotChatProvider {
|
|
85
89
|
Gemini = "gemini",
|
|
@@ -117,9 +121,6 @@ export type CopilotProject = {
|
|
|
117
121
|
featureFlags?: ProjectFeatureFlag[];
|
|
118
122
|
cameras?: CopilotCamera[];
|
|
119
123
|
};
|
|
120
|
-
export type CopilotConversationContext = {
|
|
121
|
-
availableProjects: CopilotProject[];
|
|
122
|
-
};
|
|
123
124
|
export type CopilotMessageContext = {
|
|
124
125
|
pageId?: AnalyticsEventPageId;
|
|
125
126
|
selectedCamera?: CopilotCamera;
|
|
@@ -128,8 +129,8 @@ export type CopilotMessageContext = {
|
|
|
128
129
|
export type CopilotMessageStep = {
|
|
129
130
|
args: string[];
|
|
130
131
|
depth: number;
|
|
131
|
-
id
|
|
132
|
-
message_id
|
|
132
|
+
id?: number;
|
|
133
|
+
message_id?: number;
|
|
133
134
|
step: CopilotStepId;
|
|
134
135
|
timestamp: string;
|
|
135
136
|
};
|
|
@@ -153,3 +154,4 @@ export declare enum CopilotMissingFieldType {
|
|
|
153
154
|
String = "string",
|
|
154
155
|
Number = "number"
|
|
155
156
|
}
|
|
157
|
+
export type CopilotCompletedFields = Record<string, unknown>;
|
|
@@ -490,13 +490,6 @@ export declare enum CountryCode {
|
|
|
490
490
|
Zambia = "zm",
|
|
491
491
|
Zimbabwe = "zw"
|
|
492
492
|
}
|
|
493
|
-
export declare enum Region {
|
|
494
|
-
Apac = "apac",
|
|
495
|
-
Emea = "emea",
|
|
496
|
-
Us = "us",
|
|
497
|
-
Latam = "latam",
|
|
498
|
-
Na = "na"
|
|
499
|
-
}
|
|
500
493
|
export declare enum CameraRegion {
|
|
501
494
|
APAC = "apac",
|
|
502
495
|
AU = "au",
|
|
@@ -1,14 +1,53 @@
|
|
|
1
|
-
import { type CameraExid, type DateType, DetectionLabel, SegmentLabel, type TimelineDateInterval, TimelinePrecision } from "@/types";
|
|
2
|
-
export type
|
|
3
|
-
cameraExid: CameraExid;
|
|
1
|
+
import { type BoundingBox, type ProjectExid, type CameraExid, type DateType, DetectionLabel, SegmentLabel, type TimelineDateInterval, TimelinePrecision, DateRangeFilter, ProjectDateRangeFilter, CameraDateRangeFilter } from "@/types";
|
|
2
|
+
export type BaseDetectionsFilters = {
|
|
4
3
|
fromDate: string | Date;
|
|
5
4
|
toDate: string | Date;
|
|
6
5
|
labels: DetectionLabel | DetectionLabel[];
|
|
6
|
+
trackId?: number;
|
|
7
|
+
};
|
|
8
|
+
export type DetectionsFilters = BaseDetectionsFilters & {
|
|
9
|
+
projectExid: ProjectExid;
|
|
10
|
+
cameraExids?: CameraExid[];
|
|
11
|
+
};
|
|
12
|
+
export type SegmentsFilters = BaseDetectionsFilters & {
|
|
13
|
+
cameraExid: CameraExid;
|
|
7
14
|
};
|
|
8
|
-
export type BBox = [
|
|
15
|
+
export type BBox = number[];
|
|
16
|
+
export type SelectedObjectPath = {
|
|
17
|
+
label: string;
|
|
18
|
+
trackId: string;
|
|
19
|
+
paths: Array<{
|
|
20
|
+
timestamp: number;
|
|
21
|
+
center: [number, number];
|
|
22
|
+
bbox: BBox;
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
25
|
+
export type Label = DetectionLabel | PpeLabel;
|
|
9
26
|
export type Detection = {
|
|
10
27
|
bbox: BBox;
|
|
11
28
|
timestamp: string | Date;
|
|
29
|
+
label: DetectionLabel;
|
|
30
|
+
confidenceScore: number;
|
|
31
|
+
};
|
|
32
|
+
export type DetectionsGroup = {
|
|
33
|
+
timestamp: DateType;
|
|
34
|
+
detections: Detection[];
|
|
35
|
+
};
|
|
36
|
+
export type DetectionsCounts = {
|
|
37
|
+
timestamps: number;
|
|
38
|
+
} & {
|
|
39
|
+
[label in Label]: number;
|
|
40
|
+
};
|
|
41
|
+
export type DetectionsCountsByPeriod = {
|
|
42
|
+
days: Array<{
|
|
43
|
+
day: string;
|
|
44
|
+
} & DetectionsCounts>;
|
|
45
|
+
months: Array<{
|
|
46
|
+
month: string;
|
|
47
|
+
} & DetectionsCounts>;
|
|
48
|
+
years: Array<{
|
|
49
|
+
year: string;
|
|
50
|
+
} & DetectionsCounts>;
|
|
12
51
|
};
|
|
13
52
|
export type Tracking = {
|
|
14
53
|
trackId: number;
|
|
@@ -22,37 +61,33 @@ export type SegmentsByLabel = Record<SegmentLabel, Segment[]>;
|
|
|
22
61
|
export type SegmentPolygonCoords = number[][];
|
|
23
62
|
export type Segment = {
|
|
24
63
|
id: number;
|
|
25
|
-
mask
|
|
64
|
+
mask?: SegmentPolygonCoords;
|
|
26
65
|
label: string;
|
|
27
66
|
timestamp: string | Date;
|
|
67
|
+
cameraExid?: CameraExid;
|
|
68
|
+
bbox?: BoundingBox;
|
|
69
|
+
area?: number;
|
|
28
70
|
};
|
|
29
71
|
export type SegmentSimilarityResult = {
|
|
30
72
|
distance: number;
|
|
31
73
|
segment: Segment;
|
|
32
74
|
};
|
|
33
|
-
export type SegmentsSimilaritySearchResult = {
|
|
34
|
-
firstSeen: DateType | null;
|
|
35
|
-
lastSeen: DateType | null;
|
|
36
|
-
similarSegments: SegmentSimilarityResult[];
|
|
37
|
-
};
|
|
38
75
|
export type SegmentsSimilaritySearchParams = {
|
|
39
76
|
cameraExid: CameraExid;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
areaTolerance: number;
|
|
77
|
+
referenceId: string;
|
|
78
|
+
iouThreshold?: number;
|
|
79
|
+
fromDate: string;
|
|
80
|
+
toDate: string;
|
|
45
81
|
};
|
|
46
|
-
export type
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
precision: TimelinePrecision;
|
|
82
|
+
export type BaseCountsParams = DateRangeFilter & {
|
|
83
|
+
precision: keyof typeof TimelinePrecision;
|
|
84
|
+
trackId: number;
|
|
85
|
+
labels: DetectionLabel | DetectionLabel[];
|
|
51
86
|
};
|
|
52
|
-
export type
|
|
53
|
-
|
|
54
|
-
counts: Record<string, number>;
|
|
87
|
+
export type DetectionsCountsParams = ProjectDateRangeFilter & BaseCountsParams & {
|
|
88
|
+
cameraExids?: CameraExid[];
|
|
55
89
|
};
|
|
90
|
+
export type SegmentsCountsParams = CameraDateRangeFilter & BaseCountsParams;
|
|
56
91
|
export type DetectionsPresenceByLabel = Record<DetectionLabel, TimelineDateInterval[]>;
|
|
57
92
|
export type SegmentsPresenceByLabel = Record<SegmentLabel, TimelineDateInterval[]>;
|
|
58
93
|
export type LuminanceReading = {
|
|
@@ -60,3 +95,18 @@ export type LuminanceReading = {
|
|
|
60
95
|
luminanceDelta: number;
|
|
61
96
|
luminanceAverage: number;
|
|
62
97
|
};
|
|
98
|
+
export declare enum PpeLabel {
|
|
99
|
+
Helmet = "helmet",
|
|
100
|
+
HighVisibilityVest = "high-visibility-vest",
|
|
101
|
+
SafetyGlasses = "safety-glasses",
|
|
102
|
+
Person = "person",
|
|
103
|
+
Man = "man",
|
|
104
|
+
Woman = "woman"
|
|
105
|
+
}
|
|
106
|
+
export declare enum DetectionModel {
|
|
107
|
+
Yolov10 = 1,
|
|
108
|
+
Yolov11 = 2,
|
|
109
|
+
Yolov112 = 3,
|
|
110
|
+
GroundingDino = 4,
|
|
111
|
+
Owlv2 = 5
|
|
112
|
+
}
|
package/dist/types/errors.d.ts
CHANGED
|
@@ -14,12 +14,25 @@ export declare enum ErrorType {
|
|
|
14
14
|
UnhandledRejection = "UnhandledRejection",
|
|
15
15
|
TypeError = "TypeError"
|
|
16
16
|
}
|
|
17
|
+
export declare enum ErrorCode {
|
|
18
|
+
InternalServerError = 500,
|
|
19
|
+
BadGatewayError = 502,
|
|
20
|
+
ServiceUnavailableError = 503,
|
|
21
|
+
GatewayTimeoutError = 504,
|
|
22
|
+
BadRequestError = 400,
|
|
23
|
+
UnauthorizedError = 401,
|
|
24
|
+
ForbiddenError = 403,
|
|
25
|
+
NotFoundError = 404,
|
|
26
|
+
ConflictError = 409
|
|
27
|
+
}
|
|
17
28
|
export declare enum EvercamApiErrorCode {
|
|
29
|
+
IntegrationError = "INTEGRATION_ERROR",
|
|
18
30
|
BadArgument = "BAD_ARGUMENT",
|
|
19
31
|
DeviceError = "DEVICE_ERROR",
|
|
20
32
|
UnsupportedOperation = "UNSUPPORTED_OPERATION",
|
|
21
33
|
QuotaExceeded = "QUOTA_EXCEEDED",
|
|
22
34
|
InvalidCredentials = "INVALID_CREDENTIALS",
|
|
35
|
+
InvalidToken = "INVALID_TOKEN",
|
|
23
36
|
ProviderAuthFailure = "PROVIDER_AUTH_FAILURE",
|
|
24
37
|
ProviderEmailRequired = "PROVIDER_EMAIL_REQUIRED",
|
|
25
38
|
PasswordReset = "PASSWORD_RESET",
|
|
@@ -40,7 +40,56 @@ export declare enum DetectionLabel {
|
|
|
40
40
|
TruckMixer = "truck-mixer",
|
|
41
41
|
TruckMountedMobileCrane = "truck-mounted-mobile-crane",
|
|
42
42
|
Unknown = "unknown",
|
|
43
|
-
Worker = "worker"
|
|
43
|
+
Worker = "worker",
|
|
44
|
+
Rubble = "rubble",
|
|
45
|
+
Puddle = "puddle",
|
|
46
|
+
DirtGravelCementPile = "dirt_gravel_cement_pile",
|
|
47
|
+
DetachedExcavatorBucket = "detached_excavator_bucket",
|
|
48
|
+
IntermediateBulkContainer = "intermediate_bulk_container",
|
|
49
|
+
WoodenPallet = "wooden_pallet",
|
|
50
|
+
ShippingContainer = "shipping_container",
|
|
51
|
+
AirCompressor = "air_compressor",
|
|
52
|
+
DryMortarSilo = "dry_mortar_silo",
|
|
53
|
+
Fence = "fence",
|
|
54
|
+
Brick = "brick",
|
|
55
|
+
Barrel = "barrel",
|
|
56
|
+
Cardboard = "cardboard",
|
|
57
|
+
CardboardBox = "cardboard_box",
|
|
58
|
+
CementBag = "cement_bag",
|
|
59
|
+
ConcreteBlock = "concrete_block",
|
|
60
|
+
ConcretePipe = "concrete_pipe",
|
|
61
|
+
ConcreteSlab = "concrete_slab",
|
|
62
|
+
PlasticWrap = "plastic_wrap",
|
|
63
|
+
ContainerOffice = "container_office",
|
|
64
|
+
ElectricalPole = "electrical_pole",
|
|
65
|
+
ElectricalBox = "electrical_box",
|
|
66
|
+
FireHydrant = "fire_hydrant",
|
|
67
|
+
HoseReel = "hose_reel",
|
|
68
|
+
Ladder = "ladder",
|
|
69
|
+
MetalBeam = "metal_beam",
|
|
70
|
+
MetalPipe = "metal_pipe",
|
|
71
|
+
Pallet = "pallet",
|
|
72
|
+
Pillar = "pillar",
|
|
73
|
+
PlasticBin = "plastic_bin",
|
|
74
|
+
PlasticBucket = "plastic_bucket",
|
|
75
|
+
PlasticPipe = "plastic_pipe",
|
|
76
|
+
PublicToilet = "public_toilet",
|
|
77
|
+
Sign = "sign",
|
|
78
|
+
SiteToolbox = "site_toolbox",
|
|
79
|
+
StreetSink = "street_sink",
|
|
80
|
+
TrafficBarrier = "traffic_barrier",
|
|
81
|
+
TrafficCone = "traffic_cone",
|
|
82
|
+
Wall = "wall",
|
|
83
|
+
WasteContainer = "waste_container",
|
|
84
|
+
WaterStorageTank = "water_storage_tank",
|
|
85
|
+
Wheelbarrow = "wheelbarrow",
|
|
86
|
+
Window = "window",
|
|
87
|
+
WoodPlank = "wood_plank",
|
|
88
|
+
CableReel = "cable_reel",
|
|
89
|
+
AirConditioningSystem = "air_conditioning_system",
|
|
90
|
+
WoodenBox = "wooden_box",
|
|
91
|
+
PlasticBag = "plastic_bag",
|
|
92
|
+
MaterialStack = "material_stack"
|
|
44
93
|
}
|
|
45
94
|
export declare enum SegmentLabel {
|
|
46
95
|
AirCompressor = "air_compressor",
|