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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/api/api/3dFirebaseApi.d.ts +18 -3
  2. package/dist/api/api/adminApi.d.ts +82 -84
  3. package/dist/api/api/aiApi.d.ts +4 -4
  4. package/dist/api/api/evercamApi.d.ts +19 -27
  5. package/dist/api/api/evercamLabsApi.d.ts +5 -13
  6. package/dist/api/api/exNvrApi.d.ts +1 -1
  7. package/dist/api/api/index.d.ts +1 -0
  8. package/dist/api/api/ingestApi.d.ts +38 -30
  9. package/dist/api/api/reportsApi.d.ts +15 -0
  10. package/dist/api/types/360.d.ts +17 -9
  11. package/dist/api/types/admin.d.ts +37 -3
  12. package/dist/api/types/analytics.d.ts +49 -15
  13. package/dist/api/types/anpr.d.ts +5 -4
  14. package/dist/api/types/apiKey.d.ts +70 -0
  15. package/dist/api/types/auditLogs.d.ts +161 -21
  16. package/dist/api/types/automation.d.ts +9 -0
  17. package/dist/api/types/axios.d.ts +1 -0
  18. package/dist/api/types/bim.d.ts +27 -7
  19. package/dist/api/types/camera.d.ts +224 -96
  20. package/dist/api/types/comments.d.ts +63 -25
  21. package/dist/api/types/company.d.ts +11 -5
  22. package/dist/api/types/compare.d.ts +1 -1
  23. package/dist/api/types/detections.d.ts +3 -0
  24. package/dist/api/types/emailMessages.d.ts +27 -0
  25. package/dist/api/types/errors.d.ts +7 -2
  26. package/dist/api/types/gateReport.d.ts +2 -1
  27. package/dist/api/types/hdd.d.ts +1 -1
  28. package/dist/api/types/index.d.ts +3 -1
  29. package/dist/api/types/ingest.d.ts +105 -25
  30. package/dist/api/types/kit.d.ts +56 -68
  31. package/dist/api/types/media.d.ts +25 -3
  32. package/dist/api/types/notification.d.ts +12 -1
  33. package/dist/api/types/nvr.d.ts +39 -8
  34. package/dist/api/types/observationEvents.d.ts +26 -0
  35. package/dist/api/types/observations.d.ts +14 -9
  36. package/dist/api/types/posthog.d.ts +36 -0
  37. package/dist/api/types/progressPhoto.d.ts +38 -25
  38. package/dist/api/types/project.d.ts +61 -22
  39. package/dist/api/types/recycleBin.d.ts +8 -2
  40. package/dist/api/types/reports.d.ts +109 -0
  41. package/dist/api/types/router.d.ts +15 -10
  42. package/dist/api/types/shared.d.ts +29 -19
  43. package/dist/api/types/sim.d.ts +18 -6
  44. package/dist/api/types/siteView.d.ts +14 -8
  45. package/dist/api/types/snapshots.d.ts +52 -12
  46. package/dist/api/types/sso.d.ts +11 -37
  47. package/dist/api/types/storageProvider.d.ts +16 -5
  48. package/dist/api/types/user.d.ts +32 -29
  49. package/dist/api/types/widget.d.ts +13 -4
  50. package/dist/api/utils.d.ts +1 -0
  51. package/dist/index.js +840 -691
  52. package/dist/index.js.map +1 -1
  53. package/dist/index.umd.cjs +1 -1
  54. package/dist/index.umd.cjs.map +1 -1
  55. package/dist/shared/types/components.d.ts +406 -23
  56. package/dist/shared/types/droneUpload.d.ts +93 -0
  57. package/dist/shared/types/index.d.ts +2 -0
  58. package/dist/shared/types/report.d.ts +107 -0
  59. package/dist/shared/utils/datePickerValue.d.ts +36 -0
  60. package/dist/shared/utils/datePresets.d.ts +31 -0
  61. package/package.json +1 -1
  62. package/dist/api/types/copilot.d.ts +0 -159
@@ -1,5 +1,6 @@
1
+ import type Vue from "vue";
1
2
  import { type _360Scene, type Media, type DroneModel, type MobileCaptureSnapshot, type TimelineDateInterval, type TimelinePrecision, type Comment, type ProcoreUserProject, type ProcoreProjectAlbum, type ProcoreObservationType, type AconexUserProject, type AutodeskUserHub, type AutodeskProject, type AutodeskFolder, type ProcoreType, type HammertechProject, type HammertechIssueType, type HammertechPriority, type HammertechClassification, type HammertechFileFieldValue, Tag, TuplePoint2D, CameraStatus } from "@evercam/shared/types";
2
- import type { AdminCamera, Camera, IngestUploadInitResponse } from "@evercam/api/types";
3
+ import type { _360AssetType, AdminCamera, Camera, AuditLog, AuditLogDetails, AuditLogEntity, AuditLogsParams, DroneComparisonFrames, EvercamStats, ExNvrFootageAvailableStatus, ExNvrMetricId, IngestUploadInitResponse, KitMetricData, JsonValue, PaginationParams, Router, GrafanaMetricResults } from "@evercam/api/types";
3
4
  import type { TimelineChartType, TimelineEvent, TimelineEventsGroup } from "@evercam/ui";
4
5
  import { TimelineDataProvider } from "@evercam/shared/components/timelinePlayer/providers";
5
6
  import { SeriesOptionsType } from "highcharts";
@@ -53,8 +54,180 @@ export declare enum IframeMessageType {
53
54
  ViewerLaunchFlags = "viewerLaunchFlags",
54
55
  Fetch360DrawingIds = "fetch360DrawingIds",
55
56
  DrawingIdsResponse = "drawingIdsResponse",
56
- CloseCameraMarkerPreview = "CloseCameraMarkerPreview"
57
+ CloseCameraMarkerPreview = "CloseCameraMarkerPreview",
58
+ ChatInit = "chatInit",
59
+ ChatToken = "chatToken",
60
+ ChatContext = "chatContext",
61
+ ChatTheme = "chatTheme",
62
+ ChatNavigate = "chatNavigate",
63
+ ChatConversations = "chatConversations",
64
+ ChatOpenConversation = "chatOpenConversation",
65
+ ChatNewConversation = "chatNewConversation",
66
+ ChatRenameConversation = "chatRenameConversation",
67
+ ChatDeleteConversation = "chatDeleteConversation",
68
+ ChatOpenWalkMarker = "chatOpenWalkMarker",
69
+ ChatOpenView = "chatOpenView",
70
+ ChatOpenSearch = "chatOpenSearch",
71
+ ChatWorkspace = "chatWorkspace",
72
+ ChatEntityNames = "chatEntityNames",
73
+ ChatNotify = "chatNotify",
74
+ ProjectMembers = "projectMembers",
75
+ FocusComment = "focusComment",
76
+ ShareByEmail = "shareByEmail"
57
77
  }
78
+ export declare enum ChatTheme {
79
+ Dark = "dark",
80
+ Light = "light"
81
+ }
82
+ export type ChatUser = {
83
+ email: string;
84
+ name: string;
85
+ };
86
+ /**
87
+ * The dashboard's answer to the frame's `Ready`.
88
+ *
89
+ * The token travels here and nowhere else — never in the iframe URL, which
90
+ * would land it in history, referrers and logs.
91
+ */
92
+ export type ChatInitPayload = {
93
+ token: string;
94
+ user: ChatUser;
95
+ theme: ChatTheme;
96
+ timezone: string;
97
+ };
98
+ /** Pushed on rotation. A frame holding a mount-time token 401s the moment it changes. */
99
+ export type ChatTokenPayload = {
100
+ token: string;
101
+ };
102
+ /** Pushed on every dashboard route change. */
103
+ export type ChatContextPayload = {
104
+ pageId: string;
105
+ projectExid: string | null;
106
+ projectName: string | null;
107
+ cameraExid: string | null;
108
+ timezone: string;
109
+ /**
110
+ * A conversation to open, from `?chat=` on the dashboard's URL.
111
+ *
112
+ * Deep-linking lives in the *context* rather than in a message of its own
113
+ * because it is exactly that — a fact about where the host currently is, sent
114
+ * on every route change alongside the project and page. `null` means "no
115
+ * opinion", which is what every other page sends.
116
+ */
117
+ chatId: string | null;
118
+ /** A Reports page to open, from `?view=`, the same way. */
119
+ view?: ChatView | null;
120
+ /** A report to open, from `?report=`. */
121
+ reportId?: string | null;
122
+ };
123
+ /**
124
+ * Exid → name for every camera and project the host already holds, so the frame
125
+ * can show names instead of exids without fetching them again.
126
+ */
127
+ export type ChatEntityNamesPayload = {
128
+ cameras: Record<string, string>;
129
+ projects: Record<string, string>;
130
+ };
131
+ export type ChatThemePayload = {
132
+ theme: ChatTheme;
133
+ };
134
+ /**
135
+ * A page id plus params, never a route string — the dashboard owns the
136
+ * id → route mapping.
137
+ */
138
+ export type ChatNavigatePayload = {
139
+ pageId: string;
140
+ params: Record<string, string>;
141
+ };
142
+ /**
143
+ * Open a 360-walk marker in the 360 viewer, facing one view.
144
+ *
145
+ * Sent by Chat when a `WalkView` in an answer is clicked. The dashboard opens the
146
+ * 360 app in its own dialog (`Walk360Preview`), outside the chat frame, so the
147
+ * viewer gets the whole screen. `walkName` and `walkDate` are how the 360 app
148
+ * knows a walk (its `floor` and `date` URL params); `camera` is the viewer's own
149
+ * azimuth/polar angles for that view, or null to open at the marker's default.
150
+ */
151
+ export type ChatOpenWalkMarkerPayload = {
152
+ projectExid: string;
153
+ walkId: string;
154
+ walkName: string;
155
+ walkDate: string;
156
+ markerId: string;
157
+ view: string;
158
+ camera: {
159
+ azimuthAngle: number;
160
+ polarAngle: number;
161
+ } | null;
162
+ };
163
+ /**
164
+ * One conversation, as the dashboard's sidebar needs it.
165
+ *
166
+ * A deliberate projection of the engine's `ChatSession` — a label and a
167
+ * timestamp, nothing else. The transcript stays in the frame: mirroring `turns`
168
+ * would put every message of every conversation on the bridge each time the list
169
+ * changed, to render a row that shows neither.
170
+ */
171
+ export type ChatSessionSummary = {
172
+ id: string;
173
+ title: string | null;
174
+ updatedAt: string;
175
+ };
176
+ /**
177
+ * The frame's conversation list, mirrored up for the left sidebar to draw.
178
+ *
179
+ * The frame stays the single owner of this data — it holds the engine client and
180
+ * the bearer. The host renders and sends intent back; it never fetches.
181
+ */
182
+ export type ChatConversationsPayload = {
183
+ sessions: ChatSessionSummary[];
184
+ openId: string | null;
185
+ isLoading: boolean;
186
+ };
187
+ export type ChatOpenConversationPayload = {
188
+ id: string;
189
+ };
190
+ /** The frame's top-level views. A report page belongs to whichever list opened it. */
191
+ export declare enum ChatView {
192
+ Chat = "chat",
193
+ Inbox = "inbox",
194
+ SavedReports = "savedReports",
195
+ Explore = "explore",
196
+ Report = "report"
197
+ }
198
+ /** Host → frame: show one of the Reports pages, or the chat. */
199
+ export type ChatOpenViewPayload = {
200
+ view: ChatView;
201
+ };
202
+ export declare enum ChatNotifyTone {
203
+ Success = "success",
204
+ Error = "error",
205
+ Info = "info"
206
+ }
207
+ /** Frame → host: a notification the host shows the way it shows its own. */
208
+ export type ChatNotifyPayload = {
209
+ text: string;
210
+ tone: ChatNotifyTone;
211
+ };
212
+ /**
213
+ * Frame → host: what the sidebar's Reports group needs — which entry is active
214
+ * and the two counts it shows. Like `ChatConversationsPayload`, a projection:
215
+ * the reports themselves stay in the frame.
216
+ */
217
+ export type ChatWorkspacePayload = {
218
+ view: ChatView;
219
+ /** The report open on its own page, or null. */
220
+ reportId?: string | null;
221
+ unreadCount: number;
222
+ savedCount: number;
223
+ };
224
+ export type ChatRenameConversationPayload = {
225
+ id: string;
226
+ title: string;
227
+ };
228
+ export type ChatDeleteConversationPayload = {
229
+ id: string;
230
+ };
58
231
  export declare enum NavigationArrow {
59
232
  Previous = "previous",
60
233
  Next = "next"
@@ -112,6 +285,12 @@ export type TimelineMediaHubItemsByType = {
112
285
  timelapse?: Media[];
113
286
  xRay?: Media[];
114
287
  };
288
+ export type KitMetricChartData = KitMetricData & {
289
+ results?: GrafanaMetricResults;
290
+ stats?: EvercamStats[];
291
+ metricId?: ExNvrMetricId;
292
+ value?: number;
293
+ };
115
294
  export declare enum HighchartsStackingBehavior {
116
295
  Overlap = "overlap",
117
296
  Normal = "normal",
@@ -257,6 +436,12 @@ export type FormattedNotificationData = {
257
436
  link: string;
258
437
  thumbnail?: string;
259
438
  icon: string;
439
+ excerpt?: string;
440
+ commentTarget?: {
441
+ commentId: number;
442
+ dateId: string | number;
443
+ floorId: string;
444
+ };
260
445
  };
261
446
  export type FormattedNotification = FormattedNotificationData & {
262
447
  date: string;
@@ -312,17 +497,6 @@ export interface MediaHubSortParameter {
312
497
  label: string;
313
498
  value: string;
314
499
  }
315
- export type TableHeaderParams<TItem = unknown> = {
316
- value: string;
317
- text: string;
318
- align?: string;
319
- sortable?: boolean;
320
- visible?: boolean;
321
- width?: number | string;
322
- copyable?: boolean;
323
- toStringFn?: (item: TItem, key: string) => any;
324
- sort?: (a: unknown, b: unknown) => number;
325
- };
326
500
  export type BimUploadObject = IngestUploadInitResponse & {
327
501
  projectName: string;
328
502
  };
@@ -361,16 +535,10 @@ export interface ThreeSixtyWalkGroup {
361
535
  date: string;
362
536
  walks: ThreeSixtyWalk[];
363
537
  }
364
- export type DatePresetContext = {
365
- minDate?: string;
366
- maxDate: string;
367
- effectiveMinDate?: string;
368
- effectiveMaxDate: string;
369
- };
370
- export type DatePreset = {
371
- name: string;
372
- resolveRange?: (ctx: DatePresetContext) => [string, string];
373
- isHide?: (ctx: DatePresetContext) => boolean;
538
+ export type ThreeSixtyMediaDownloadOption = {
539
+ type: _360AssetType;
540
+ title: string;
541
+ icon: string;
374
542
  };
375
543
  export type DrawingSelection = {
376
544
  pageNumber: number;
@@ -378,3 +546,218 @@ export type DrawingSelection = {
378
546
  thumbnail: string | null;
379
547
  pageCount: number;
380
548
  };
549
+ export type CommentCardComment = {
550
+ id?: number | string;
551
+ content?: string;
552
+ createdAt?: string;
553
+ archivedAt?: string;
554
+ creatorName?: string;
555
+ label?: string;
556
+ timestamp?: string;
557
+ cameraExid?: string;
558
+ position3d?: number[];
559
+ canDelete?: boolean;
560
+ };
561
+ export type ErrorPageParams = {
562
+ statusCode: number;
563
+ message: string;
564
+ homePageLink?: boolean;
565
+ };
566
+ export declare enum AuditLogDetailsView {
567
+ Diff = "diff",
568
+ OfflineMessage = "offlineMessage",
569
+ Delete = "delete",
570
+ Create = "create",
571
+ NvrDeviceSettings = "nvrDeviceSettings",
572
+ RouterDeviceSettings = "routerDeviceSettings"
573
+ }
574
+ export type AuditLogDetailsCell = AuditLogDetails[keyof AuditLogDetails] | JsonValue;
575
+ export type AuditLogDetailsRow = {
576
+ key: string;
577
+ cells: AuditLogDetailsCell[];
578
+ isJsonFormatted?: boolean;
579
+ isScopeList?: boolean;
580
+ rowClass?: string;
581
+ };
582
+ export type AuditLogDetailsTable = {
583
+ headers: {
584
+ text: string;
585
+ width?: string;
586
+ }[];
587
+ rows: AuditLogDetailsRow[];
588
+ };
589
+ export type AuditLogAuthMethodView = {
590
+ icon: string;
591
+ label: string;
592
+ tooltip: string;
593
+ };
594
+ export type AuditLogLinkEntity = AuditLogEntity.Cameras | AuditLogEntity.Projects | AuditLogEntity.Routers | AuditLogEntity.Users | AuditLogEntity.Sims;
595
+ export type AuditLogRow = AuditLog & {
596
+ canExpand: boolean;
597
+ authMethod: AuditLogAuthMethodView | null;
598
+ };
599
+ export type AuditLogsReportParams = PaginationParams & Partial<AuditLogsParams>;
600
+ export declare enum ShareByEmailKind {
601
+ Drone = "drone"
602
+ }
603
+ export declare enum ShareByEmailStatus {
604
+ Capturing = "capturing",
605
+ Ready = "ready",
606
+ Failed = "failed"
607
+ }
608
+ export type DroneEmailCapture = Pick<DroneComparisonFrames, "beforeDate" | "afterDate"> & Partial<Pick<DroneComparisonFrames, "beforeImage" | "afterImage">> & {
609
+ status: ShareByEmailStatus;
610
+ error?: string;
611
+ };
612
+ export type QuillEditorInstance = {
613
+ enable: (enabled: boolean) => void;
614
+ root: HTMLElement;
615
+ clipboard: {
616
+ dangerouslyPasteHTML: (index: number, html: string, source?: string) => void;
617
+ };
618
+ deleteText: (index: number, length: number, source?: string) => void;
619
+ getLength: () => number;
620
+ getSelection: (focus?: boolean) => {
621
+ index: number;
622
+ length: number;
623
+ } | null;
624
+ insertEmbed: (index: number, type: string, value: string, source?: string) => void;
625
+ setSelection: (index: number, length?: number) => void;
626
+ };
627
+ export type ValidationObserverRef = Vue & {
628
+ validate: () => Promise<boolean>;
629
+ reset: () => void;
630
+ };
631
+ export type SummaryElementInputOption = {
632
+ name?: string;
633
+ value?: string | number | boolean | null;
634
+ class?: string;
635
+ disabled?: boolean;
636
+ disabledReason?: string;
637
+ };
638
+ export declare enum SummaryElementInputType {
639
+ TextField = "TEXT_FIELD",
640
+ TextArea = "TEXT_AREA",
641
+ SingleSelect = "SINGLE_SELECT"
642
+ }
643
+ export type SummaryElementInput = {
644
+ key?: string;
645
+ label?: string;
646
+ value?: string | number | boolean | null;
647
+ type?: SummaryElementInputType;
648
+ dataset?: SummaryElementInputOption[];
649
+ binds?: Record<string, string | number | boolean>;
650
+ isModel?: boolean;
651
+ isCameraConfig?: boolean;
652
+ isNvrConfig?: boolean;
653
+ isCloudRecording?: boolean;
654
+ isCameraLocation?: boolean;
655
+ cloudRecordingId?: string | number | null;
656
+ };
657
+ export type SimReassignmentAlert = {
658
+ sim: string;
659
+ kitName: string;
660
+ kitId: number;
661
+ kitSerial: string;
662
+ };
663
+ export type CameraStatusTimelineEvent = {
664
+ startDate: string | undefined;
665
+ endDate: string | undefined;
666
+ color: string;
667
+ status: CameraStatus | ExNvrFootageAvailableStatus;
668
+ originalStatus?: CameraStatus;
669
+ };
670
+ export type CameraStatusTimelineEventsGroup = {
671
+ label: string;
672
+ color: string;
673
+ events: CameraStatusTimelineEvent[];
674
+ };
675
+ export type CameraStatusTimelineData = {
676
+ loading: boolean;
677
+ exNvrIntervalsEventsGroup: Record<string, CameraStatusTimelineEventsGroup>;
678
+ cameraStatusEventsGroup: Record<string, CameraStatusTimelineEventsGroup>;
679
+ };
680
+ export type CameraStatusTimelineInterval = {
681
+ startDate: string | undefined;
682
+ endDate: string | undefined;
683
+ };
684
+ export type CameraInstalledMarker = {
685
+ timestamp: string | undefined;
686
+ label: string;
687
+ color: string;
688
+ textColor: string;
689
+ id: string;
690
+ };
691
+ export type KitHddInfoField = {
692
+ label: string;
693
+ value: string | undefined;
694
+ };
695
+ export type FootageFormItem = {
696
+ id?: number;
697
+ cameraId?: string;
698
+ cameraExid?: string;
699
+ cameraName?: string;
700
+ startDate?: string | null;
701
+ endDate?: string | null;
702
+ };
703
+ export type LiveViewFrequencyOption = {
704
+ value: number | null;
705
+ name: string;
706
+ disabled?: boolean;
707
+ disabledReason?: string;
708
+ };
709
+ export type CameraSummaryRouterDetails = Partial<Router> & {
710
+ externalHost?: string;
711
+ kitId?: number;
712
+ cameras?: {
713
+ name: string;
714
+ id: number;
715
+ exid: string;
716
+ }[];
717
+ };
718
+ export declare enum ChartType {
719
+ Area = "area",
720
+ Line = "line",
721
+ Column = "column"
722
+ }
723
+ export declare enum ChartZoomType {
724
+ XY = "xy"
725
+ }
726
+ export declare enum AiConfigsPromptsViewMode {
727
+ Grid = "grid",
728
+ Table = "table"
729
+ }
730
+ export type FocusableInputRef = Vue & {
731
+ focus: () => void;
732
+ isFocused: boolean;
733
+ };
734
+ export type MenuSaveRef = Vue & {
735
+ save: (value: string) => void;
736
+ };
737
+ export type RouteTab = {
738
+ label: string;
739
+ to: string;
740
+ disabled: boolean;
741
+ };
742
+ export type ToggleableTableHeader = {
743
+ text: string;
744
+ value: string;
745
+ width?: number;
746
+ sortable?: boolean;
747
+ visible?: boolean;
748
+ };
749
+ export declare enum BatteryChartType {
750
+ BatteryVoltage = "battery-voltage",
751
+ VoltageSummary = "voltage-summary",
752
+ BatteryVoltagesSummary = "battery-voltages-summary"
753
+ }
754
+ export declare enum BatteryReadingsTab {
755
+ Table = 0,
756
+ Graph = 1
757
+ }
758
+ export declare enum SsoStorageKey {
759
+ State = "ssoState",
760
+ Provider = "ssoProvider",
761
+ SourceUrl = "sourceUrlRequestedSso",
762
+ PostSsoRedirectUrl = "postSsoRedirectUrl"
763
+ }
@@ -0,0 +1,93 @@
1
+ import type { AerialAllocation, DroneFlightMetadata, DroneFileState, DroneFileError } from "@evercam/api/types";
2
+ export declare enum DroneUploadErrorCode {
3
+ Offline = "offline",
4
+ UploadStalled = "upload_stalled",
5
+ AuthorizationExpired = "upload_authorization_expired",
6
+ UploadRejected = "upload_rejected",
7
+ ServerUnreachable = "server_unreachable",
8
+ UploadStopped = "upload_stopped",
9
+ UploadCancelled = "upload_cancelled",
10
+ DuplicateFilenames = "duplicate_filenames",
11
+ DifferentFlight = "different_flight",
12
+ ProcessingClosed = "processing_closed",
13
+ PartialUploadFailed = "partial_upload_failed",
14
+ NotSubmitted = "not_submitted"
15
+ }
16
+ export declare enum DroneUploadStage {
17
+ Prepare = "prepare",
18
+ ChooseIngestUrl = "choose_ingest_url",
19
+ CreateProcessing = "create_processing",
20
+ GetProcessing = "get_processing",
21
+ Allocate = "allocate",
22
+ Put = "put",
23
+ Acknowledge = "acknowledge",
24
+ Complete = "complete"
25
+ }
26
+ export declare enum DroneUploadRetryTrigger {
27
+ Manual = "manual",
28
+ Online = "online",
29
+ Timer = "timer"
30
+ }
31
+ export type DroneUploadEventProps = {
32
+ processingId?: number;
33
+ isAerialOnly: boolean;
34
+ uploadedFiles: number;
35
+ totalFiles: number;
36
+ uploadedBytes: number;
37
+ totalBytes: number;
38
+ connectionType?: string;
39
+ };
40
+ export type AerialUploadFile = {
41
+ file: File;
42
+ allocation: AerialAllocation;
43
+ };
44
+ export declare enum DroneUploadStatus {
45
+ Queued = "queued",
46
+ Uploading = "uploading",
47
+ Failed = "failed",
48
+ Completed = "completed"
49
+ }
50
+ export type DroneUploadProgress = {
51
+ status: DroneUploadStatus;
52
+ uploadedFiles: number;
53
+ totalFiles: number;
54
+ uploadedBytes: number;
55
+ totalBytes: number;
56
+ percentage: number;
57
+ startedAt: number;
58
+ initialBytes: number;
59
+ error?: Error;
60
+ };
61
+ export type DroneUploadOptions = {
62
+ label?: string;
63
+ projectId: string;
64
+ processingId?: number;
65
+ flightMetadata: DroneFlightMetadata;
66
+ files: File[];
67
+ aerialShots: AerialUploadFile[];
68
+ onProgress?: (progress: DroneUploadProgress) => void;
69
+ };
70
+ export type AerialUploadOptions = Pick<DroneUploadOptions, "label" | "aerialShots" | "onProgress"> & {
71
+ processingId: number;
72
+ };
73
+ export type DroneUploadJob = {
74
+ readonly projectId?: string;
75
+ readonly initialProcessingId?: number;
76
+ readonly label: string;
77
+ readonly aerialFilenames: string[];
78
+ readonly createdAt: number;
79
+ processingId?: number;
80
+ ingestUrl?: string;
81
+ stage?: DroneUploadStage;
82
+ progress: DroneUploadProgress;
83
+ run: () => Promise<void>;
84
+ cancel: () => Promise<void>;
85
+ };
86
+ export type UploadCollection = {
87
+ files: File[];
88
+ initialStates?: DroneFileState[];
89
+ allocate: (files: File[]) => Promise<DroneFileState[]>;
90
+ acknowledge: (filenames: string[]) => Promise<{
91
+ errors: DroneFileError[];
92
+ }>;
93
+ };
@@ -1,7 +1,9 @@
1
1
  export * from "@evercam/api/types";
2
2
  export * from "./components";
3
+ export * from "./report";
3
4
  export * from "./customDataTableFilters";
4
5
  export * from "./imagePlayer";
5
6
  export * from "./timeline";
6
7
  export * from "./rbac";
7
8
  export * from "./observations";
9
+ export * from "./droneUpload";
@@ -0,0 +1,107 @@
1
+ import type Vue from "vue";
2
+ import type { CancelToken } from "axios";
3
+ import type { GlobalSearchResource, Operator } from "@evercam/api/types";
4
+ import type { DateRangeOption } from "@evercam/shared/utils/datePresets";
5
+ export type ReportTableHeaderParams<TItem = unknown> = {
6
+ value: string;
7
+ text: string;
8
+ align?: string;
9
+ sortable?: boolean;
10
+ visible?: boolean;
11
+ width?: number | string;
12
+ copyable?: boolean;
13
+ toStringFn?: (item: TItem, key: string) => string;
14
+ sort?(a: unknown, b: unknown): number;
15
+ togglable?: boolean;
16
+ filterable?: boolean;
17
+ };
18
+ export declare enum ReportSortDirection {
19
+ Asc = "asc",
20
+ Desc = "desc"
21
+ }
22
+ export declare enum ReportFilterComponent {
23
+ Text = "TextFieldSearchFilter",
24
+ Select = "SelectSearchFilter",
25
+ DatePicker = "DatePickerSearchFilter",
26
+ CountField = "CountFieldSearchFilter",
27
+ Tag = "TagSearchFilter",
28
+ Autocomplete = "AutocompleteSearchFilter",
29
+ DateTimeRange = "DateTimeRangeSearchFilter"
30
+ }
31
+ export type ReportFilterCell = {
32
+ header: ReportTableHeaderParams;
33
+ field?: ReportFilterField;
34
+ };
35
+ export type OfflineCamerasReportContext = Vue & {
36
+ report: string;
37
+ };
38
+ export type ReportFilterItem = {
39
+ name?: string;
40
+ value: string | number | boolean | null;
41
+ };
42
+ export type ReportSearchParamValue = string | number | boolean | null | undefined | (string | number | boolean | null)[];
43
+ export type ReportSearchParams = Record<string, ReportSearchParamValue>;
44
+ export type ReportItem = Record<string, unknown>;
45
+ export type ReportProviderResponse<TItem = ReportItem> = {
46
+ total?: number;
47
+ [dataField: string]: TItem[] | number | undefined;
48
+ };
49
+ export type ReportTableProvider<TItem = ReportItem> = (request: {
50
+ cancelToken: CancelToken;
51
+ params: ReportSearchParams;
52
+ }) => Promise<ReportProviderResponse<TItem>>;
53
+ export type ReportTableOptions = {
54
+ page?: number;
55
+ itemsPerPage?: number | string;
56
+ sortBy?: string[];
57
+ sortDesc?: boolean[];
58
+ };
59
+ export type ReportFilterFieldNamesMap = {
60
+ fromField: string;
61
+ toField: string;
62
+ };
63
+ export type ReportFilterOperatorItem = {
64
+ value: Operator;
65
+ label: string;
66
+ };
67
+ export type ReportFilterAttributes = {
68
+ items?: ReportFilterItem[];
69
+ multiple?: boolean;
70
+ isAutocomplete?: boolean;
71
+ value?: string | number | string[];
72
+ label?: string;
73
+ textFieldAttrs?: {
74
+ placeholder?: string;
75
+ };
76
+ isRange?: boolean;
77
+ convertToIso?: boolean;
78
+ minDate?: string;
79
+ maxDate?: string;
80
+ options?: DateRangeOption[];
81
+ withOperator?: boolean;
82
+ operatorFieldName?: string;
83
+ operatorLabel?: string;
84
+ operatorItems?: ReportFilterOperatorItem[];
85
+ showToolTip?: boolean;
86
+ toolTipText?: string;
87
+ "menu-props"?: {
88
+ offsetY?: boolean;
89
+ };
90
+ itemText?: string;
91
+ resource?: GlobalSearchResource;
92
+ fromField?: string;
93
+ toField?: string;
94
+ };
95
+ export type ReportFilterField<TItem = ReportItem> = {
96
+ component: ReportFilterComponent;
97
+ name?: string;
98
+ width?: number;
99
+ attributes?: ReportFilterAttributes;
100
+ listeners?: {
101
+ keypress?: (event: KeyboardEvent) => boolean | void;
102
+ };
103
+ fieldNamesMap?: ReportFilterFieldNamesMap;
104
+ isGlobalFilter?: boolean;
105
+ offline?: boolean;
106
+ customFilter?: (item: TItem, fieldName: string, search: ReportSearchParamValue) => boolean;
107
+ };