@evercam/api 1.0.0-57d7783ef → 1.0.0-5841dedff

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 (51) hide show
  1. package/dist/api/api/3dFirebaseApi.d.ts +6 -0
  2. package/dist/api/api/adminApi.d.ts +2 -1
  3. package/dist/api/api/aiApi.d.ts +48 -2
  4. package/dist/api/api/authzApi.d.ts +4 -1
  5. package/dist/api/api/evercamApi.d.ts +16 -5
  6. package/dist/api/api/ingestApi.d.ts +4 -2
  7. package/dist/api/types/360.d.ts +28 -31
  8. package/dist/api/types/aiConfigs.d.ts +99 -11
  9. package/dist/api/types/analytics.d.ts +6 -0
  10. package/dist/api/types/authz.d.ts +46 -0
  11. package/dist/api/types/automation.d.ts +23 -4
  12. package/dist/api/types/axios.d.ts +1 -4
  13. package/dist/api/types/bim.d.ts +3 -5
  14. package/dist/api/types/camera.d.ts +2 -7
  15. package/dist/api/types/connector.d.ts +1 -0
  16. package/dist/api/types/copilot.d.ts +0 -3
  17. package/dist/api/types/detections.d.ts +1 -0
  18. package/dist/api/types/drone.d.ts +1 -1
  19. package/dist/api/types/errors.d.ts +2 -1
  20. package/dist/api/types/gateReport.d.ts +0 -11
  21. package/dist/api/types/gateReportManagement.d.ts +2 -7
  22. package/dist/api/types/hammertech.d.ts +98 -0
  23. package/dist/api/types/index.d.ts +4 -1
  24. package/dist/api/types/ingest.d.ts +2 -1
  25. package/dist/api/types/kit.d.ts +30 -49
  26. package/dist/api/types/media.d.ts +2 -1
  27. package/dist/api/types/notification.d.ts +12 -2
  28. package/dist/api/types/observationEvents.d.ts +61 -0
  29. package/dist/api/types/observations.d.ts +85 -0
  30. package/dist/api/types/planner.d.ts +0 -8
  31. package/dist/api/types/project.d.ts +7 -0
  32. package/dist/api/types/recording.d.ts +2 -4
  33. package/dist/api/types/ring.d.ts +16 -16
  34. package/dist/api/types/roi.d.ts +0 -9
  35. package/dist/api/types/routeParams.d.ts +1 -0
  36. package/dist/api/types/shared.d.ts +0 -19
  37. package/dist/api/types/shares.d.ts +0 -13
  38. package/dist/api/types/siteAnalytics.d.ts +1 -3
  39. package/dist/api/types/siteAnalyticsManagement.d.ts +29 -4
  40. package/dist/api/types/socket.d.ts +4 -0
  41. package/dist/api/types/storyblok.d.ts +0 -13
  42. package/dist/api/types/timelapse.d.ts +1 -8
  43. package/dist/index.js +912 -628
  44. package/dist/index.js.map +1 -1
  45. package/dist/index.umd.cjs +1 -1
  46. package/dist/index.umd.cjs.map +1 -1
  47. package/dist/shared/types/components.d.ts +64 -28
  48. package/dist/shared/types/index.d.ts +1 -0
  49. package/dist/shared/types/observations.d.ts +21 -0
  50. package/package.json +1 -1
  51. package/dist/api/types/vendorModel.d.ts +0 -15
@@ -1,9 +1,5 @@
1
1
  import type { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, CancelTokenSource, CancelTokenStatic } from "axios";
2
2
  import { Swr } from "@evercam/api/api/client/swr/Swr";
3
- export type TimedRequest<T> = Promise<AxiosResponse<T> & {
4
- duration: number;
5
- error?: AxiosError;
6
- }>;
7
3
  export type AxiosEnvironment = {
8
4
  baseUrl?: string | null;
9
5
  stagingAiApiUrl?: string | null;
@@ -32,6 +28,7 @@ export type ResponseInterceptor = (res: AxiosResponse, env: AxiosEnvironment) =>
32
28
  export type ErrorInterceptor = (error: any, env: AxiosEnvironment) => any;
33
29
  export type RequestManager = {
34
30
  createToken: (key: string) => CancelTokenSource["token"];
31
+ cancelToken: (key: string) => void;
35
32
  cancelAll: () => void;
36
33
  };
37
34
  export interface ExtendedAxiosInstance extends AxiosInstance {
@@ -1,4 +1,4 @@
1
- import { CompareLogoPosition, DateType } from "@evercam/api/types";
1
+ import { CompareLogoPosition, DateType, PaginationParams } from "@evercam/api/types";
2
2
  export declare enum BimModelType {
3
3
  Architectural = "Architectural",
4
4
  Structural = "Structural",
@@ -101,7 +101,7 @@ export type BIMLayerPostPayload = {
101
101
  layerType: BIMLayerTypes;
102
102
  startAt: DateType;
103
103
  shapes: string;
104
- zIndex: number;
104
+ zIndex?: number;
105
105
  };
106
106
  export type BIMLayer = {
107
107
  id: number;
@@ -137,9 +137,7 @@ export type ProcessPendingImagesBimParams = {
137
137
  apiId: string;
138
138
  apiKey: string;
139
139
  };
140
- export type BimUploadsQueryParams = {
141
- page: number;
142
- limit: number;
140
+ export type BimUploadsQueryParams = PaginationParams & {
143
141
  projectId: string;
144
142
  id: string;
145
143
  uploadedBy: string;
@@ -81,6 +81,7 @@ export type Camera = {
81
81
  isAccessRestricted?: boolean;
82
82
  kitAlarms?: KitAlarm[];
83
83
  timestampPosition?: TimestampPositionCoordinates;
84
+ position?: number | null;
84
85
  };
85
86
  export type AdminCamera = {
86
87
  id: number;
@@ -202,16 +203,10 @@ export declare enum CameraFeatureFlag {
202
203
  PpeYolo = "ppe_yolo",
203
204
  PpeV2 = "ppe_v2",
204
205
  NoLiveView = "no_live_view",
206
+ NoRecordings = "no_recordings",
205
207
  Ring = "ring",
206
208
  CloudOnly = "cloud_only"
207
209
  }
208
- export type CameraLogsRequestPayload = {
209
- limit: number;
210
- page: number;
211
- types: string;
212
- from: string;
213
- to: string;
214
- };
215
210
  export type CameraUpdateRequestPayload = {
216
211
  status?: string;
217
212
  timezone?: string;
@@ -11,6 +11,7 @@ export declare enum Connector {
11
11
  VoyageControl = "voyage_control",
12
12
  Ring = "ring",
13
13
  Email = "email",
14
+ Hammertech = "hammertech",
14
15
  XWeather = "xweather"
15
16
  }
16
17
  export declare enum ProcoreType {
@@ -45,9 +45,6 @@ export type CopilotMissingField<T = unknown> = {
45
45
  error?: T;
46
46
  };
47
47
  export type CopilotMissingFields = Record<number, CopilotMissingField[]>;
48
- export type UserConversations = CopilotConversation & {
49
- Message: CopilotMessage[];
50
- };
51
48
  export declare enum CopilotSocketEvent {
52
49
  ConversationStart = "conversation:start",
53
50
  ConversationCreated = "conversation:created",
@@ -102,6 +102,7 @@ export declare enum PpeLabel {
102
102
  Helmet = "helmet",
103
103
  HighVisibilityVest = "high-visibility-vest",
104
104
  SafetyGlasses = "safety-glasses",
105
+ Gloves = "gloves",
105
106
  Person = "person",
106
107
  Man = "man",
107
108
  Woman = "woman"
@@ -57,7 +57,7 @@ export type DroneTag<T extends DroneTagType = DroneTagType> = {
57
57
  type: T;
58
58
  comment: string;
59
59
  position?: Point3D;
60
- cameraTransform?: DroneCameraTransform;
60
+ cameraTransform?: string;
61
61
  creationDate: string;
62
62
  hyperlink?: string;
63
63
  height?: number;
@@ -23,7 +23,8 @@ export declare enum ErrorCode {
23
23
  UnauthorizedError = 401,
24
24
  ForbiddenError = 403,
25
25
  NotFoundError = 404,
26
- ConflictError = 409
26
+ ConflictError = 409,
27
+ GoneError = 410
27
28
  }
28
29
  export declare enum EvercamApiErrorCode {
29
30
  IntegrationError = "INTEGRATION_ERROR",
@@ -166,12 +166,6 @@ export type GateReportEvent = {
166
166
  truckType: GateReportVehicleType;
167
167
  thumbnailUrl?: string;
168
168
  };
169
- export type GateReportArrivedEvent = GateReportEvent & {
170
- eventType: GateReportEventType.Arrived;
171
- };
172
- export type GateReportLeftEvent = GateReportEvent & {
173
- eventType: GateReportEventType.Left;
174
- };
175
169
  export type GateReportVerifiedDay = {
176
170
  id: number;
177
171
  day: string;
@@ -188,7 +182,6 @@ export type BoundingBox = {
188
182
  ymax: number;
189
183
  ymin: number;
190
184
  };
191
- export type EventsCountsByVehicleType = Record<GateReportVehicleType, number>;
192
185
  export type EventsCount = {
193
186
  in: number;
194
187
  out: number;
@@ -203,10 +196,6 @@ export type MonthlyEventCount = EventsCount & {
203
196
  export type DailyEventCount = EventsCount & {
204
197
  day: string;
205
198
  };
206
- export type HourlyEventCount = {
207
- hour: string;
208
- count: number;
209
- };
210
199
  export type EventCountRequestPayload = {
211
200
  vehicleTypes?: GateReportVehicleType[];
212
201
  isPublic?: boolean;
@@ -1,4 +1,4 @@
1
- import { CameraExid, DateType, ProjectExid } from "@evercam/api/types";
1
+ import { CameraExid, DateType, PaginationParams, ProjectExid } from "@evercam/api/types";
2
2
  export declare enum VehicleClassifierSource {
3
3
  Local = "local",
4
4
  Api = "api"
@@ -130,11 +130,9 @@ export type CreateGateReportAppPayload = {
130
130
  priorSimilarLimit?: number;
131
131
  };
132
132
  export type UpdateGateReportAppPayload = Partial<Omit<CreateGateReportAppPayload, "projectExid" | "anprCameraExid" | "coolifyServerUuid" | "geminiApiKey">>;
133
- export type GateReportManagementListParams = {
133
+ export type GateReportAppsQueryParams = PaginationParams & {
134
134
  projectExid?: ProjectExid;
135
135
  includeStatus?: boolean;
136
- page?: number;
137
- limit?: number;
138
136
  };
139
137
  export type CoolifyProjectOption = {
140
138
  uuid: string;
@@ -152,9 +150,6 @@ export declare enum AppRuntimeState {
152
150
  Stopped = "stopped",
153
151
  Restarting = "restarting"
154
152
  }
155
- export type AppRuntimeStateRequest = {
156
- state: AppRuntimeState;
157
- };
158
153
  export type AppActionResponse = {
159
154
  success: boolean;
160
155
  message: string | null;
@@ -0,0 +1,98 @@
1
+ export declare enum HammertechRegion {
2
+ US = "us",
3
+ AU = "au",
4
+ EU = "eu"
5
+ }
6
+ export type HammertechConnectPayload = {
7
+ email: string;
8
+ password: string;
9
+ tenant: string;
10
+ region: HammertechRegion;
11
+ };
12
+ export type HammertechProject = {
13
+ projectId: string;
14
+ name: string;
15
+ };
16
+ export type HammertechLocation = {
17
+ id: string;
18
+ name: string;
19
+ parentId: string | null;
20
+ };
21
+ export type HammertechCustomFieldDataType = "FreeText" | "TextArea" | "Number" | "Date" | "Time" | "DateTime" | "ExpiryDate" | "Checkbox" | "YesNoRadio" | "YesNoNaRadio" | "Dropdown" | "Radio" | "MultiSelectDropdown" | "ImageUpload" | "FileUpload" | "Signature" | "SignatureWithName" | "Heading" | "BigLabel" | "ExpandingLabel" | "Separator" | "NoMargin" | "Image" | "FileDownload" | "ChildForm" | "SectionStart" | "SectionEnd" | "SystemField" | string;
22
+ export type HammertechCustomField = {
23
+ id: string;
24
+ internalName: string;
25
+ name?: string;
26
+ customFieldType: HammertechCustomFieldDataType;
27
+ isRequired?: boolean;
28
+ answerOptions?: string[];
29
+ };
30
+ export type HammertechCustomFieldForm = {
31
+ id: string;
32
+ customFields: HammertechCustomField[];
33
+ };
34
+ export declare enum HammertechPriority {
35
+ Low = "Low",
36
+ Medium = "Medium",
37
+ High = "High",
38
+ Critical = "Critical"
39
+ }
40
+ export declare enum HammertechClassification {
41
+ Undefined = "Undefined",
42
+ Positive = "Positive",
43
+ Negative = "Negative",
44
+ Neutral = "Neutral"
45
+ }
46
+ export type HammertechIssueType = {
47
+ id: string;
48
+ name: string;
49
+ forcePriority?: boolean;
50
+ suggestedPriority?: HammertechPriority | null;
51
+ canBeNegative?: boolean;
52
+ canBeNeutral?: boolean;
53
+ canBePositive?: boolean;
54
+ openIssueCustomFieldForm?: HammertechCustomFieldForm | null;
55
+ };
56
+ export type HammertechCustomFieldValue = {
57
+ customFieldId: string;
58
+ value?: unknown;
59
+ storedFileId?: string;
60
+ };
61
+ export declare const HAMMERTECH_FILE_FIELD_TYPES: string[];
62
+ export declare function isHammertechFileFieldType(type?: string): boolean;
63
+ export declare function isHammertechSignatureWithName(type?: string): boolean;
64
+ export type HammertechStoredFilePayload = {
65
+ fileName?: string;
66
+ base64FileContent: string;
67
+ annotation?: string;
68
+ id?: string;
69
+ };
70
+ export type HammertechStoredFileResponse = {
71
+ isSuccess: boolean;
72
+ httpStatusCode: number;
73
+ messageText: string;
74
+ createdEntityId: string;
75
+ xRequestId: string;
76
+ };
77
+ export type HammertechFileFieldValue = {
78
+ file: File | null;
79
+ name: string;
80
+ };
81
+ export type HammertechCreateIssuePayload = {
82
+ projectId: string;
83
+ issueTypeId: string;
84
+ snapshot: string;
85
+ issueDate?: string;
86
+ description?: string;
87
+ priority?: HammertechPriority;
88
+ dueDate?: string;
89
+ classification?: HammertechClassification;
90
+ locationId?: string;
91
+ isPositiveObservation?: boolean;
92
+ isPhotoForFixRequired?: boolean;
93
+ openIssueCustomFieldFormId?: string;
94
+ openIssueCustomFieldValues?: HammertechCustomFieldValue[];
95
+ };
96
+ export type HammertechIssueResponse = {
97
+ id: string;
98
+ };
@@ -36,12 +36,13 @@ export * from "./storyblok";
36
36
  export * from "./time";
37
37
  export * from "./timelapse";
38
38
  export * from "./user";
39
- export * from "./vendorModel";
40
39
  export * from "./videoWall";
41
40
  export * from "./voyageControl";
41
+ export * from "./hammertech";
42
42
  export * from "./weather";
43
43
  export * from "./comments";
44
44
  export * from "./detections";
45
+ export * from "./observations";
45
46
  export * from "./axios";
46
47
  export * from "./shared";
47
48
  export * from "./company";
@@ -66,3 +67,5 @@ export * from "./smartSeach";
66
67
  export * from "./siteView";
67
68
  export * from "./aiConfigs";
68
69
  export * from "./gateReportManagement";
70
+ export * from "./socket";
71
+ export * from "./observationEvents";
@@ -8,7 +8,8 @@ export declare enum IngestProcessingStatus {
8
8
  Aborted = "aborted",
9
9
  Paused = "paused",
10
10
  InProgress = "inprogress",
11
- Pending = "pending"
11
+ Pending = "pending",
12
+ Downloading = "downloading"
12
13
  }
13
14
  export declare enum MobileAssetsType {
14
15
  Audio = "mobile_audios",
@@ -22,6 +22,36 @@ export type Kit = {
22
22
  storages: KitStorage[];
23
23
  createdAt: string;
24
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;
54
+ };
25
55
  export declare enum KitStatus {
26
56
  New = "new",
27
57
  Active = "active",
@@ -118,55 +148,6 @@ export declare enum KitChartType {
118
148
  TimeSeries = "timeseries",
119
149
  BarChart = "barchart"
120
150
  }
121
- export type GrafanaDataSource = {
122
- type: string;
123
- uid: string;
124
- };
125
- export type GrafanaTarget = {
126
- expr: string;
127
- refId: string;
128
- datasourceId?: string;
129
- intervalMs?: number;
130
- maxDataPoints?: number;
131
- };
132
- export type GrafanaPanel = {
133
- [key: string]: unknown;
134
- id: GrafanaMetricId;
135
- name: keyof GrafanaMetricId;
136
- title: string;
137
- description: string;
138
- type: KitChartType;
139
- datasource: GrafanaDataSource;
140
- targets: GrafanaTarget[];
141
- maxDataPoints?: number;
142
- interval?: string;
143
- timeFrom?: string;
144
- timeShift?: string;
145
- options?: {
146
- maxDataPoints?: number;
147
- interval?: string;
148
- };
149
- };
150
- export type GrafanaDashboard = {
151
- [key: string]: unknown;
152
- panels: GrafanaPanel[];
153
- time?: {
154
- from: string;
155
- to: string;
156
- };
157
- timepicker?: {
158
- refresh_intervals: string[];
159
- time_options: string[];
160
- };
161
- };
162
- export type GrafanaQueryOptions = {
163
- metricId: GrafanaMetricId;
164
- host: string;
165
- job?: string;
166
- from?: string;
167
- to?: string;
168
- variables?: Record<string, string>;
169
- };
170
151
  export type GrafanaTimeSeriesValue = number | string | null;
171
152
  export type GrafanaTimeSeriesValues = GrafanaTimeSeriesValue[][];
172
153
  export type GrafanaFieldConfig = {
@@ -43,7 +43,8 @@ export declare enum MediaFileType {
43
43
  Mp4 = "mp4",
44
44
  Png = "png",
45
45
  Pdf = "pdf",
46
- Jpeg = "jpeg"
46
+ Jpeg = "jpeg",
47
+ Csv = "csv"
47
48
  }
48
49
  export declare enum MediaStatus {
49
50
  Pending = "Pending",
@@ -5,7 +5,13 @@ export declare enum NotificationType {
5
5
  TimelapseCreated = "timelapse_created",
6
6
  TimelapseFailed = "timelapse_failed",
7
7
  DroneProcessing = "drone_processing_done",
8
- Processing360 = "three_sixty_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"
9
15
  }
10
16
  export interface NotificationContextBase {
11
17
  cameraExid?: string;
@@ -41,7 +47,11 @@ export interface Processing360Context extends NotificationContextBase {
41
47
  date: string;
42
48
  floor: string;
43
49
  }
44
- export type NotificationContext = CameraShareContext | CameraStatusChangeContext | MentionContext | TimelapseCreatedContext | TimelapseFailedContext | DroneProcessingContext | Processing360Context;
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;
45
55
  export type Notification = {
46
56
  id: number;
47
57
  type: NotificationType;
@@ -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
+ }
@@ -51,14 +51,6 @@ export declare enum EPageType {
51
51
  List = "list",
52
52
  Item = "item"
53
53
  }
54
- export declare enum EPaths {
55
- Home = "/",
56
- Session = "/session"
57
- }
58
- export declare enum EProjectItems {
59
- Camera = "camera",
60
- Overlay = "overlay"
61
- }
62
54
  export declare enum ERoles {
63
55
  Admin = "admin",
64
56
  User = "user"
@@ -68,6 +68,13 @@ export declare enum ProjectArchiveTier {
68
68
  export type UpdateCameraRestrictionPayload = {
69
69
  isAccessRestricted?: boolean;
70
70
  };
71
+ export type CameraPosition = {
72
+ cameraExid: CameraExid;
73
+ position: number;
74
+ };
75
+ export type ReorderCamerasPayload = {
76
+ positions: CameraPosition[];
77
+ };
71
78
  export type Logo = {
72
79
  id: number;
73
80
  projectId: number;
@@ -1,4 +1,4 @@
1
- import { ApiCredentials } from "@evercam/api/types";
1
+ import { ApiCredentials, PaginationParams } from "@evercam/api/types";
2
2
  import { CancelToken } from "axios";
3
3
  export type Snapshot = {
4
4
  createdAt: string;
@@ -41,11 +41,9 @@ export type NearestSnapshotResponsePayload = {
41
41
  notes?: string;
42
42
  }>;
43
43
  };
44
- export type SnapshotRangeRequestPayload = {
44
+ export type SnapshotRangeRequestPayload = PaginationParams & {
45
45
  from: string;
46
46
  to: string;
47
- limit?: number;
48
- page?: number;
49
47
  schedule?: boolean;
50
48
  count?: number;
51
49
  };