@evercam/api 1.0.0-a0da75d2b → 1.0.0-a1265cf0a

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 (142) hide show
  1. package/README.md +4 -0
  2. package/dist/api/api/3dFirebaseApi.d.ts +216 -0
  3. package/dist/api/api/adminApi.d.ts +381 -0
  4. package/dist/api/api/aiApi.d.ts +186 -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 +158 -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/{weatherApi.d.ts → api/weatherApi.d.ts} +2 -2
  19. package/dist/api/index.d.ts +3 -13
  20. package/dist/api/types/360.d.ts +392 -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 +146 -0
  24. package/dist/{types → api/types}/analytics.d.ts +219 -77
  25. package/dist/{types → api/types}/anpr.d.ts +55 -13
  26. package/dist/{types → api/types}/auditLogs.d.ts +19 -1
  27. package/dist/api/types/authz.d.ts +107 -0
  28. package/dist/{types → api/types}/autodesk.d.ts +7 -7
  29. package/dist/api/types/automation.d.ts +95 -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 +116 -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/{types → api/types}/connector.d.ts +9 -5
  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 +18 -3
  49. package/dist/api/types/ingest.d.ts +159 -0
  50. package/dist/{types → api/types}/kit.d.ts +123 -57
  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 +67 -0
  54. package/dist/api/types/oauth.d.ts +62 -0
  55. package/dist/api/types/observations.d.ts +85 -0
  56. package/dist/api/types/planner.d.ts +124 -0
  57. package/dist/api/types/posthog.d.ts +53 -0
  58. package/dist/api/types/procore.d.ts +229 -0
  59. package/dist/{types → api/types}/progressPhoto.d.ts +11 -23
  60. package/dist/api/types/project.d.ts +254 -0
  61. package/dist/{types → api/types}/recording.d.ts +10 -16
  62. package/dist/api/types/recycleBin.d.ts +14 -0
  63. package/dist/api/types/ring.d.ts +53 -0
  64. package/dist/{types → api/types}/roi.d.ts +2 -9
  65. package/dist/{types → api/types}/routeParams.d.ts +5 -2
  66. package/dist/{types → api/types}/router.d.ts +20 -1
  67. package/dist/{types → api/types}/shared.d.ts +30 -28
  68. package/dist/api/types/shares.d.ts +45 -0
  69. package/dist/{types → api/types}/sim.d.ts +6 -6
  70. package/dist/api/types/siteAnalytics.d.ts +285 -0
  71. package/dist/api/types/siteAnalyticsManagement.d.ts +90 -0
  72. package/dist/api/types/siteView.d.ts +73 -0
  73. package/dist/api/types/smartSeach.d.ts +5 -0
  74. package/dist/api/types/snapshots.d.ts +104 -0
  75. package/dist/api/types/socket.d.ts +4 -0
  76. package/dist/api/types/sso.d.ts +55 -0
  77. package/dist/api/types/storageProvider.d.ts +19 -0
  78. package/dist/api/types/storyblok.d.ts +27 -0
  79. package/dist/{types → api/types}/streaming.d.ts +4 -25
  80. package/dist/api/types/systemCheck.d.ts +11 -0
  81. package/dist/{types → api/types}/tag.d.ts +1 -1
  82. package/dist/api/types/time.d.ts +7 -0
  83. package/dist/{types → api/types}/timelapse.d.ts +7 -11
  84. package/dist/{types → api/types}/user.d.ts +106 -40
  85. package/dist/api/types/videoWall.d.ts +66 -0
  86. package/dist/api/types/weather.d.ts +153 -0
  87. package/dist/{types → api/types}/widget.d.ts +96 -16
  88. package/dist/{types → api/types}/xweather.d.ts +4 -4
  89. package/dist/index.d.ts +2 -3
  90. package/dist/index.js +2713 -1070
  91. package/dist/index.js.map +1 -1
  92. package/dist/index.umd.cjs +1 -1
  93. package/dist/index.umd.cjs.map +1 -1
  94. package/dist/shared/api/index.d.ts +3 -0
  95. package/dist/shared/components/timelinePlayer/providers/index.d.ts +3 -0
  96. package/dist/shared/components/timelinePlayer/providers/timelineAnprProvider.d.ts +17 -0
  97. package/dist/shared/components/timelinePlayer/providers/timelineDataProvider.d.ts +13 -0
  98. package/dist/shared/components/timelinePlayer/providers/timelineLuminanceProvider.d.ts +16 -0
  99. package/dist/shared/types/components.d.ts +370 -0
  100. package/dist/shared/types/customDataTableFilters.d.ts +10 -0
  101. package/dist/shared/types/imagePlayer.d.ts +41 -0
  102. package/dist/shared/types/index.d.ts +7 -0
  103. package/dist/shared/types/observations.d.ts +21 -0
  104. package/dist/shared/types/rbac.d.ts +67 -0
  105. package/dist/shared/types/timeline.d.ts +10 -0
  106. package/package.json +7 -4
  107. package/dist/api/3dFirebaseApi.d.ts +0 -9
  108. package/dist/api/adminApi.d.ts +0 -313
  109. package/dist/api/aiApi.d.ts +0 -110
  110. package/dist/api/authzApi.d.ts +0 -21
  111. package/dist/api/evercamApi.d.ts +0 -280
  112. package/dist/api/evercamLabsApi.d.ts +0 -50
  113. package/dist/api/ingestApi.d.ts +0 -66
  114. package/dist/api/videoWallApi.d.ts +0 -9
  115. package/dist/types/360.d.ts +0 -83
  116. package/dist/types/aconex.d.ts +0 -45
  117. package/dist/types/automation.d.ts +0 -6
  118. package/dist/types/comments.d.ts +0 -36
  119. package/dist/types/company.d.ts +0 -46
  120. package/dist/types/coolify.d.ts +0 -18
  121. package/dist/types/detections.d.ts +0 -76
  122. package/dist/types/devices.d.ts +0 -228
  123. package/dist/types/drone.d.ts +0 -17
  124. package/dist/types/ingest.d.ts +0 -43
  125. package/dist/types/map.d.ts +0 -4
  126. package/dist/types/notification.d.ts +0 -27
  127. package/dist/types/planner.d.ts +0 -28
  128. package/dist/types/procore.d.ts +0 -76
  129. package/dist/types/project.d.ts +0 -123
  130. package/dist/types/shares.d.ts +0 -196
  131. package/dist/types/siteAnalytics.d.ts +0 -84
  132. package/dist/types/snapshots.d.ts +0 -50
  133. package/dist/types/storageServers.d.ts +0 -4
  134. package/dist/types/time.d.ts +0 -19
  135. package/dist/types/vendorModel.d.ts +0 -15
  136. package/dist/types/videoWall.d.ts +0 -33
  137. package/dist/types/weather.d.ts +0 -87
  138. /package/dist/api/{client → api/client}/index.d.ts +0 -0
  139. /package/dist/api/{webRtcApi.d.ts → api/webRtcApi.d.ts} +0 -0
  140. /package/dist/{types → api/types}/nvr.d.ts +0 -0
  141. /package/dist/{types → api/types}/voyageControl.d.ts +0 -0
  142. /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, 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,38 @@ 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
+ CamerasHaveDeviceId = "cameras_have_device_id",
29
+ CamerasRecording = "cameras_recording"
30
+ }
31
+ export declare enum KitSupportCheckStatus {
32
+ Passed = "passed",
33
+ Failed = "failed",
34
+ Skipped = "skipped"
35
+ }
36
+ export type KitSupportCheck = {
37
+ id: KitSupportCheckId;
38
+ name: string;
39
+ status: KitSupportCheckStatus;
40
+ error: string | null;
41
+ };
42
+ export type KitSupportChecklist = {
43
+ checks: KitSupportCheck[];
44
+ };
45
+ export type KitDiagnosticRun = {
46
+ kitId: number;
47
+ kitSerial: string;
48
+ checks: KitSupportCheck[];
49
+ ranAt: string;
50
+ isSeen: boolean;
20
51
  };
21
52
  export declare enum KitStatus {
22
53
  New = "new",
@@ -24,22 +55,31 @@ export declare enum KitStatus {
24
55
  Deployed = "deployed",
25
56
  Decommissioned = "decommissioned"
26
57
  }
58
+ export declare enum KitRegion {
59
+ APAC = "apac",
60
+ EMEA = "emea",
61
+ LATAM = "latam",
62
+ US = "na"
63
+ }
27
64
  export declare enum KitAlarm {
28
65
  NvrOffline = "nvr_offline",
66
+ OfflineScheduled = "offline_scheduled",
29
67
  UnknownCamera = "unknown_camera",
30
68
  NotRecordingCamera = "not_recording_camera",
31
- OfflineScheduled = "offline_scheduled",
32
69
  FullSD = "full_sd",
33
70
  FullStorage = "full_storage",
34
71
  HddUnmounted = "hdd_unmounted",
35
72
  NoHdd = "no_hdd",
36
73
  MissingRouterInfo = "missing_router_info",
37
- PowerLost = "ac_failure",
38
- UpsLowBattery = "low_battery"
74
+ AcFailure = "ac_failure",
75
+ LowBattery = "low_battery",
76
+ GeneratorOff = "generator_off"
39
77
  }
40
78
  export declare enum KitMetricId {
41
- BatteryStats = "battery",
42
- PanelPowerStats = "panel_power"
79
+ SolarCharger = "solar_charger",
80
+ PanelPower = "panel_power",
81
+ Fan = "fan",
82
+ FanTemperature = "fan_temperature"
43
83
  }
44
84
  export declare enum KitMetricPeriod {
45
85
  Last15Minutes = "now-15m",
@@ -105,55 +145,6 @@ export declare enum KitChartType {
105
145
  TimeSeries = "timeseries",
106
146
  BarChart = "barchart"
107
147
  }
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
148
  export type GrafanaTimeSeriesValue = number | string | null;
158
149
  export type GrafanaTimeSeriesValues = GrafanaTimeSeriesValue[][];
159
150
  export type GrafanaFieldConfig = {
@@ -292,9 +283,22 @@ export type KitCreatePayload = {
292
283
  status: KitStatus;
293
284
  powerType: PowerType;
294
285
  config: {
295
- region: Region;
286
+ region: KitRegion;
296
287
  };
297
288
  };
289
+ export type KitMetricStatsEntry = {
290
+ timestamp: string;
291
+ voltage: number;
292
+ current: number;
293
+ panelVoltage: number;
294
+ panelPower: number;
295
+ };
296
+ export type KitFanStatsEntry = {
297
+ timestamp: string;
298
+ speed: number;
299
+ internalTemperature: number;
300
+ externalTemperature: number | null;
301
+ };
298
302
  export type KitUpdatePayload = {
299
303
  countryId: number;
300
304
  name: string;
@@ -302,3 +306,65 @@ export type KitUpdatePayload = {
302
306
  kitStatus: KitStatus;
303
307
  type: string;
304
308
  };
309
+ export declare enum KitStorageTransport {
310
+ Sata = "sata",
311
+ Nvme = "nvme",
312
+ Usb = "usb"
313
+ }
314
+ export type KitStorageRequestPayload = {
315
+ kitId: number;
316
+ };
317
+ export type KitStorage = {
318
+ id: number;
319
+ serial: string;
320
+ status: string;
321
+ type: string;
322
+ metadata: {
323
+ formFactor: string;
324
+ };
325
+ model: string;
326
+ insertedAt: string;
327
+ updatedAt: string;
328
+ vendor: string;
329
+ kitId: number;
330
+ capacity: number;
331
+ freeSpace: number;
332
+ tran: KitStorageTransport;
333
+ };
334
+ export type KitFootageRequestPayload = {
335
+ cameraId: CameraExid;
336
+ storageId: number;
337
+ };
338
+ export type KitFootage = {
339
+ id: number;
340
+ startDate: string;
341
+ endDate: string;
342
+ cameraId: number;
343
+ storageId: number;
344
+ };
345
+ export type KitAlarmItem = {
346
+ id: number;
347
+ kitId: number;
348
+ alarm: KitAlarm;
349
+ startDate: string;
350
+ endDate: string | null;
351
+ };
352
+ export type KitBox = {
353
+ id: string;
354
+ gatewaySerial: string;
355
+ gatewayMac: string;
356
+ gatewayConfig: Record<string, unknown> | null;
357
+ insertedAt: string;
358
+ updatedAt: string;
359
+ };
360
+ export type KitBoxCreatePayload = {
361
+ id?: string;
362
+ gatewaySerial: string;
363
+ gatewayMac: string;
364
+ gatewayConfig?: Record<string, unknown>;
365
+ };
366
+ export type KitBoxQueryParams = PaginationParams & {
367
+ id: string;
368
+ gatewaySerial: string;
369
+ gatewayMac: string;
370
+ };
@@ -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,67 @@
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
+ }
16
+ export interface NotificationContextBase {
17
+ cameraExid?: string;
18
+ projectExid?: string;
19
+ }
20
+ export interface CameraShareContext extends NotificationContextBase {
21
+ cameraExid: string;
22
+ projectExid: string;
23
+ shareId: number;
24
+ }
25
+ export interface CameraStatusChangeContext extends NotificationContextBase {
26
+ cameraExid: string;
27
+ projectExid: string;
28
+ newStatus: string;
29
+ }
30
+ export interface MentionContext extends NotificationContextBase {
31
+ }
32
+ export interface TimelapseCreatedContext extends NotificationContextBase {
33
+ cameraExid: string;
34
+ projectExid: string;
35
+ archiveExid: string;
36
+ }
37
+ export interface TimelapseFailedContext extends NotificationContextBase {
38
+ cameraExid: string;
39
+ projectExid: string;
40
+ }
41
+ export interface DroneProcessingContext extends NotificationContextBase {
42
+ projectExid: string;
43
+ droneDate: string;
44
+ }
45
+ export interface Processing360Context extends NotificationContextBase {
46
+ projectExid: string;
47
+ date: string;
48
+ floor: string;
49
+ }
50
+ export interface ExportNotificationContext extends NotificationContextBase {
51
+ projectExid: string;
52
+ archiveExid?: string;
53
+ }
54
+ export type NotificationContext = CameraShareContext | CameraStatusChangeContext | MentionContext | TimelapseCreatedContext | TimelapseFailedContext | DroneProcessingContext | Processing360Context | ExportNotificationContext;
55
+ export type Notification = {
56
+ id: number;
57
+ type: NotificationType;
58
+ insertedAt: string;
59
+ initiatorId: number;
60
+ initiatorFullname: string;
61
+ initiatorEmail: string;
62
+ targetId: number;
63
+ targetFullname: string;
64
+ targetEmail: string;
65
+ readTimestamp: string | null;
66
+ context: NotificationContext;
67
+ };
@@ -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,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
+ }
@@ -0,0 +1,124 @@
1
+ import { GeoPoint, TuplePoint2D } from "./shared";
2
+ import { MapType } from "./map";
3
+ export type PlannerListItem = {
4
+ id: string;
5
+ projectId: string;
6
+ projectName: string;
7
+ projectLocation: string;
8
+ createdDate: string;
9
+ updatedDate: string;
10
+ owner?: string;
11
+ lastUpdatedBy?: string;
12
+ camerasCount?: number;
13
+ hasPlan?: boolean;
14
+ thumbnailUrl?: string;
15
+ projectMapType?: MapType;
16
+ sessionId?: string;
17
+ };
18
+ export type PolygonPath = TuplePoint2D[];
19
+ export type PolygonCoordinates = PolygonPath[];
20
+ export interface GeoJSONPolygon {
21
+ type: "Polygon";
22
+ coordinates: PolygonCoordinates;
23
+ }
24
+ export declare enum PlannerUrlParams {
25
+ SitePlanId = "site_plan_id",
26
+ IsNewSitePlan = "is_new_site_plan",
27
+ IsBoundsMode = "is_bounds_mode",
28
+ ProjectPosition = "project_position",
29
+ DealId = "deal_id"
30
+ }
31
+ export declare enum EDistortImageModes {
32
+ FreeRotate = "freeRotate",
33
+ Lock = "lock",
34
+ Rotate = "rotate",
35
+ Scale = "scale",
36
+ Pan = "drag"
37
+ }
38
+ export declare enum EMapTypes {
39
+ Blank = "Blank",
40
+ Satellite = "Satellite",
41
+ Street = "Street",
42
+ GoogleSatellite = "hybrid",
43
+ GoogleStreet = "roadmap",
44
+ GoogleTerrain = "terrain"
45
+ }
46
+ export declare enum EMarkers {
47
+ CameraMarker = "cameraMarker",
48
+ ThreeSixtyMarker = "threeSixtyMarkers"
49
+ }
50
+ export declare enum EPageType {
51
+ List = "list",
52
+ Item = "item"
53
+ }
54
+ export declare enum ERoles {
55
+ Admin = "admin",
56
+ User = "user"
57
+ }
58
+ export type PlannerOverlay = {
59
+ imageUrl?: string;
60
+ corners?: {
61
+ topLeft: GeoPoint;
62
+ topRight: GeoPoint;
63
+ bottomLeft: GeoPoint;
64
+ bottomRight: GeoPoint;
65
+ } | null;
66
+ };
67
+ export type PlannerCameraMarker = {
68
+ name?: string;
69
+ location?: GeoPoint;
70
+ heading?: number;
71
+ fovAngle?: number;
72
+ fovRadius?: number;
73
+ isVisible?: boolean;
74
+ color?: string;
75
+ };
76
+ export type SitePlanBounds = {
77
+ northEast: GeoPoint;
78
+ southWest: GeoPoint;
79
+ };
80
+ export type SitePlan = {
81
+ id?: string;
82
+ projectId?: string;
83
+ owner?: string;
84
+ lastUpdatedBy?: string;
85
+ projectName?: string;
86
+ projectLocation?: string;
87
+ projectMapType?: EMapTypes;
88
+ projectBounds?: SitePlanBounds;
89
+ overlay?: PlannerOverlay;
90
+ markers?: PlannerCameraMarker[];
91
+ thumbnailUrl?: string;
92
+ createdDate?: string;
93
+ updatedDate?: string;
94
+ };
95
+ export interface IDrawControl {
96
+ _toolbars: {
97
+ draw: {
98
+ _activeMode: {
99
+ handler: {
100
+ disable(): void;
101
+ completeShape(): void;
102
+ };
103
+ };
104
+ _modes: {
105
+ polygon: {
106
+ handler: {
107
+ enable(): void;
108
+ };
109
+ };
110
+ };
111
+ };
112
+ edit: {
113
+ _modes: {
114
+ edit: {
115
+ handler: {
116
+ enable(): void;
117
+ disable(): void;
118
+ save(): void;
119
+ };
120
+ };
121
+ };
122
+ };
123
+ };
124
+ }
@@ -0,0 +1,53 @@
1
+ export type ActiveUsersRequestPayload = {
2
+ from?: string;
3
+ to?: string;
4
+ companyExid?: string;
5
+ projectExid?: string;
6
+ cameraExid?: string;
7
+ };
8
+ export type ActiveUsersResponsePayload = Array<{
9
+ date?: string;
10
+ dau?: number;
11
+ wau?: number;
12
+ mau?: number;
13
+ }>;
14
+ export declare enum ActiveUsersMetric {
15
+ DAU = "dau",
16
+ WAU = "wau",
17
+ MAU = "mau"
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
+ };
39
+ export type PosthogUserParams = {
40
+ firstname?: string;
41
+ lastname?: string;
42
+ email: string;
43
+ telephone?: string;
44
+ country?: string;
45
+ isAdmin?: boolean;
46
+ persona?: string;
47
+ companyExid: string;
48
+ companyName: string;
49
+ isImpersonationLogin: boolean;
50
+ ImpersonatedUserEmail?: string;
51
+ ImpersonatedUserFirstname?: string;
52
+ impersonatedUserLastname?: string;
53
+ };