@evercam/api 1.0.0-301c729f4 → 1.0.0-3159f07b5

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 (138) hide show
  1. package/README.md +4 -0
  2. package/dist/api/api/3dFirebaseApi.d.ts +209 -0
  3. package/dist/api/api/adminApi.d.ts +381 -0
  4. package/dist/api/api/aiApi.d.ts +215 -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/api/client/swr/Swr.d.ts +14 -0
  8. package/dist/api/api/client/swr/SwrStore.d.ts +10 -0
  9. package/dist/api/api/evercamApi.d.ts +357 -0
  10. package/dist/api/{evercamLabsApi.d.ts → api/evercamLabsApi.d.ts} +9 -6
  11. package/dist/api/{exNvrApi.d.ts → api/exNvrApi.d.ts} +1 -1
  12. package/dist/api/api/index.d.ts +13 -0
  13. package/dist/api/api/ingestApi.d.ts +162 -0
  14. package/dist/api/{ptzApi.d.ts → api/ptzApi.d.ts} +12 -3
  15. package/dist/api/api/videoWallApi.d.ts +9 -0
  16. package/dist/api/{weatherApi.d.ts → api/weatherApi.d.ts} +2 -2
  17. package/dist/api/index.d.ts +3 -13
  18. package/dist/api/types/360.d.ts +360 -0
  19. package/dist/api/types/aconex.d.ts +143 -0
  20. package/dist/api/types/admin.d.ts +51 -0
  21. package/dist/api/types/aiConfigs.d.ts +242 -0
  22. package/dist/{types → api/types}/analytics.d.ts +204 -48
  23. package/dist/{types → api/types}/anpr.d.ts +55 -13
  24. package/dist/{types → api/types}/auditLogs.d.ts +19 -1
  25. package/dist/api/types/authz.d.ts +132 -0
  26. package/dist/{types → api/types}/autodesk.d.ts +7 -7
  27. package/dist/api/types/automation.d.ts +114 -0
  28. package/dist/{types → api/types}/axios.d.ts +31 -11
  29. package/dist/{types → api/types}/bim.d.ts +38 -9
  30. package/dist/{types → api/types}/camera.d.ts +114 -101
  31. package/dist/{types → api/types}/comments.d.ts +26 -11
  32. package/dist/api/types/company.d.ts +115 -0
  33. package/dist/{types → api/types}/compare.d.ts +20 -5
  34. package/dist/{types → api/types}/connector.d.ts +5 -5
  35. package/dist/api/types/coolify.d.ts +36 -0
  36. package/dist/{types → api/types}/copilot.d.ts +11 -9
  37. package/dist/{types → api/types}/countries.d.ts +0 -7
  38. package/dist/{types → api/types}/credentials.d.ts +1 -0
  39. package/dist/{types → api/types}/detections.d.ts +23 -33
  40. package/dist/api/types/drone.d.ts +106 -0
  41. package/dist/{types → api/types}/errors.d.ts +14 -1
  42. package/dist/{types → api/types}/gateReport.d.ts +49 -168
  43. package/dist/api/types/gateReportManagement.d.ts +170 -0
  44. package/dist/api/types/hammertech.d.ts +98 -0
  45. package/dist/{types → api/types}/hdd.d.ts +26 -1
  46. package/dist/{types → api/types}/index.d.ts +18 -2
  47. package/dist/api/types/ingest.d.ts +234 -0
  48. package/dist/{types → api/types}/kit.d.ts +104 -59
  49. package/dist/api/types/map.d.ts +16 -0
  50. package/dist/{types → api/types}/media.d.ts +10 -3
  51. package/dist/api/types/notification.d.ts +96 -0
  52. package/dist/api/types/oauth.d.ts +62 -0
  53. package/dist/api/types/observationEvents.d.ts +61 -0
  54. package/dist/api/types/observations.d.ts +84 -0
  55. package/dist/api/types/planner.d.ts +125 -0
  56. package/dist/api/types/posthog.d.ts +53 -0
  57. package/dist/{types → api/types}/procore.d.ts +26 -16
  58. package/dist/{types → api/types}/progressPhoto.d.ts +11 -23
  59. package/dist/api/types/project.d.ts +254 -0
  60. package/dist/{types → api/types}/recording.d.ts +10 -16
  61. package/dist/api/types/recycleBin.d.ts +14 -0
  62. package/dist/api/types/ring.d.ts +53 -0
  63. package/dist/{types → api/types}/roi.d.ts +3 -11
  64. package/dist/{types → api/types}/routeParams.d.ts +5 -2
  65. package/dist/{types → api/types}/router.d.ts +20 -1
  66. package/dist/{types → api/types}/shared.d.ts +30 -28
  67. package/dist/api/types/shares.d.ts +45 -0
  68. package/dist/{types → api/types}/sim.d.ts +6 -6
  69. package/dist/api/types/siteAnalytics.d.ts +285 -0
  70. package/dist/api/types/siteAnalyticsManagement.d.ts +117 -0
  71. package/dist/api/types/siteView.d.ts +73 -0
  72. package/dist/api/types/smartSeach.d.ts +5 -0
  73. package/dist/api/types/snapshots.d.ts +104 -0
  74. package/dist/api/types/socket.d.ts +4 -0
  75. package/dist/api/types/sso.d.ts +55 -0
  76. package/dist/api/types/storageProvider.d.ts +19 -0
  77. package/dist/api/types/storyblok.d.ts +27 -0
  78. package/dist/{types → api/types}/streaming.d.ts +4 -5
  79. package/dist/{types → api/types}/tag.d.ts +1 -1
  80. package/dist/api/types/time.d.ts +7 -0
  81. package/dist/{types → api/types}/timelapse.d.ts +7 -11
  82. package/dist/{types → api/types}/user.d.ts +106 -40
  83. package/dist/api/types/videoWall.d.ts +66 -0
  84. package/dist/api/types/weather.d.ts +153 -0
  85. package/dist/{types → api/types}/widget.d.ts +96 -16
  86. package/dist/{types → api/types}/xweather.d.ts +4 -4
  87. package/dist/index.d.ts +2 -3
  88. package/dist/index.js +2683 -1007
  89. package/dist/index.js.map +1 -1
  90. package/dist/index.umd.cjs +1 -1
  91. package/dist/index.umd.cjs.map +1 -1
  92. package/dist/shared/api/index.d.ts +3 -0
  93. package/dist/shared/components/timelinePlayer/providers/index.d.ts +3 -0
  94. package/dist/shared/components/timelinePlayer/providers/timelineAnprProvider.d.ts +17 -0
  95. package/dist/shared/components/timelinePlayer/providers/timelineDataProvider.d.ts +13 -0
  96. package/dist/shared/components/timelinePlayer/providers/timelineLuminanceProvider.d.ts +16 -0
  97. package/dist/shared/types/components.d.ts +376 -0
  98. package/dist/shared/types/customDataTableFilters.d.ts +10 -0
  99. package/dist/shared/types/imagePlayer.d.ts +41 -0
  100. package/dist/shared/types/index.d.ts +7 -0
  101. package/dist/shared/types/observations.d.ts +25 -0
  102. package/dist/shared/types/rbac.d.ts +67 -0
  103. package/dist/shared/types/timeline.d.ts +10 -0
  104. package/package.json +7 -4
  105. package/dist/api/3dFirebaseApi.d.ts +0 -10
  106. package/dist/api/adminApi.d.ts +0 -313
  107. package/dist/api/aiApi.d.ts +0 -138
  108. package/dist/api/authzApi.d.ts +0 -21
  109. package/dist/api/evercamApi.d.ts +0 -294
  110. package/dist/api/ingestApi.d.ts +0 -67
  111. package/dist/api/videoWallApi.d.ts +0 -9
  112. package/dist/types/360.d.ts +0 -87
  113. package/dist/types/aconex.d.ts +0 -45
  114. package/dist/types/automation.d.ts +0 -6
  115. package/dist/types/company.d.ts +0 -46
  116. package/dist/types/coolify.d.ts +0 -18
  117. package/dist/types/drone.d.ts +0 -17
  118. package/dist/types/ingest.d.ts +0 -43
  119. package/dist/types/map.d.ts +0 -4
  120. package/dist/types/notification.d.ts +0 -27
  121. package/dist/types/planner.d.ts +0 -28
  122. package/dist/types/project.d.ts +0 -128
  123. package/dist/types/shares.d.ts +0 -196
  124. package/dist/types/siteAnalytics.d.ts +0 -141
  125. package/dist/types/snapshots.d.ts +0 -50
  126. package/dist/types/storageServers.d.ts +0 -4
  127. package/dist/types/time.d.ts +0 -21
  128. package/dist/types/vendorModel.d.ts +0 -15
  129. package/dist/types/videoWall.d.ts +0 -33
  130. package/dist/types/weather.d.ts +0 -87
  131. /package/dist/api/{client → api/client}/customErrors.d.ts +0 -0
  132. /package/dist/api/{client → api/client}/index.d.ts +0 -0
  133. /package/dist/api/{client → api/client}/interceptors.d.ts +0 -0
  134. /package/dist/api/{webRtcApi.d.ts → api/webRtcApi.d.ts} +0 -0
  135. /package/dist/{types → api/types}/nvr.d.ts +0 -0
  136. /package/dist/{types → api/types}/systemCheck.d.ts +0 -0
  137. /package/dist/{types → api/types}/voyageControl.d.ts +0 -0
  138. /package/dist/{utils.d.ts → api/utils.d.ts} +0 -0
@@ -1,10 +1,10 @@
1
- import { CountryCode, CountryId, DateTime, DateType, Nvr, PaginationParams, PowerType, Project, Region, Router, Schedule, Tag } 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,7 +16,41 @@ export type Kit = {
16
16
  serial: string;
17
17
  status: KitStatus;
18
18
  powerSchedule: Schedule;
19
+ ups: boolean;
20
+ boxId: string;
19
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;
20
54
  };
21
55
  export declare enum KitStatus {
22
56
  New = "new",
@@ -24,22 +58,31 @@ export declare enum KitStatus {
24
58
  Deployed = "deployed",
25
59
  Decommissioned = "decommissioned"
26
60
  }
61
+ export declare enum KitRegion {
62
+ APAC = "apac",
63
+ EMEA = "emea",
64
+ LATAM = "latam",
65
+ US = "na"
66
+ }
27
67
  export declare enum KitAlarm {
28
68
  NvrOffline = "nvr_offline",
69
+ OfflineScheduled = "offline_scheduled",
29
70
  UnknownCamera = "unknown_camera",
30
71
  NotRecordingCamera = "not_recording_camera",
31
- OfflineScheduled = "offline_scheduled",
32
72
  FullSD = "full_sd",
33
73
  FullStorage = "full_storage",
34
74
  HddUnmounted = "hdd_unmounted",
35
75
  NoHdd = "no_hdd",
36
76
  MissingRouterInfo = "missing_router_info",
37
- PowerLost = "ac_failure",
38
- UpsLowBattery = "low_battery"
77
+ AcFailure = "ac_failure",
78
+ LowBattery = "low_battery",
79
+ GeneratorOff = "generator_off"
39
80
  }
40
81
  export declare enum KitMetricId {
41
82
  SolarCharger = "solar_charger",
42
- PanelPower = "panel_power"
83
+ PanelPower = "panel_power",
84
+ Fan = "fan",
85
+ FanTemperature = "fan_temperature"
43
86
  }
44
87
  export declare enum KitMetricPeriod {
45
88
  Last15Minutes = "now-15m",
@@ -105,55 +148,6 @@ export declare enum KitChartType {
105
148
  TimeSeries = "timeseries",
106
149
  BarChart = "barchart"
107
150
  }
108
- export type GrafanaDataSource = {
109
- type: string;
110
- uid: string;
111
- };
112
- export type GrafanaTarget = {
113
- expr: string;
114
- refId: string;
115
- datasourceId?: string;
116
- intervalMs?: number;
117
- maxDataPoints?: number;
118
- };
119
- export type GrafanaPanel = {
120
- [key: string]: unknown;
121
- id: GrafanaMetricId;
122
- name: keyof GrafanaMetricId;
123
- title: string;
124
- description: string;
125
- type: KitChartType;
126
- datasource: GrafanaDataSource;
127
- targets: GrafanaTarget[];
128
- maxDataPoints?: number;
129
- interval?: string;
130
- timeFrom?: string;
131
- timeShift?: string;
132
- options?: {
133
- maxDataPoints?: number;
134
- interval?: string;
135
- };
136
- };
137
- export type GrafanaDashboard = {
138
- [key: string]: unknown;
139
- panels: GrafanaPanel[];
140
- time?: {
141
- from: string;
142
- to: string;
143
- };
144
- timepicker?: {
145
- refresh_intervals: string[];
146
- time_options: string[];
147
- };
148
- };
149
- export type GrafanaQueryOptions = {
150
- metricId: GrafanaMetricId;
151
- host: string;
152
- job?: string;
153
- from?: string;
154
- to?: string;
155
- variables?: Record<string, string>;
156
- };
157
151
  export type GrafanaTimeSeriesValue = number | string | null;
158
152
  export type GrafanaTimeSeriesValues = GrafanaTimeSeriesValue[][];
159
153
  export type GrafanaFieldConfig = {
@@ -292,9 +286,22 @@ export type KitCreatePayload = {
292
286
  status: KitStatus;
293
287
  powerType: PowerType;
294
288
  config: {
295
- region: Region;
289
+ region: KitRegion;
296
290
  };
297
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
+ };
298
305
  export type KitUpdatePayload = {
299
306
  countryId: number;
300
307
  name: string;
@@ -310,7 +317,7 @@ export declare enum KitStorageTransport {
310
317
  export type KitStorageRequestPayload = {
311
318
  kitId: number;
312
319
  };
313
- export type KitStorageResponsePayload = {
320
+ export type KitStorage = {
314
321
  id: number;
315
322
  serial: string;
316
323
  status: string;
@@ -319,10 +326,48 @@ export type KitStorageResponsePayload = {
319
326
  formFactor: string;
320
327
  };
321
328
  model: string;
322
- insertedAt: DateTime;
323
- updatedAt: DateTime;
329
+ insertedAt: string;
330
+ updatedAt: string;
324
331
  vendor: string;
325
332
  kitId: number;
326
333
  capacity: number;
334
+ freeSpace: number;
327
335
  tran: KitStorageTransport;
328
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,84 @@
1
+ import { type ProjectExid, type CameraExid, type DateType, type BBox, AiObservationFeasibilityStatus, ObservationEventStatus, DownloadFileType } from "@evercam/api/types";
2
+ export type ObservationApproval = boolean | ObservationEventStatus.Unsure | null;
3
+ export type ObservationEvent = {
4
+ id: number;
5
+ observationTypeId: number;
6
+ observationCode: string | null;
7
+ cameraExid: CameraExid;
8
+ projectExid: ProjectExid | null;
9
+ capturedAt: DateType;
10
+ endTime: DateType | null;
11
+ confidence: number | null;
12
+ status: ObservationEventStatus;
13
+ isApproved: ObservationApproval;
14
+ reason: string | null;
15
+ personBbox: BBox | null;
16
+ modelVersion: string | null;
17
+ observationMetadata: Record<string, unknown> | null;
18
+ trigger: string;
19
+ reviewedBy: string | null;
20
+ reviewedAt: DateType | null;
21
+ };
22
+ export type ObservationType = {
23
+ id: number;
24
+ observationCode: string;
25
+ name: string;
26
+ description: string | null;
27
+ type: string;
28
+ severity: number | null;
29
+ feasibilityStatus: AiObservationFeasibilityStatus;
30
+ };
31
+ export declare enum ObservationMissingItem {
32
+ Helmet = "helmet",
33
+ HighVisVest = "high_vis_vest",
34
+ Gloves = "gloves",
35
+ Glasses = "glasses"
36
+ }
37
+ export type ObservationEventsQueryParams = {
38
+ cameraExid?: CameraExid;
39
+ observationCode?: string;
40
+ fromDate?: string;
41
+ toDate?: string;
42
+ missingItems?: string;
43
+ status?: ObservationEventStatus;
44
+ sort?: string;
45
+ page?: number;
46
+ limit?: number;
47
+ };
48
+ export type ObservationEventsExportQueryParams = {
49
+ cameraExid?: CameraExid;
50
+ fromDate: string;
51
+ toDate: string;
52
+ required?: string;
53
+ compliant?: boolean;
54
+ fileType: DownloadFileType;
55
+ directDownload?: boolean;
56
+ includeInvalid?: boolean;
57
+ };
58
+ export type ObservationApprovalUpdateResponse = {
59
+ updated: boolean;
60
+ id: number | string | null;
61
+ message: string;
62
+ };
63
+ export declare enum ObservationCountsGranularity {
64
+ Day = "day",
65
+ Week = "week",
66
+ Month = "month"
67
+ }
68
+ export type ObservationEventsCountsQueryParams = {
69
+ cameraExid?: CameraExid;
70
+ observationCode?: string;
71
+ fromDate?: string;
72
+ toDate?: string;
73
+ missingItems?: string;
74
+ status?: ObservationEventStatus;
75
+ granularity?: ObservationCountsGranularity;
76
+ };
77
+ export type ObservationEventCount = {
78
+ bucket: DateType;
79
+ total: number;
80
+ };
81
+ export declare enum ObservationRequiredItem {
82
+ Helmet = "has_helmet",
83
+ HighVisVest = "has_high_vis_vest"
84
+ }