@evercam/api 1.0.0-9a767ebbe → 1.0.0-9c3cd2ae7

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.
Files changed (55) hide show
  1. package/README.md +1 -0
  2. package/dist/api/api/3dFirebaseApi.d.ts +60 -27
  3. package/dist/api/api/adminApi.d.ts +19 -15
  4. package/dist/api/api/aiApi.d.ts +60 -2
  5. package/dist/api/api/authzApi.d.ts +4 -1
  6. package/dist/api/api/evercamApi.d.ts +29 -8
  7. package/dist/api/api/evercamLabsApi.d.ts +5 -5
  8. package/dist/api/api/ingestApi.d.ts +13 -3
  9. package/dist/api/types/360.d.ts +142 -4
  10. package/dist/api/types/aiConfigs.d.ts +154 -0
  11. package/dist/api/types/analytics.d.ts +34 -11
  12. package/dist/api/types/anpr.d.ts +31 -2
  13. package/dist/api/types/auditLogs.d.ts +18 -0
  14. package/dist/api/types/authz.d.ts +46 -0
  15. package/dist/api/types/axios.d.ts +8 -5
  16. package/dist/api/types/bim.d.ts +26 -1
  17. package/dist/api/types/camera.d.ts +8 -3
  18. package/dist/api/types/comments.d.ts +10 -7
  19. package/dist/api/types/connector.d.ts +2 -0
  20. package/dist/api/types/detections.d.ts +3 -10
  21. package/dist/api/types/drone.d.ts +6 -5
  22. package/dist/api/types/errors.d.ts +11 -0
  23. package/dist/api/types/gateReport.d.ts +1 -0
  24. package/dist/api/types/gateReportManagement.d.ts +175 -0
  25. package/dist/api/types/hammertech.d.ts +98 -0
  26. package/dist/api/types/index.d.ts +6 -0
  27. package/dist/api/types/ingest.d.ts +15 -3
  28. package/dist/api/types/kit.d.ts +38 -2
  29. package/dist/api/types/media.d.ts +8 -2
  30. package/dist/api/types/notification.d.ts +12 -2
  31. package/dist/api/types/observations.d.ts +85 -0
  32. package/dist/api/types/planner.d.ts +2 -3
  33. package/dist/api/types/posthog.d.ts +20 -0
  34. package/dist/api/types/recording.d.ts +5 -9
  35. package/dist/api/types/roi.d.ts +2 -1
  36. package/dist/api/types/routeParams.d.ts +1 -0
  37. package/dist/api/types/shared.d.ts +1 -0
  38. package/dist/api/types/siteAnalytics.d.ts +3 -3
  39. package/dist/api/types/siteAnalyticsManagement.d.ts +92 -0
  40. package/dist/api/types/siteView.d.ts +0 -1
  41. package/dist/api/types/snapshots.d.ts +13 -0
  42. package/dist/api/types/socket.d.ts +4 -0
  43. package/dist/api/types/timelapse.d.ts +2 -6
  44. package/dist/api/types/user.d.ts +1 -4
  45. package/dist/api/utils.d.ts +0 -1
  46. package/dist/index.js +1272 -806
  47. package/dist/index.js.map +1 -1
  48. package/dist/index.umd.cjs +1 -1
  49. package/dist/index.umd.cjs.map +1 -1
  50. package/dist/shared/types/components.d.ts +78 -5
  51. package/dist/shared/types/customDataTableFilters.d.ts +10 -0
  52. package/dist/shared/types/imagePlayer.d.ts +8 -1
  53. package/dist/shared/types/index.d.ts +2 -0
  54. package/dist/shared/types/observations.d.ts +21 -0
  55. package/package.json +4 -2
@@ -0,0 +1,85 @@
1
+ import { type ProjectExid, type CameraExid, type DateType, type BBox, PpeLabel, DownloadFileType } from "@evercam/api/types";
2
+ export declare enum ObservationItemState {
3
+ Absent = 0,
4
+ Present = 1,
5
+ NotVisible = 2
6
+ }
7
+ export type ObservationEventEquipment = {
8
+ score: number;
9
+ bbox: BBox;
10
+ };
11
+ export type ObservationEvent = {
12
+ id: number;
13
+ cameraExid: CameraExid;
14
+ projectExid: ProjectExid;
15
+ capturedAt: DateType;
16
+ personIndex: number;
17
+ personBbox: BBox;
18
+ personScore: number;
19
+ ppe: Partial<Record<PpeLabel, ObservationEventEquipment>>;
20
+ hasHelmet: ObservationItemState | null;
21
+ hasHighVisVest: ObservationItemState | null;
22
+ hasGloves: ObservationItemState | null;
23
+ hasGlasses: ObservationItemState | null;
24
+ modelVersion: string;
25
+ createdAt: DateType;
26
+ compliant: boolean;
27
+ reason: string | null;
28
+ isApproved: boolean | null;
29
+ };
30
+ export type ObservationEventsQueryParams = {
31
+ cameraExid?: CameraExid;
32
+ fromDate?: string;
33
+ toDate?: string;
34
+ required?: string;
35
+ compliant?: boolean;
36
+ hasHelmet?: boolean;
37
+ hasHighVisVest?: boolean;
38
+ hasGloves?: boolean;
39
+ hasGlasses?: boolean;
40
+ sort?: string;
41
+ page?: number;
42
+ limit?: number;
43
+ };
44
+ export type ObservationEventsExportQueryParams = {
45
+ cameraExid?: CameraExid;
46
+ fromDate: string;
47
+ toDate: string;
48
+ required?: string;
49
+ compliant?: boolean;
50
+ fileType: DownloadFileType;
51
+ directDownload?: boolean;
52
+ includeInvalid?: boolean;
53
+ };
54
+ export type ObservationApprovalUpdateResponse = {
55
+ updated: boolean;
56
+ id: number | string | null;
57
+ message: string;
58
+ };
59
+ export declare enum ObservationCountsGranularity {
60
+ Day = "day",
61
+ Week = "week",
62
+ Month = "month"
63
+ }
64
+ export type ObservationEventsCountsQueryParams = {
65
+ cameraExid?: CameraExid;
66
+ fromDate?: string;
67
+ toDate?: string;
68
+ required?: string;
69
+ compliant?: boolean;
70
+ hasHelmet?: boolean;
71
+ hasHighVisVest?: boolean;
72
+ hasGloves?: boolean;
73
+ hasGlasses?: boolean;
74
+ granularity?: ObservationCountsGranularity;
75
+ };
76
+ export type ObservationEventCount = {
77
+ bucket: DateType;
78
+ total: number;
79
+ compliant: number;
80
+ nonCompliant: number;
81
+ };
82
+ export declare enum ObservationRequiredItem {
83
+ Helmet = "has_helmet",
84
+ HighVisVest = "has_high_vis_vest"
85
+ }
@@ -1,4 +1,4 @@
1
- import { GeoPoint } from "./shared";
1
+ import { GeoPoint, TuplePoint2D } from "./shared";
2
2
  import { MapType } from "./map";
3
3
  export type PlannerListItem = {
4
4
  id: string;
@@ -15,8 +15,7 @@ export type PlannerListItem = {
15
15
  projectMapType?: MapType;
16
16
  sessionId?: string;
17
17
  };
18
- export type Coordinate = [number, number];
19
- export type PolygonPath = Coordinate[];
18
+ export type PolygonPath = TuplePoint2D[];
20
19
  export type PolygonCoordinates = PolygonPath[];
21
20
  export interface GeoJSONPolygon {
22
21
  type: "Polygon";
@@ -16,6 +16,26 @@ export declare enum ActiveUsersMetric {
16
16
  WAU = "wau",
17
17
  MAU = "mau"
18
18
  }
19
+ export type PosthogUser = {
20
+ id: string;
21
+ email: string;
22
+ isWeeklyActiveUser: number;
23
+ isMonthlyActiveUser: number;
24
+ eventsCount: number;
25
+ };
26
+ export type PosthogUsersRequestParams = {
27
+ companyExid?: string;
28
+ projectExid?: string;
29
+ cameraExid?: string;
30
+ productsActivityOnly?: boolean;
31
+ afterId?: string;
32
+ size?: number;
33
+ };
34
+ export type PosthogUsersResponse = {
35
+ data: PosthogUser[];
36
+ hasMore: boolean;
37
+ size: number;
38
+ };
19
39
  export type PosthogUserParams = {
20
40
  firstname?: string;
21
41
  lastname?: string;
@@ -5,18 +5,20 @@ export type Snapshot = {
5
5
  data: string;
6
6
  status?: string;
7
7
  };
8
- export type NearestSnapshotRequestPayload = {
8
+ export type SnapshotRequestPayload = {
9
9
  apiKey?: string;
10
10
  apiId?: string;
11
11
  token?: string;
12
12
  cancelToken?: object;
13
13
  includeImage?: boolean;
14
+ view?: boolean;
14
15
  };
15
16
  export type AvailableDaysRequestPayload = {
16
17
  cameraId: string;
17
18
  year: string;
18
19
  month: string;
19
20
  payload?: ApiCredentials;
21
+ cancelToken?: CancelToken;
20
22
  };
21
23
  export type AvailableDaysResponsePayload = {
22
24
  days: Array<number>;
@@ -104,13 +106,6 @@ export declare enum SnapshotExtractionInterval {
104
106
  }
105
107
  export declare enum VpnServer {
106
108
  None = "None",
107
- OpenVPN1 = "OpenVPN1",
108
- OpenVPN2 = "OpenVPN2",
109
- OpenVPN3 = "OpenVPN3",
110
- OpenVPN4 = "OpenVPN4",
111
- OpenVPN5 = "OpenVPN5",
112
- PPTP1 = "PPTP1",
113
- PPTP2 = "PPTP2",
114
109
  WireGuard1 = "WireGuard1",
115
110
  WireGuard2 = "WireGuard2",
116
111
  WireGuard3 = "WireGuard3",
@@ -120,5 +115,6 @@ export declare enum VpnServer {
120
115
  WireGuard7 = "WireGuard7",
121
116
  WireGuard8 = "WireGuard8",
122
117
  WireGuard9 = "WireGuard9",
123
- WireGuard10 = "WireGuard10"
118
+ WireGuard10 = "WireGuard10",
119
+ WgHub = "WgHub"
124
120
  }
@@ -3,7 +3,8 @@ export declare enum RoiType {
3
3
  AnprContext = "anpr_context",
4
4
  ExclusionZone = "exclusion_zone",
5
5
  WorkflowArea = "workflow_area",
6
- SiteAnalytics = "site_analytics"
6
+ SiteAnalytics = "site_analytics",
7
+ Ppe = "ppe_roi"
7
8
  }
8
9
  export declare enum RoiShapeType {
9
10
  Polygon = "polygon",
@@ -1,6 +1,7 @@
1
1
  export type RouteParams = {
2
2
  projectExid?: string;
3
3
  cameraExid?: string;
4
+ mediaExid?: string;
4
5
  timestamp?: string;
5
6
  fromDate?: string;
6
7
  toDate?: string;
@@ -138,6 +138,7 @@ export interface JSON {
138
138
  parse<T>(text: Stringified<T>, reviver?: (key: unknown, value: unknown) => unknown): T;
139
139
  }
140
140
  export type TuplePoint2D = [number, number];
141
+ export type TuplePoint3D = [number, number, number];
141
142
  export type Point2D = {
142
143
  x: number;
143
144
  y: number;
@@ -1,4 +1,4 @@
1
- import { BBox, BoundingBox, DateType, Schedule, ScheduleLowercase, CameraExid, DetectionModel, PaginationParams, PpeLabel, ProjectExid, CameraDateRangeFilter, CameraFeatureFlag, TimelineDateInterval, Camera, AdminCamera, _360FloorV2, _360FloorId, PaginatedItems, DateRangeFilter } from "@evercam/api/types";
1
+ import { BBox, BoundingBox, DateType, Schedule, ScheduleLowercase, CameraExid, DetectionModel, PaginationParams, PpeLabel, ProjectExid, CameraDateRangeFilter, CameraFeatureFlag, TimelineDateInterval, Camera, AdminCamera, _360FloorV2, _360FloorId, PaginatedItems, DateRangeFilter, TuplePoint2D } from "@evercam/api/types";
2
2
  import { DetectionLabel, DownloadFileType } from "@evercam/api/types";
3
3
  export declare enum SiteAnalyticsMode {
4
4
  Detections = "detections",
@@ -184,7 +184,7 @@ export type DetectionsExportRequestParams = DetectionsRequestParams & {
184
184
  directDownload?: boolean;
185
185
  };
186
186
  export type SmartSearchHeatmapPoint = {
187
- coordinates: [number, number];
187
+ coordinates: TuplePoint2D;
188
188
  detectionsCount: number;
189
189
  };
190
190
  export type SmartSearchHeatmapData = {
@@ -241,7 +241,7 @@ export type SmartSearchRequestPayload = {
241
241
  fromDate?: string;
242
242
  toDate?: string;
243
243
  page?: number;
244
- pageSize?: number;
244
+ limit?: number;
245
245
  threshold?: number;
246
246
  };
247
247
  type SmartSearchResultItemBase = {
@@ -0,0 +1,92 @@
1
+ import { CameraExid, DateType, ProjectExid } from "@evercam/api/types";
2
+ export type SiteAnalyticsCoolifyStatus = {
3
+ appUuid: string | null;
4
+ name: string | null;
5
+ serverUuid: string | null;
6
+ serverName: string | null;
7
+ appUrl: string | null;
8
+ status: string | null;
9
+ isRunning: boolean;
10
+ updatedAt: string | null;
11
+ };
12
+ export type SiteAnalyticsProjectMeta = {
13
+ exid: ProjectExid;
14
+ name: string | null;
15
+ timezone: string | null;
16
+ featureFlags: string[] | null;
17
+ };
18
+ export type SiteAnalyticsCameraMeta = {
19
+ exid: CameraExid;
20
+ name: string | null;
21
+ status: string | null;
22
+ featureFlags: string[] | null;
23
+ };
24
+ export type SiteAnalyticsManagedApp = {
25
+ id: number;
26
+ projectExid: ProjectExid;
27
+ cameraExid: CameraExid;
28
+ coolifyAppId: string | null;
29
+ appVersion: string;
30
+ modelId: number | null;
31
+ startDate: DateType | null;
32
+ endDate: DateType | null;
33
+ startHour: number;
34
+ endHour: number;
35
+ source: string;
36
+ override: boolean;
37
+ timeIncreaseFrequency: number;
38
+ insertedAt: DateType | null;
39
+ updatedAt: DateType | null;
40
+ coolify: SiteAnalyticsCoolifyStatus | null;
41
+ project: SiteAnalyticsProjectMeta | null;
42
+ camera: SiteAnalyticsCameraMeta | null;
43
+ lastTrackingAt: DateType | null;
44
+ };
45
+ export type CreateSiteAnalyticsAppPayload = {
46
+ projectExid: ProjectExid;
47
+ cameraExid: CameraExid;
48
+ coolifyServerUuid: string;
49
+ appVersion?: string;
50
+ modelId?: number | null;
51
+ startDate?: DateType | null;
52
+ endDate?: DateType | null;
53
+ startHour?: number;
54
+ endHour?: number;
55
+ source?: string;
56
+ override?: boolean;
57
+ timeIncreaseFrequency?: number;
58
+ };
59
+ export type UpdateSiteAnalyticsAppPayload = Partial<Omit<CreateSiteAnalyticsAppPayload, "projectExid" | "cameraExid" | "coolifyServerUuid">>;
60
+ export type ModelOption = {
61
+ modelId: number;
62
+ version: string;
63
+ };
64
+ export type SiteAnalyticsAppConfigFormValue = {
65
+ appVersion: string;
66
+ modelId: number | null;
67
+ startDate: string | null;
68
+ endDate: string | null;
69
+ startHour: number;
70
+ endHour: number;
71
+ source: string;
72
+ override: boolean;
73
+ timeIncreaseFrequency: number;
74
+ };
75
+ export type SiteAnalyticsManagementListParams = {
76
+ projectExid?: ProjectExid;
77
+ includeStatus?: boolean;
78
+ page?: number;
79
+ limit?: number;
80
+ };
81
+ export type CreateSiteAnalyticsAppResponse = {
82
+ created: boolean;
83
+ id: number | null;
84
+ data: SiteAnalyticsManagedApp | null;
85
+ count: number | null;
86
+ message: string;
87
+ };
88
+ export type DeleteSiteAnalyticsAppResponse = {
89
+ deleted: boolean;
90
+ count: number;
91
+ message: string;
92
+ };
@@ -53,7 +53,6 @@ export type ForgeMarker = {
53
53
  };
54
54
  export type ForgeProjectData = {
55
55
  urns?: ForgeUrn[];
56
- isEvercamAccount?: boolean;
57
56
  accDrawingsAlignments?: Record<string, ForgeAccAlignmentData>;
58
57
  timeline?: TimelineItem[];
59
58
  savedView?: ForgeView;
@@ -5,8 +5,11 @@ export type SnapshotExtractionQyeryParams = PaginationParams & {
5
5
  status: SnapshotExtractionStatus;
6
6
  };
7
7
  export declare enum SnapshotExtractionStatus {
8
+ Cancelling = "canceling",
9
+ Cancelled = "cancelled",
8
10
  Completed = "completed",
9
11
  Failed = "failed",
12
+ Pending = "pending",
10
13
  Processing = "processing"
11
14
  }
12
15
  export declare enum SnapshotExtractionType {
@@ -30,6 +33,8 @@ export type SnapshotExtraction = {
30
33
  injectTo_cr: Boolean;
31
34
  schedule: Schedule;
32
35
  created_at: DateType;
36
+ jpegCount?: number;
37
+ obanJobId?: number;
33
38
  };
34
39
  export type SnapshotTestPayload = {
35
40
  cameraExid?: CameraExid;
@@ -42,6 +47,14 @@ export type SnapshotTestResponse = {
42
47
  status: string;
43
48
  data: string;
44
49
  };
50
+ export type SnapshotEmailDeliveryRequestPayload = {
51
+ snapshot: string;
52
+ recipients?: string[];
53
+ message?: string;
54
+ };
55
+ export type SnapshotEmailDeliveryResponsePayload = {
56
+ warning?: string;
57
+ };
45
58
  export type DeleteSnapshotQueryParams = {
46
59
  fromDate: DateType;
47
60
  toDate: DateType;
@@ -0,0 +1,4 @@
1
+ export type SocketAuthResponsePayload = {
2
+ wsToken: string;
3
+ expiresIn: number;
4
+ };
@@ -1,4 +1,4 @@
1
- import { DateType, Schedule } from "@evercam/api/types";
1
+ import { DateType, Point2D, Schedule } from "@evercam/api/types";
2
2
  export declare enum TimelapseStatus {
3
3
  Pending = 11,
4
4
  Completed = 5,
@@ -26,11 +26,7 @@ export type TimestampPositionCoordinates = {
26
26
  w: number;
27
27
  h: number;
28
28
  };
29
- export type BlurRegionPoint = {
30
- x: number;
31
- y: number;
32
- };
33
- export type BlurRegionCoordinates = BlurRegionPoint[];
29
+ export type BlurRegionCoordinates = Point2D[];
34
30
  export type TimelapseLogoOptions = {
35
31
  id?: number;
36
32
  x: number;
@@ -176,7 +176,6 @@ export type SessionActivitiesListRequestPayload = {
176
176
  };
177
177
  export type SignupUserRequestPayload = {
178
178
  telephone: string;
179
- token: string;
180
179
  firstname: string;
181
180
  lastname: string;
182
181
  email: string;
@@ -194,9 +193,6 @@ export type UserUpdateRequestPayload = {
194
193
  country: string;
195
194
  persona: string;
196
195
  };
197
- export type UserDeleteRequestPayload = {
198
- verifEmail: string;
199
- };
200
196
  export type GoogleAuthRequestPayload = {
201
197
  code: string;
202
198
  redirectUri: string;
@@ -338,6 +334,7 @@ export type ProjectUserWithRole = {
338
334
  name: string;
339
335
  exid: string;
340
336
  };
337
+ persona: Persona;
341
338
  permissions: string[];
342
339
  role: Role;
343
340
  subRoles: RoleSubRole[];
@@ -7,4 +7,3 @@ export declare const toQueryString: <T extends Record<string, unknown>>(paramsOb
7
7
  forceArrayBrackets?: boolean | undefined;
8
8
  }) => string | undefined;
9
9
  export declare function queryStringToObject(queryString?: string): QueryParams;
10
- export declare function capitalizeFirstLetter(inputString: string): string;