@evercam/api 1.0.0-4656f3be4 → 1.0.0-47847a4fe

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 (62) hide show
  1. package/dist/api/api/3dFirebaseApi.d.ts +18 -3
  2. package/dist/api/api/adminApi.d.ts +82 -84
  3. package/dist/api/api/aiApi.d.ts +4 -4
  4. package/dist/api/api/evercamApi.d.ts +19 -27
  5. package/dist/api/api/evercamLabsApi.d.ts +5 -13
  6. package/dist/api/api/exNvrApi.d.ts +1 -1
  7. package/dist/api/api/index.d.ts +1 -0
  8. package/dist/api/api/ingestApi.d.ts +38 -30
  9. package/dist/api/api/reportsApi.d.ts +15 -0
  10. package/dist/api/types/360.d.ts +17 -9
  11. package/dist/api/types/admin.d.ts +37 -3
  12. package/dist/api/types/analytics.d.ts +49 -15
  13. package/dist/api/types/anpr.d.ts +5 -4
  14. package/dist/api/types/apiKey.d.ts +70 -0
  15. package/dist/api/types/auditLogs.d.ts +161 -21
  16. package/dist/api/types/automation.d.ts +9 -0
  17. package/dist/api/types/axios.d.ts +1 -0
  18. package/dist/api/types/bim.d.ts +27 -7
  19. package/dist/api/types/camera.d.ts +224 -96
  20. package/dist/api/types/comments.d.ts +63 -25
  21. package/dist/api/types/company.d.ts +11 -5
  22. package/dist/api/types/compare.d.ts +1 -1
  23. package/dist/api/types/detections.d.ts +3 -0
  24. package/dist/api/types/emailMessages.d.ts +27 -0
  25. package/dist/api/types/errors.d.ts +7 -2
  26. package/dist/api/types/gateReport.d.ts +2 -1
  27. package/dist/api/types/hdd.d.ts +1 -1
  28. package/dist/api/types/index.d.ts +3 -1
  29. package/dist/api/types/ingest.d.ts +105 -25
  30. package/dist/api/types/kit.d.ts +56 -68
  31. package/dist/api/types/media.d.ts +25 -3
  32. package/dist/api/types/notification.d.ts +12 -1
  33. package/dist/api/types/nvr.d.ts +39 -8
  34. package/dist/api/types/observationEvents.d.ts +26 -0
  35. package/dist/api/types/observations.d.ts +14 -9
  36. package/dist/api/types/posthog.d.ts +36 -0
  37. package/dist/api/types/progressPhoto.d.ts +38 -25
  38. package/dist/api/types/project.d.ts +61 -22
  39. package/dist/api/types/recycleBin.d.ts +8 -2
  40. package/dist/api/types/reports.d.ts +109 -0
  41. package/dist/api/types/router.d.ts +15 -10
  42. package/dist/api/types/shared.d.ts +29 -19
  43. package/dist/api/types/sim.d.ts +18 -6
  44. package/dist/api/types/siteView.d.ts +14 -8
  45. package/dist/api/types/snapshots.d.ts +52 -12
  46. package/dist/api/types/sso.d.ts +11 -37
  47. package/dist/api/types/storageProvider.d.ts +16 -5
  48. package/dist/api/types/user.d.ts +32 -29
  49. package/dist/api/types/widget.d.ts +13 -4
  50. package/dist/api/utils.d.ts +1 -0
  51. package/dist/index.js +840 -691
  52. package/dist/index.js.map +1 -1
  53. package/dist/index.umd.cjs +1 -1
  54. package/dist/index.umd.cjs.map +1 -1
  55. package/dist/shared/types/components.d.ts +406 -23
  56. package/dist/shared/types/droneUpload.d.ts +93 -0
  57. package/dist/shared/types/index.d.ts +2 -0
  58. package/dist/shared/types/report.d.ts +107 -0
  59. package/dist/shared/utils/datePickerValue.d.ts +36 -0
  60. package/dist/shared/utils/datePresets.d.ts +31 -0
  61. package/package.json +1 -1
  62. package/dist/api/types/copilot.d.ts +0 -159
@@ -176,6 +176,7 @@ export type GateReportVerifiedDay = {
176
176
  cameraExid: CameraExid;
177
177
  projectExid: ProjectExid;
178
178
  };
179
+ export type GateReportVerifiedDayEntry = Pick<GateReportVerifiedDay, "day" | "verifiedBy" | "cameraExid" | "projectExid">;
179
180
  export type BoundingBox = {
180
181
  xmax: number;
181
182
  xmin: number;
@@ -291,7 +292,7 @@ export type VerifyDayUpdateRequestPayload = {
291
292
  camerasExid: string[];
292
293
  projectExid: string;
293
294
  day: string;
294
- isMatched: boolean;
295
+ isMatched?: boolean;
295
296
  verifiedBy: string;
296
297
  };
297
298
  export type ProcessedDaysQueryParams = {
@@ -46,7 +46,7 @@ export type HDDCreateUpdatePayload = {
46
46
  size: string;
47
47
  type: string;
48
48
  format: string;
49
- locationId: string;
49
+ locationId: WarehouseLocationIndex | string;
50
50
  serialNumber: string;
51
51
  hddStatus: string;
52
52
  shelfBlock: string;
@@ -8,7 +8,6 @@ export * from "./autodesk";
8
8
  export * from "./bim";
9
9
  export * from "./camera";
10
10
  export * from "./compare";
11
- export * from "./copilot";
12
11
  export * from "./credentials";
13
12
  export * from "./drone";
14
13
  export * from "./errors";
@@ -62,10 +61,13 @@ export * from "./posthog";
62
61
  export * from "./recycleBin";
63
62
  export * from "./authz";
64
63
  export * from "./oauth";
64
+ export * from "./apiKey";
65
65
  export * from "./ring";
66
66
  export * from "./smartSeach";
67
67
  export * from "./siteView";
68
68
  export * from "./aiConfigs";
69
69
  export * from "./gateReportManagement";
70
70
  export * from "./socket";
71
+ export * from "./reports";
71
72
  export * from "./observationEvents";
73
+ export * from "./emailMessages";
@@ -28,8 +28,6 @@ export declare enum IngestTypes {
28
28
  }
29
29
  export type DronesQueryParams = Omit<PaginationParams, "sort"> & {
30
30
  projectId: string;
31
- consumed: string;
32
- token: string;
33
31
  processingStatus: IngestProcessingStatus;
34
32
  };
35
33
  export type IngestPaginatedResponse<T> = {
@@ -116,8 +114,6 @@ export type IngestTrackedAsset = {
116
114
  export type DroneUploadItem = {
117
115
  id: number;
118
116
  projectId: string;
119
- consumed: boolean;
120
- token: string;
121
117
  flightDate: string;
122
118
  flightGeolocation: string;
123
119
  modelZip: string;
@@ -128,35 +124,119 @@ export type DroneUploadItem = {
128
124
  processingStatus: IngestProcessingStatus | string;
129
125
  modelCesiumAssetId: string;
130
126
  updatedAt: string;
131
- hasTusLinks: boolean;
127
+ canDelete: boolean;
128
+ canReprocess: boolean;
132
129
  hasSteps: boolean;
133
- aerialShots: AerialShotItem[];
130
+ aerialShotsCount: number;
134
131
  };
135
132
  export type DroneUploadsResponse = IngestPaginatedResponse<DroneUploadItem>;
136
133
  export type DroneQueueResponse = {
137
134
  size: number;
138
135
  assetsDrone: DroneUploadItem[];
139
136
  };
140
- export type DroneUploadUpdateRequestPayload = {
141
- flightMetadata: {
142
- dateTime: string;
143
- gpsAltitude: string;
144
- gpsCoordinates: string;
145
- };
146
- upload: {
147
- url: string;
148
- title: string;
149
- fileExtension: string;
150
- }[];
151
- aerialShots: {
152
- url: string;
153
- title: string;
154
- fileExtension: string;
155
- gpsLatitude: string;
156
- gpsLongitude: string;
157
- gpsAltitude: string;
137
+ export type DroneFlightMetadata = {
138
+ dateTime: string;
139
+ gpsAltitude: string;
140
+ gpsCoordinates: string;
141
+ };
142
+ export type DroneFileAllocation = {
143
+ filename: string;
144
+ contentType: string;
145
+ };
146
+ export declare enum UploadFileStatus {
147
+ Allocated = "allocated",
148
+ Acknowledged = "acknowledged"
149
+ }
150
+ export type DroneFileState = DroneFileAllocation & {
151
+ status: UploadFileStatus;
152
+ uploadUrl?: string;
153
+ };
154
+ export type DroneFileError = {
155
+ filename?: string;
156
+ id?: number;
157
+ code: string;
158
+ detail: string;
159
+ retryable: boolean;
160
+ };
161
+ export type DroneFileStates = {
162
+ files: DroneFileState[];
163
+ errors: DroneFileError[];
164
+ nextCursor?: string | null;
165
+ };
166
+ export type DroneCompletion = DroneFileStates & {
167
+ processingId: number;
168
+ processingStatus: IngestProcessingStatus;
169
+ };
170
+ export type DroneReprocessResponse = Pick<DroneCompletion, "processingId" | "processingStatus">;
171
+ export type AerialAllocation = DroneFileAllocation & {
172
+ gpsLatitude: string;
173
+ gpsLongitude: string;
174
+ gpsAltitude: string;
175
+ };
176
+ export type AerialUploadState = AerialAllocation & {
177
+ id: number;
178
+ status: UploadFileStatus;
179
+ processingStatus: IngestProcessingStatus;
180
+ uploadUrl?: string;
181
+ fileLink?: string;
182
+ thumbnailLink?: string;
183
+ };
184
+ export type AerialUploadStates = {
185
+ aerialShots: AerialUploadState[];
186
+ errors: DroneFileError[];
187
+ nextCursor?: string | null;
188
+ complete: boolean;
189
+ };
190
+ export type AerialShotState = {
191
+ id: number;
192
+ filename?: string | null;
193
+ status?: UploadFileStatus | null;
194
+ contentType?: string | null;
195
+ processingStatus?: AerialUploadState["processingStatus"] | null;
196
+ gpsLatitude: string;
197
+ gpsLongitude: string;
198
+ gpsAltitude: string;
199
+ fileLink?: string | null;
200
+ thumbnailLink?: string | null;
201
+ };
202
+ export type AerialShotPage = Omit<AerialUploadStates, "aerialShots"> & {
203
+ aerialShots: AerialShotState[];
204
+ };
205
+ export type DroneCreation = {
206
+ projectId: string;
207
+ flightMetadata: DroneFlightMetadata;
208
+ aerialShots?: AerialAllocation[];
209
+ };
210
+ export type DroneProcessingTarget = {
211
+ ingestUrl: string;
212
+ id: number;
213
+ };
214
+ export type DroneCreated = {
215
+ id: number;
216
+ projectId: string;
217
+ processingStatus: IngestProcessingStatus;
218
+ aerialShots: AerialUploadState[];
219
+ errors: DroneFileError[];
220
+ };
221
+ export type DroneDeletion = {
222
+ deleted: {
223
+ filename: string;
224
+ id?: number;
158
225
  }[];
159
- projectName: string;
226
+ errors: DroneFileError[];
227
+ };
228
+ export type DroneComparisonFrames = {
229
+ beforeImage?: string;
230
+ afterImage: string;
231
+ beforeDate?: string;
232
+ afterDate: string;
233
+ };
234
+ export type DronePreviewImages = Pick<DroneComparisonFrames, "beforeImage" | "afterImage">;
235
+ export type DronePreview = {
236
+ mimeType: "image/gif" | "image/jpeg";
237
+ content: string;
238
+ width: number;
239
+ height: number;
160
240
  };
161
241
  export type CalculateMeasuringOperationRequestPayload = {
162
242
  date: DateType;
@@ -1,7 +1,7 @@
1
- import { CameraExid, CountryCode, CountryId, DateType, Nvr, PaginationParams, PowerType, Project, Router, Schedule, Tag } from "@evercam/api/types";
1
+ import { CameraStatus, CountryId, Nvr, PaginationParams, PowerType, Project, ProjectExid, Router, Schedule, SimSummary, Tag } from "@evercam/api/types";
2
2
  export type Kit = {
3
3
  alarms: KitAlarm[];
4
- countryCode: CountryCode;
4
+ sims?: SimSummary[];
5
5
  countryId: CountryId;
6
6
  countryName: string;
7
7
  countryRegion: KitRegion;
@@ -12,6 +12,7 @@ export type Kit = {
12
12
  powerType: PowerType;
13
13
  project: Project;
14
14
  projectId: number;
15
+ projectExid?: ProjectExid;
15
16
  router: Partial<Router>;
16
17
  serial: string;
17
18
  status: KitStatus;
@@ -19,10 +20,13 @@ export type Kit = {
19
20
  ups: boolean;
20
21
  boxId: string;
21
22
  tags: Tag[];
22
- storages: KitStorage[];
23
23
  createdAt: string;
24
- decommissionedAt?: string;
25
- deletedAt?: string;
24
+ deletedAt?: string | null;
25
+ decommissionedAt?: string | null;
26
+ deletedById?: number | null;
27
+ location?: string;
28
+ locationId?: number | null;
29
+ lastHealthCheck?: string | null;
26
30
  };
27
31
  export declare enum KitSupportCheckId {
28
32
  RouterSmsRoundTrip = "router_sms_round_trip",
@@ -223,10 +227,9 @@ export type GrafanaQueryResult = {
223
227
  status: number;
224
228
  frames: GrafanaFrame[];
225
229
  };
230
+ export type GrafanaMetricResults = Record<string, GrafanaQueryResult>;
226
231
  export type GrafanaMetricData = KitMetricData & {
227
- results: {
228
- [key: string]: GrafanaQueryResult;
229
- };
232
+ results: GrafanaMetricResults;
230
233
  };
231
234
  export type EvercamMetricData = KitMetricData & {
232
235
  stats: EvercamStats[];
@@ -236,67 +239,43 @@ export type EvercamStats = {
236
239
  [k: string]: number | string;
237
240
  timestamp: string;
238
241
  };
239
- export type KitQueryParams = PaginationParams & {
242
+ export type KitQueryParams = PaginationParams & Partial<{
243
+ boxId: string;
240
244
  name: string;
241
245
  serial: string;
242
246
  status: KitStatus;
243
247
  tagId: number | number[];
244
- };
245
- export type AdminKit = {
246
- id: number;
247
- name: string;
248
- serial: string;
249
- status: string;
250
- powerType: PowerType;
251
- location: string;
252
- countryId: number;
253
- countryName: string;
254
- countryRegion: string;
255
- nvr: Nvr;
256
- router: {
257
- id: number;
258
- serialNumber: number;
259
- vpnUserId: string;
260
- vpnPassword: string;
261
- routerType: string;
262
- routerUserId: string;
263
- routerPassword: string;
264
- routerHttpPort: number;
265
- powerType: PowerType;
266
- powerSchedule: Schedule;
267
- vpnServer: string;
268
- netbirdUrl: string;
269
- sims: {
270
- id: number;
271
- number: string;
272
- }[];
273
- };
274
- project: {
275
- id: number;
276
- exid: string;
277
- name: string;
278
- timezone: string;
279
- status: string;
280
- zohoId: string;
281
- insertedAt: DateType;
282
- };
283
- };
284
- export type KitCreatePayload = {
285
- projectId?: number;
286
- countryCode?: string;
287
- name: string;
288
- status: KitStatus;
289
- powerType: PowerType;
290
- config: {
291
- region: KitRegion;
292
- };
293
- };
248
+ tags: number[];
249
+ noTags: number[];
250
+ sims: string;
251
+ countryId: CountryId;
252
+ region: KitRegion;
253
+ powerType: PowerType[];
254
+ projectName: string;
255
+ projectExid: string;
256
+ nvrVersion: string;
257
+ nvrNerves: boolean;
258
+ nvrSerial: string;
259
+ nvrModel: string;
260
+ nvrDeviceType: string;
261
+ ups: boolean;
262
+ alarms: KitAlarm[];
263
+ cameraStatus: CameraStatus[];
264
+ routerSerial: string;
265
+ createdAtFrom: string;
266
+ createdAtTo: string;
267
+ }>;
294
268
  export type KitMetricStatsEntry = {
295
269
  timestamp: string;
296
270
  voltage: number;
297
271
  current: number;
298
272
  panelVoltage: number;
299
273
  panelPower: number;
274
+ yieldTotal: number;
275
+ yieldToday: number;
276
+ yieldYesterday: number;
277
+ maxPowerToday: number;
278
+ maxPowerYesterday: number;
300
279
  };
301
280
  export type KitFanStatsEntry = {
302
281
  timestamp: string;
@@ -316,9 +295,12 @@ export declare enum KitStorageTransport {
316
295
  Nvme = "nvme",
317
296
  Usb = "usb"
318
297
  }
319
- export type KitStorageRequestPayload = {
298
+ export type KitStorageQueryParams = PaginationParams & Partial<{
320
299
  kitId: number;
321
- };
300
+ serial: string;
301
+ vendor: string;
302
+ transport: KitStorageTransport;
303
+ }>;
322
304
  export type KitStorage = {
323
305
  id: number;
324
306
  serial: string;
@@ -336,10 +318,10 @@ export type KitStorage = {
336
318
  freeSpace: number;
337
319
  tran: KitStorageTransport;
338
320
  };
339
- export type KitFootageRequestPayload = {
340
- cameraId: CameraExid;
321
+ export type KitFootageRequestPayload = Partial<{
322
+ cameraId: number;
341
323
  storageId: number;
342
- };
324
+ }>;
343
325
  export type KitFootage = {
344
326
  id: number;
345
327
  startDate: string;
@@ -358,7 +340,10 @@ export type KitBox = {
358
340
  id: string;
359
341
  gatewaySerial: string;
360
342
  gatewayMac: string;
361
- gatewayConfig: Record<string, unknown> | null;
343
+ gatewayConfig: {
344
+ defaultPassword: string;
345
+ } | null;
346
+ kitSerials: string[];
362
347
  insertedAt: string;
363
348
  updatedAt: string;
364
349
  };
@@ -366,10 +351,13 @@ export type KitBoxCreatePayload = {
366
351
  id?: string;
367
352
  gatewaySerial: string;
368
353
  gatewayMac: string;
369
- gatewayConfig?: Record<string, unknown>;
354
+ gatewayConfig?: {
355
+ defaultPassword?: string;
356
+ };
370
357
  };
371
- export type KitBoxQueryParams = PaginationParams & {
358
+ export type KitBoxQueryParams = PaginationParams & Partial<{
372
359
  id: string;
373
360
  gatewaySerial: string;
374
361
  gatewayMac: string;
375
- };
362
+ hasKits: boolean;
363
+ }>;
@@ -1,8 +1,9 @@
1
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;
@@ -26,6 +27,12 @@ export type Media = {
26
27
  thumbnailUrl?: string;
27
28
  mediaUrl?: string;
28
29
  camera?: string;
30
+ notes?: string;
31
+ category?: MediaCategory | ClipsCategory;
32
+ isUrgent?: boolean;
33
+ bucket?: string;
34
+ sourceProduct?: string;
35
+ featureType?: string;
29
36
  };
30
37
  export declare enum MediaType {
31
38
  EditedImage = "edit",
@@ -77,6 +84,22 @@ export type MediaFilterQueryParams = {
77
84
  limit?: number;
78
85
  camera?: string;
79
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
+ }>;
80
103
  export type MediaUpdateRequestPayload = {
81
104
  name?: string;
82
105
  title?: string;
@@ -111,8 +134,7 @@ export declare enum ClipsCategory {
111
134
  }
112
135
  export declare enum MediaCategory {
113
136
  Weather = "weather",
114
- SmartSearch = "smart_search",
115
- Copilot = "copilot"
137
+ SmartSearch = "smart_search"
116
138
  }
117
139
  export type MediaDeleteRequestPayload = {
118
140
  timelapseIds: (string | number)[];
@@ -1,7 +1,9 @@
1
+ import { CommentsScope, CommentThreeSixtyContext } from "./comments";
1
2
  export declare enum NotificationType {
2
3
  CameraShare = "camera_share",
3
4
  CameraStatusChange = "camera_status_changed",
4
5
  Mention = "mention",
6
+ CommentMention = "comment_mention",
5
7
  TimelapseCreated = "timelapse_created",
6
8
  TimelapseFailed = "timelapse_failed",
7
9
  DroneProcessing = "drone_processing_done",
@@ -80,7 +82,16 @@ export interface StorageWarningContext extends NotificationContextBase {
80
82
  projectExid: string;
81
83
  cameraName: string;
82
84
  }
83
- export type NotificationContext = CameraShareContext | CameraStatusChangeContext | MentionContext | TimelapseCreatedContext | TimelapseFailedContext | DroneProcessingContext | Processing360Context | ExportNotificationContext | UploadNotificationContext | RingCamerasImportedContext | StorageWarningContext;
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;
84
95
  export type Notification = {
85
96
  id: number;
86
97
  type: NotificationType;
@@ -1,15 +1,17 @@
1
1
  import type { NvrModel } from "@evercam/api/types";
2
2
  export type Nvr = {
3
3
  id?: number;
4
+ kitId?: number;
4
5
  deviceType: NvrDeviceType;
5
6
  serial: string;
6
7
  model: NvrModel;
7
- httpUrl: string;
8
- rtspUrl: string;
8
+ httpUrl: string | null;
9
+ rtspUrl: string | null;
9
10
  macAddress: string;
10
- username: string;
11
- password: string;
11
+ username: string | null;
12
+ password: string | null;
12
13
  nerves: boolean;
14
+ version?: string;
13
15
  };
14
16
  export declare enum NvrDeviceType {
15
17
  Rpi4 = "rpi4",
@@ -26,11 +28,40 @@ export declare enum NvrHddStatus {
26
28
  }
27
29
  export type NvrCreatePayload = {
28
30
  serial?: string;
29
- httpUrl: string;
30
- rtspUrl?: string;
31
+ httpUrl?: string | null;
32
+ rtspUrl?: string | null;
31
33
  deviceType?: NvrDeviceType;
32
34
  model: NvrModel;
33
- username: string;
34
- password: string;
35
+ username?: string | null;
36
+ password?: string | null;
35
37
  kitId?: number;
36
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
+ };
@@ -64,6 +64,32 @@ export interface ObservationEventListResponse {
64
64
  from: number;
65
65
  to: number;
66
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
+ }
67
93
  export type ObservationEventVerdict = ObservationEventStatus.Approved | ObservationEventStatus.Disapproved | ObservationEventStatus.Unsure;
68
94
  export interface ObservationEventReviewPayload {
69
95
  status: ObservationEventVerdict;
@@ -1,11 +1,17 @@
1
- import { type ProjectExid, type CameraExid, type DateType, type BBox, AiObservationFeasibilityStatus, ObservationEventStatus, DownloadFileType } from "@evercam/api/types";
1
+ import { type ProjectExid, type CameraExid, type DateType, type BBox, AiObservationFeasibilityStatus, ObservationEventStatus, ObservationSourceType, DownloadFileType } from "@evercam/api/types";
2
2
  export type ObservationApproval = boolean | ObservationEventStatus.Unsure | null;
3
3
  export type ObservationEvent = {
4
4
  id: number;
5
5
  observationTypeId: number;
6
6
  observationCode: string | null;
7
- cameraExid: CameraExid;
7
+ cameraExid: CameraExid | null;
8
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;
9
15
  capturedAt: DateType;
10
16
  endTime: DateType | null;
11
17
  confidence: number | null;
@@ -37,6 +43,7 @@ export declare enum ObservationMissingItem {
37
43
  export type ObservationEventsQueryParams = {
38
44
  cameraExid?: CameraExid;
39
45
  observationCode?: string;
46
+ type?: string;
40
47
  fromDate?: string;
41
48
  toDate?: string;
42
49
  missingItems?: string;
@@ -47,13 +54,14 @@ export type ObservationEventsQueryParams = {
47
54
  };
48
55
  export type ObservationEventsExportQueryParams = {
49
56
  cameraExid?: CameraExid;
57
+ observationCode?: string;
58
+ type?: string;
59
+ missingItems?: string;
60
+ status?: ObservationEventStatus;
50
61
  fromDate: string;
51
62
  toDate: string;
52
- required?: string;
53
- compliant?: boolean;
54
63
  fileType: DownloadFileType;
55
64
  directDownload?: boolean;
56
- includeInvalid?: boolean;
57
65
  };
58
66
  export type ObservationApprovalUpdateResponse = {
59
67
  updated: boolean;
@@ -68,6 +76,7 @@ export declare enum ObservationCountsGranularity {
68
76
  export type ObservationEventsCountsQueryParams = {
69
77
  cameraExid?: CameraExid;
70
78
  observationCode?: string;
79
+ type?: string;
71
80
  fromDate?: string;
72
81
  toDate?: string;
73
82
  missingItems?: string;
@@ -78,7 +87,3 @@ export type ObservationEventCount = {
78
87
  bucket: DateType;
79
88
  total: number;
80
89
  };
81
- export declare enum ObservationRequiredItem {
82
- Helmet = "has_helmet",
83
- HighVisVest = "has_high_vis_vest"
84
- }
@@ -36,6 +36,42 @@ export type PosthogUsersResponse = {
36
36
  hasMore: boolean;
37
37
  size: number;
38
38
  };
39
+ export type PosthogEventsQueryParams = Partial<{
40
+ companyExid: string;
41
+ projectExid: string;
42
+ cameraExid: string;
43
+ email: string;
44
+ before: string;
45
+ after: string;
46
+ type: string;
47
+ period: string;
48
+ isStatsOnly: boolean;
49
+ whiteListedPages: string | null;
50
+ page: number;
51
+ size: number;
52
+ sort: string | null;
53
+ }>;
54
+ export type PosthogEventListItem = Partial<{
55
+ timestamp: string;
56
+ companyExid: string | null;
57
+ projectExid: string | null;
58
+ cameraExid: string | null;
59
+ email: string;
60
+ name: string;
61
+ page: string;
62
+ context: string;
63
+ action: string;
64
+ properties: Record<string, string>;
65
+ eventsCount: number;
66
+ }>;
67
+ export type PosthogEventsResponse<T = PosthogEventListItem> = {
68
+ data: T[];
69
+ size: number;
70
+ page: number;
71
+ total: number;
72
+ from: number;
73
+ to: number;
74
+ };
39
75
  export type PosthogUserParams = {
40
76
  firstname?: string;
41
77
  lastname?: string;