@evercam/api 1.0.0-cfcbc946a → 1.0.0-d0847b9fa

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 (145) hide show
  1. package/README.md +4 -0
  2. package/dist/api/api/3dFirebaseApi.d.ts +217 -0
  3. package/dist/api/api/adminApi.d.ts +381 -0
  4. package/dist/api/api/aiApi.d.ts +214 -0
  5. package/dist/api/api/authzApi.d.ts +40 -0
  6. package/dist/api/{client → api/client}/axios.d.ts +2 -1
  7. package/dist/api/{client → api/client}/customErrors.d.ts +10 -0
  8. package/dist/api/{client → api/client}/interceptors.d.ts +1 -1
  9. package/dist/api/api/client/swr/Swr.d.ts +14 -0
  10. package/dist/api/api/client/swr/SwrStore.d.ts +10 -0
  11. package/dist/api/api/evercamApi.d.ts +357 -0
  12. package/dist/api/api/evercamLabsApi.d.ts +45 -0
  13. package/dist/api/{exNvrApi.d.ts → api/exNvrApi.d.ts} +1 -1
  14. package/dist/api/api/index.d.ts +13 -0
  15. package/dist/api/api/ingestApi.d.ts +162 -0
  16. package/dist/api/{ptzApi.d.ts → api/ptzApi.d.ts} +12 -3
  17. package/dist/api/api/videoWallApi.d.ts +9 -0
  18. package/dist/api/api/weatherApi.d.ts +9 -0
  19. package/dist/api/index.d.ts +3 -13
  20. package/dist/api/types/360.d.ts +375 -0
  21. package/dist/api/types/aconex.d.ts +143 -0
  22. package/dist/api/types/admin.d.ts +51 -0
  23. package/dist/api/types/aiConfigs.d.ts +242 -0
  24. package/dist/{types → api/types}/analytics.d.ts +220 -80
  25. package/dist/{types → api/types}/anpr.d.ts +56 -13
  26. package/dist/{types → api/types}/auditLogs.d.ts +19 -1
  27. package/dist/api/types/authz.d.ts +132 -0
  28. package/dist/{types → api/types}/autodesk.d.ts +7 -7
  29. package/dist/api/types/automation.d.ts +114 -0
  30. package/dist/{types → api/types}/axios.d.ts +31 -11
  31. package/dist/{types → api/types}/bim.d.ts +38 -9
  32. package/dist/{types → api/types}/camera.d.ts +118 -151
  33. package/dist/api/types/comments.d.ts +58 -0
  34. package/dist/api/types/company.d.ts +115 -0
  35. package/dist/{types → api/types}/compare.d.ts +20 -5
  36. package/dist/api/types/connector.d.ts +21 -0
  37. package/dist/api/types/coolify.d.ts +36 -0
  38. package/dist/{types → api/types}/copilot.d.ts +11 -9
  39. package/dist/{types → api/types}/countries.d.ts +0 -7
  40. package/dist/{types → api/types}/credentials.d.ts +1 -0
  41. package/dist/api/types/detections.d.ts +117 -0
  42. package/dist/api/types/drone.d.ts +107 -0
  43. package/dist/{types → api/types}/errors.d.ts +25 -0
  44. package/dist/{types → api/types}/gateReport.d.ts +49 -168
  45. package/dist/api/types/gateReportManagement.d.ts +170 -0
  46. package/dist/api/types/hammertech.d.ts +98 -0
  47. package/dist/{types → api/types}/hdd.d.ts +26 -1
  48. package/dist/{types → api/types}/index.d.ts +21 -3
  49. package/dist/api/types/ingest.d.ts +234 -0
  50. package/dist/{types → api/types}/kit.d.ts +130 -56
  51. package/dist/api/types/map.d.ts +16 -0
  52. package/dist/{types → api/types}/media.d.ts +10 -3
  53. package/dist/api/types/notification.d.ts +96 -0
  54. package/dist/api/types/oauth.d.ts +62 -0
  55. package/dist/api/types/observationEvents.d.ts +61 -0
  56. package/dist/api/types/observations.d.ts +85 -0
  57. package/dist/api/types/planner.d.ts +124 -0
  58. package/dist/api/types/posthog.d.ts +53 -0
  59. package/dist/api/types/procore.d.ts +229 -0
  60. package/dist/{types → api/types}/progressPhoto.d.ts +11 -23
  61. package/dist/api/types/project.d.ts +254 -0
  62. package/dist/{types → api/types}/recording.d.ts +10 -16
  63. package/dist/api/types/recycleBin.d.ts +14 -0
  64. package/dist/api/types/ring.d.ts +53 -0
  65. package/dist/{types → api/types}/roi.d.ts +2 -9
  66. package/dist/{types → api/types}/routeParams.d.ts +5 -2
  67. package/dist/{types → api/types}/router.d.ts +20 -1
  68. package/dist/{types → api/types}/shared.d.ts +31 -38
  69. package/dist/api/types/shares.d.ts +45 -0
  70. package/dist/{types → api/types}/sim.d.ts +6 -6
  71. package/dist/api/types/siteAnalytics.d.ts +285 -0
  72. package/dist/api/types/siteAnalyticsManagement.d.ts +117 -0
  73. package/dist/api/types/siteView.d.ts +73 -0
  74. package/dist/api/types/smartSeach.d.ts +5 -0
  75. package/dist/api/types/snapshots.d.ts +104 -0
  76. package/dist/api/types/socket.d.ts +4 -0
  77. package/dist/api/types/sso.d.ts +55 -0
  78. package/dist/api/types/storageProvider.d.ts +19 -0
  79. package/dist/api/types/storyblok.d.ts +27 -0
  80. package/dist/{types → api/types}/streaming.d.ts +4 -25
  81. package/dist/api/types/systemCheck.d.ts +11 -0
  82. package/dist/api/types/tag.d.ts +12 -0
  83. package/dist/api/types/time.d.ts +7 -0
  84. package/dist/{types → api/types}/timelapse.d.ts +7 -11
  85. package/dist/{types → api/types}/user.d.ts +106 -40
  86. package/dist/api/types/videoWall.d.ts +66 -0
  87. package/dist/api/types/weather.d.ts +153 -0
  88. package/dist/{types → api/types}/widget.d.ts +96 -16
  89. package/dist/api/types/xweather.d.ts +12 -0
  90. package/dist/index.d.ts +2 -3
  91. package/dist/index.js +2918 -1085
  92. package/dist/index.js.map +1 -1
  93. package/dist/index.umd.cjs +1 -1
  94. package/dist/index.umd.cjs.map +1 -1
  95. package/dist/shared/api/index.d.ts +3 -0
  96. package/dist/shared/components/timelinePlayer/providers/index.d.ts +3 -0
  97. package/dist/shared/components/timelinePlayer/providers/timelineAnprProvider.d.ts +17 -0
  98. package/dist/shared/components/timelinePlayer/providers/timelineDataProvider.d.ts +13 -0
  99. package/dist/shared/components/timelinePlayer/providers/timelineLuminanceProvider.d.ts +16 -0
  100. package/dist/shared/types/components.d.ts +374 -0
  101. package/dist/shared/types/customDataTableFilters.d.ts +10 -0
  102. package/dist/shared/types/imagePlayer.d.ts +41 -0
  103. package/dist/shared/types/index.d.ts +7 -0
  104. package/dist/shared/types/observations.d.ts +21 -0
  105. package/dist/shared/types/rbac.d.ts +67 -0
  106. package/dist/shared/types/timeline.d.ts +10 -0
  107. package/package.json +8 -5
  108. package/dist/api/3dFirebaseApi.d.ts +0 -9
  109. package/dist/api/adminApi.d.ts +0 -304
  110. package/dist/api/aiApi.d.ts +0 -110
  111. package/dist/api/authzApi.d.ts +0 -21
  112. package/dist/api/evercamApi.d.ts +0 -266
  113. package/dist/api/evercamLabsApi.d.ts +0 -46
  114. package/dist/api/ingestApi.d.ts +0 -65
  115. package/dist/api/videoWallApi.d.ts +0 -9
  116. package/dist/api/weatherApi.d.ts +0 -27
  117. package/dist/types/360.d.ts +0 -83
  118. package/dist/types/aconex.d.ts +0 -45
  119. package/dist/types/automation.d.ts +0 -6
  120. package/dist/types/comments.d.ts +0 -36
  121. package/dist/types/company.d.ts +0 -46
  122. package/dist/types/connector.d.ts +0 -16
  123. package/dist/types/coolify.d.ts +0 -18
  124. package/dist/types/detections.d.ts +0 -76
  125. package/dist/types/devices.d.ts +0 -228
  126. package/dist/types/drone.d.ts +0 -17
  127. package/dist/types/ingest.d.ts +0 -43
  128. package/dist/types/map.d.ts +0 -4
  129. package/dist/types/notification.d.ts +0 -27
  130. package/dist/types/planner.d.ts +0 -28
  131. package/dist/types/procore.d.ts +0 -76
  132. package/dist/types/project.d.ts +0 -120
  133. package/dist/types/shares.d.ts +0 -192
  134. package/dist/types/siteAnalytics.d.ts +0 -84
  135. package/dist/types/snapshots.d.ts +0 -50
  136. package/dist/types/storageServers.d.ts +0 -4
  137. package/dist/types/time.d.ts +0 -19
  138. package/dist/types/vendorModel.d.ts +0 -15
  139. package/dist/types/videoWall.d.ts +0 -33
  140. package/dist/types/weather.d.ts +0 -83
  141. /package/dist/api/{client → api/client}/index.d.ts +0 -0
  142. /package/dist/api/{webRtcApi.d.ts → api/webRtcApi.d.ts} +0 -0
  143. /package/dist/{types → api/types}/nvr.d.ts +0 -0
  144. /package/dist/{types → api/types}/voyageControl.d.ts +0 -0
  145. /package/dist/{utils.d.ts → api/utils.d.ts} +0 -0
@@ -1,10 +1,10 @@
1
- import { CountryCode, CountryId, DateType, Nvr, PaginationParams, PowerType, Project, Region, Router, Schedule } from "@/types";
1
+ import { CameraExid, CountryCode, CountryId, DateType, Nvr, PaginationParams, PowerType, Project, Router, Schedule, Tag } from "@evercam/api/types";
2
2
  export type Kit = {
3
3
  alarms: KitAlarm[];
4
4
  countryCode: CountryCode;
5
5
  countryId: CountryId;
6
6
  countryName: string;
7
- countryRegion: Region;
7
+ countryRegion: KitRegion;
8
8
  id?: number;
9
9
  jobId: number;
10
10
  name: string;
@@ -16,6 +16,41 @@ export type Kit = {
16
16
  serial: string;
17
17
  status: KitStatus;
18
18
  powerSchedule: Schedule;
19
+ ups: boolean;
20
+ boxId: string;
21
+ tags: Tag[];
22
+ storages: KitStorage[];
23
+ createdAt: string;
24
+ };
25
+ export declare enum KitSupportCheckId {
26
+ RouterSmsRoundTrip = "router_sms_round_trip",
27
+ NvrRecordingAllCameras = "nvr_recording_all_cameras",
28
+ NvrRecordingThirdStream = "nvr_recording_third_stream",
29
+ CamerasHaveDeviceId = "cameras_have_device_id",
30
+ CamerasRecording = "cameras_recording",
31
+ CamerasSdCardMounted = "cameras_sd_card_mounted",
32
+ BatteryReadings = "battery_readings"
33
+ }
34
+ export declare enum KitSupportCheckStatus {
35
+ Passed = "passed",
36
+ Failed = "failed",
37
+ Skipped = "skipped"
38
+ }
39
+ export type KitSupportCheck = {
40
+ id: KitSupportCheckId;
41
+ name: string;
42
+ status: KitSupportCheckStatus;
43
+ error: string | null;
44
+ };
45
+ export type KitSupportChecklist = {
46
+ checks: KitSupportCheck[];
47
+ };
48
+ export type KitDiagnosticRun = {
49
+ kitId: number;
50
+ kitSerial: string;
51
+ checks: KitSupportCheck[];
52
+ ranAt: string;
53
+ isSeen: boolean;
19
54
  };
20
55
  export declare enum KitStatus {
21
56
  New = "new",
@@ -23,19 +58,31 @@ export declare enum KitStatus {
23
58
  Deployed = "deployed",
24
59
  Decommissioned = "decommissioned"
25
60
  }
61
+ export declare enum KitRegion {
62
+ APAC = "apac",
63
+ EMEA = "emea",
64
+ LATAM = "latam",
65
+ US = "na"
66
+ }
26
67
  export declare enum KitAlarm {
27
68
  NvrOffline = "nvr_offline",
69
+ OfflineScheduled = "offline_scheduled",
28
70
  UnknownCamera = "unknown_camera",
29
71
  NotRecordingCamera = "not_recording_camera",
30
- OfflineScheduled = "offline_scheduled",
31
72
  FullSD = "full_sd",
32
73
  FullStorage = "full_storage",
33
74
  HddUnmounted = "hdd_unmounted",
34
- NoHdd = "no_hdd"
75
+ NoHdd = "no_hdd",
76
+ MissingRouterInfo = "missing_router_info",
77
+ AcFailure = "ac_failure",
78
+ LowBattery = "low_battery",
79
+ GeneratorOff = "generator_off"
35
80
  }
36
81
  export declare enum KitMetricId {
37
- BatteryStats = "battery",
38
- PanelPowerStats = "panel_power"
82
+ SolarCharger = "solar_charger",
83
+ PanelPower = "panel_power",
84
+ Fan = "fan",
85
+ FanTemperature = "fan_temperature"
39
86
  }
40
87
  export declare enum KitMetricPeriod {
41
88
  Last15Minutes = "now-15m",
@@ -101,55 +148,6 @@ export declare enum KitChartType {
101
148
  TimeSeries = "timeseries",
102
149
  BarChart = "barchart"
103
150
  }
104
- export type GrafanaDataSource = {
105
- type: string;
106
- uid: string;
107
- };
108
- export type GrafanaTarget = {
109
- expr: string;
110
- refId: string;
111
- datasourceId?: string;
112
- intervalMs?: number;
113
- maxDataPoints?: number;
114
- };
115
- export type GrafanaPanel = {
116
- [key: string]: unknown;
117
- id: GrafanaMetricId;
118
- name: keyof GrafanaMetricId;
119
- title: string;
120
- description: string;
121
- type: KitChartType;
122
- datasource: GrafanaDataSource;
123
- targets: GrafanaTarget[];
124
- maxDataPoints?: number;
125
- interval?: string;
126
- timeFrom?: string;
127
- timeShift?: string;
128
- options?: {
129
- maxDataPoints?: number;
130
- interval?: string;
131
- };
132
- };
133
- export type GrafanaDashboard = {
134
- [key: string]: unknown;
135
- panels: GrafanaPanel[];
136
- time?: {
137
- from: string;
138
- to: string;
139
- };
140
- timepicker?: {
141
- refresh_intervals: string[];
142
- time_options: string[];
143
- };
144
- };
145
- export type GrafanaQueryOptions = {
146
- metricId: GrafanaMetricId;
147
- host: string;
148
- job?: string;
149
- from?: string;
150
- to?: string;
151
- variables?: Record<string, string>;
152
- };
153
151
  export type GrafanaTimeSeriesValue = number | string | null;
154
152
  export type GrafanaTimeSeriesValues = GrafanaTimeSeriesValue[][];
155
153
  export type GrafanaFieldConfig = {
@@ -240,6 +238,7 @@ export type KitQueryParams = PaginationParams & {
240
238
  name: string;
241
239
  serial: string;
242
240
  status: KitStatus;
241
+ tagId: number | number[];
243
242
  };
244
243
  export type AdminKit = {
245
244
  id: number;
@@ -287,9 +286,22 @@ export type KitCreatePayload = {
287
286
  status: KitStatus;
288
287
  powerType: PowerType;
289
288
  config: {
290
- region: Region;
289
+ region: KitRegion;
291
290
  };
292
291
  };
292
+ export type KitMetricStatsEntry = {
293
+ timestamp: string;
294
+ voltage: number;
295
+ current: number;
296
+ panelVoltage: number;
297
+ panelPower: number;
298
+ };
299
+ export type KitFanStatsEntry = {
300
+ timestamp: string;
301
+ speed: number;
302
+ internalTemperature: number;
303
+ externalTemperature: number | null;
304
+ };
293
305
  export type KitUpdatePayload = {
294
306
  countryId: number;
295
307
  name: string;
@@ -297,3 +309,65 @@ export type KitUpdatePayload = {
297
309
  kitStatus: KitStatus;
298
310
  type: string;
299
311
  };
312
+ export declare enum KitStorageTransport {
313
+ Sata = "sata",
314
+ Nvme = "nvme",
315
+ Usb = "usb"
316
+ }
317
+ export type KitStorageRequestPayload = {
318
+ kitId: number;
319
+ };
320
+ export type KitStorage = {
321
+ id: number;
322
+ serial: string;
323
+ status: string;
324
+ type: string;
325
+ metadata: {
326
+ formFactor: string;
327
+ };
328
+ model: string;
329
+ insertedAt: string;
330
+ updatedAt: string;
331
+ vendor: string;
332
+ kitId: number;
333
+ capacity: number;
334
+ freeSpace: number;
335
+ tran: KitStorageTransport;
336
+ };
337
+ export type KitFootageRequestPayload = {
338
+ cameraId: CameraExid;
339
+ storageId: number;
340
+ };
341
+ export type KitFootage = {
342
+ id: number;
343
+ startDate: string;
344
+ endDate: string;
345
+ cameraId: number;
346
+ storageId: number;
347
+ };
348
+ export type KitAlarmItem = {
349
+ id: number;
350
+ kitId: number;
351
+ alarm: KitAlarm;
352
+ startDate: string;
353
+ endDate: string | null;
354
+ };
355
+ export type KitBox = {
356
+ id: string;
357
+ gatewaySerial: string;
358
+ gatewayMac: string;
359
+ gatewayConfig: Record<string, unknown> | null;
360
+ insertedAt: string;
361
+ updatedAt: string;
362
+ };
363
+ export type KitBoxCreatePayload = {
364
+ id?: string;
365
+ gatewaySerial: string;
366
+ gatewayMac: string;
367
+ gatewayConfig?: Record<string, unknown>;
368
+ };
369
+ export type KitBoxQueryParams = PaginationParams & {
370
+ id: string;
371
+ gatewaySerial: string;
372
+ gatewayMac: string;
373
+ };
@@ -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,4 +1,4 @@
1
- import type { CameraExid, Exid, DateType } from "@/types";
1
+ import type { CameraExid, Exid, DateType } from "@evercam/api/types";
2
2
  export type MediaExid = Exid;
3
3
  export type Media = {
4
4
  project_exid?: string;
@@ -25,6 +25,7 @@ export type Media = {
25
25
  projectExid?: string;
26
26
  thumbnailUrl?: string;
27
27
  mediaUrl?: string;
28
+ camera?: string;
28
29
  };
29
30
  export declare enum MediaType {
30
31
  EditedImage = "edit",
@@ -42,7 +43,8 @@ export declare enum MediaFileType {
42
43
  Mp4 = "mp4",
43
44
  Png = "png",
44
45
  Pdf = "pdf",
45
- Jpeg = "jpeg"
46
+ Jpeg = "jpeg",
47
+ Csv = "csv"
46
48
  }
47
49
  export declare enum MediaStatus {
48
50
  Pending = "Pending",
@@ -92,7 +94,7 @@ export type MediaCreateRequestPayload = {
92
94
  cameraExid?: string;
93
95
  requestedBy?: string;
94
96
  notes?: string;
95
- category?: ClipsCategory;
97
+ category?: MediaCategory | ClipsCategory;
96
98
  isUrgent?: boolean;
97
99
  storeAsType?: MediaType;
98
100
  };
@@ -107,6 +109,11 @@ export declare enum ClipsCategory {
107
109
  Marketing = "marketing",
108
110
  BestPracticies = "best_practices"
109
111
  }
112
+ export declare enum MediaCategory {
113
+ Weather = "weather",
114
+ SmartSearch = "smart_search",
115
+ Copilot = "copilot"
116
+ }
110
117
  export type MediaDeleteRequestPayload = {
111
118
  timelapseIds: (string | number)[];
112
119
  compareIds: (string | number)[];
@@ -0,0 +1,96 @@
1
+ export declare enum NotificationType {
2
+ CameraShare = "camera_share",
3
+ CameraStatusChange = "camera_status_changed",
4
+ Mention = "mention",
5
+ TimelapseCreated = "timelapse_created",
6
+ TimelapseFailed = "timelapse_failed",
7
+ DroneProcessing = "drone_processing_done",
8
+ Processing360 = "three_sixty_done",
9
+ SmartSearchExportReady = "smart_search_export_ready",
10
+ SmartSearchExportFailed = "smart_search_export_failed",
11
+ GateReportExportReady = "gate_report_export_ready",
12
+ GateReportExportFailed = "gate_report_export_failed",
13
+ PpeExportReady = "ppe_export_ready",
14
+ PpeExportFailed = "ppe_export_failed",
15
+ WeatherExportReady = "weather_export_ready",
16
+ WeatherExportFailed = "weather_export_failed",
17
+ CompareReady = "compare_ready",
18
+ CompareFailed = "compare_failed",
19
+ ClipExportReady = "clip_export_ready",
20
+ ClipExportFailed = "clip_export_failed",
21
+ NvrClipReady = "nvr_clip_ready",
22
+ NvrClipFailed = "nvr_clip_failed",
23
+ UploadComplete = "upload_complete",
24
+ UploadFailed = "upload_failed",
25
+ RingCamerasImported = "ring_cameras_imported",
26
+ StorageWarning = "storage_warning",
27
+ Other = "other"
28
+ }
29
+ export interface NotificationContextBase {
30
+ cameraExid?: string;
31
+ projectExid?: string;
32
+ }
33
+ export interface CameraShareContext extends NotificationContextBase {
34
+ cameraExid: string;
35
+ projectExid: string;
36
+ shareId: number;
37
+ }
38
+ export interface CameraStatusChangeContext extends NotificationContextBase {
39
+ cameraExid: string;
40
+ projectExid: string;
41
+ newStatus: string;
42
+ }
43
+ export interface MentionContext extends NotificationContextBase {
44
+ }
45
+ export interface TimelapseCreatedContext extends NotificationContextBase {
46
+ cameraExid: string;
47
+ projectExid: string;
48
+ archiveExid: string;
49
+ }
50
+ export interface TimelapseFailedContext extends NotificationContextBase {
51
+ cameraExid: string;
52
+ projectExid: string;
53
+ }
54
+ export interface DroneProcessingContext extends NotificationContextBase {
55
+ projectExid: string;
56
+ droneDate: string;
57
+ }
58
+ export interface Processing360Context extends NotificationContextBase {
59
+ projectExid: string;
60
+ date: string;
61
+ floor: string;
62
+ }
63
+ export interface ExportNotificationContext extends NotificationContextBase {
64
+ projectExid: string;
65
+ archiveExid?: string;
66
+ compareExid?: string;
67
+ }
68
+ export interface UploadNotificationContext extends NotificationContextBase {
69
+ projectExid: string;
70
+ }
71
+ export interface RingCamerasImportedContext extends NotificationContextBase {
72
+ projectExid: string;
73
+ projectName: string;
74
+ cameras: Array<{
75
+ exid: string;
76
+ name: string;
77
+ }>;
78
+ }
79
+ export interface StorageWarningContext extends NotificationContextBase {
80
+ projectExid: string;
81
+ cameraName: string;
82
+ }
83
+ export type NotificationContext = CameraShareContext | CameraStatusChangeContext | MentionContext | TimelapseCreatedContext | TimelapseFailedContext | DroneProcessingContext | Processing360Context | ExportNotificationContext | UploadNotificationContext | RingCamerasImportedContext | StorageWarningContext;
84
+ export type Notification = {
85
+ id: number;
86
+ type: NotificationType;
87
+ insertedAt: string;
88
+ initiatorId: number;
89
+ initiatorFullname: string;
90
+ initiatorEmail: string;
91
+ targetId: number;
92
+ targetFullname: string;
93
+ targetEmail: string;
94
+ readTimestamp: string | null;
95
+ context: NotificationContext;
96
+ };
@@ -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,61 @@
1
+ export declare enum ObservationEventStatus {
2
+ Detected = "detected",
3
+ Approved = "approved",
4
+ Disapproved = "disapproved",
5
+ Unsure = "unsure"
6
+ }
7
+ export interface ObservationEventStatusConfig {
8
+ bg: string;
9
+ fg: string;
10
+ border: string;
11
+ label: string;
12
+ }
13
+ export declare const OBSERVATION_EVENT_STATUS_CONFIGS: Record<ObservationEventStatus, ObservationEventStatusConfig>;
14
+ export interface SiteAnalyticsObservationEvent {
15
+ id: number;
16
+ observationTypeId: number;
17
+ observationName: string | null;
18
+ observationCode: string | null;
19
+ cameraExid: string;
20
+ projectExid: string | null;
21
+ startTime: string;
22
+ endTime: string | null;
23
+ confidence: number | null;
24
+ status: ObservationEventStatus;
25
+ aiEvidence: string | null;
26
+ bbox: number[] | null;
27
+ model: string | null;
28
+ promptId: number | null;
29
+ observationMetadata: Record<string, unknown> | null;
30
+ trigger: string;
31
+ reviewedBy: string | null;
32
+ reviewedAt: string | null;
33
+ insertedAt: string;
34
+ }
35
+ export type ObservationEventQueryParams = {
36
+ cameraExid?: string;
37
+ projectExid?: string;
38
+ observationTypeIds?: string;
39
+ status?: ObservationEventStatus | string;
40
+ sortBy?: string;
41
+ sortDir?: "asc" | "desc";
42
+ page?: number;
43
+ limit?: number;
44
+ };
45
+ export interface ObservationEventListResponse {
46
+ items: SiteAnalyticsObservationEvent[];
47
+ total: number;
48
+ page: number;
49
+ limit: number;
50
+ from: number;
51
+ to: number;
52
+ }
53
+ export type ObservationEventVerdict = ObservationEventStatus.Approved | ObservationEventStatus.Disapproved | ObservationEventStatus.Unsure;
54
+ export interface ObservationEventReviewPayload {
55
+ status: ObservationEventVerdict;
56
+ }
57
+ export interface ObservationEventReviewResponse {
58
+ updated: boolean;
59
+ id: number | string;
60
+ message: string;
61
+ }
@@ -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
+ }