@evercam/api 1.0.0-1c3e516cc → 1.0.0-1eef013f5

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 (74) hide show
  1. package/README.md +1 -0
  2. package/dist/api/api/3dFirebaseApi.d.ts +74 -26
  3. package/dist/api/api/adminApi.d.ts +28 -17
  4. package/dist/api/api/aiApi.d.ts +95 -3
  5. package/dist/api/api/authzApi.d.ts +4 -1
  6. package/dist/api/api/evercamApi.d.ts +39 -25
  7. package/dist/api/api/evercamLabsApi.d.ts +5 -16
  8. package/dist/api/api/index.d.ts +1 -0
  9. package/dist/api/api/ingestApi.d.ts +54 -33
  10. package/dist/api/api/reportsApi.d.ts +15 -0
  11. package/dist/api/types/360.d.ts +127 -43
  12. package/dist/api/types/admin.d.ts +1 -1
  13. package/dist/api/types/aiConfigs.d.ts +102 -12
  14. package/dist/api/types/analytics.d.ts +35 -24
  15. package/dist/api/types/apiKey.d.ts +70 -0
  16. package/dist/api/types/auditLogs.d.ts +145 -20
  17. package/dist/api/types/authz.d.ts +71 -0
  18. package/dist/api/types/automation.d.ts +32 -4
  19. package/dist/api/types/axios.d.ts +9 -8
  20. package/dist/api/types/bim.d.ts +12 -6
  21. package/dist/api/types/camera.d.ts +37 -28
  22. package/dist/api/types/comments.d.ts +9 -2
  23. package/dist/api/types/company.d.ts +1 -2
  24. package/dist/api/types/compare.d.ts +1 -1
  25. package/dist/api/types/connector.d.ts +2 -0
  26. package/dist/api/types/detections.d.ts +3 -1
  27. package/dist/api/types/drone.d.ts +1 -2
  28. package/dist/api/types/emailMessages.d.ts +27 -0
  29. package/dist/api/types/errors.d.ts +18 -2
  30. package/dist/api/types/gateReport.d.ts +1 -11
  31. package/dist/api/types/gateReportManagement.d.ts +28 -9
  32. package/dist/api/types/hammertech.d.ts +98 -0
  33. package/dist/api/types/index.d.ts +8 -2
  34. package/dist/api/types/ingest.d.ts +192 -25
  35. package/dist/api/types/kit.d.ts +44 -101
  36. package/dist/api/types/media.d.ts +7 -2
  37. package/dist/api/types/notification.d.ts +52 -2
  38. package/dist/api/types/nvr.d.ts +8 -8
  39. package/dist/api/types/observationEvents.d.ts +141 -0
  40. package/dist/api/types/observations.d.ts +80 -0
  41. package/dist/api/types/planner.d.ts +1 -8
  42. package/dist/api/types/posthog.d.ts +20 -0
  43. package/dist/api/types/project.d.ts +15 -3
  44. package/dist/api/types/recording.d.ts +5 -5
  45. package/dist/api/types/reports.d.ts +108 -0
  46. package/dist/api/types/ring.d.ts +16 -16
  47. package/dist/api/types/roi.d.ts +2 -10
  48. package/dist/api/types/routeParams.d.ts +1 -0
  49. package/dist/api/types/shared.d.ts +14 -23
  50. package/dist/api/types/shares.d.ts +0 -13
  51. package/dist/api/types/siteAnalytics.d.ts +1 -3
  52. package/dist/api/types/siteAnalyticsManagement.d.ts +127 -0
  53. package/dist/api/types/siteView.d.ts +12 -8
  54. package/dist/api/types/snapshots.d.ts +5 -0
  55. package/dist/api/types/socket.d.ts +4 -0
  56. package/dist/api/types/storyblok.d.ts +0 -13
  57. package/dist/api/types/timelapse.d.ts +1 -8
  58. package/dist/api/types/user.d.ts +29 -3
  59. package/dist/api/utils.d.ts +1 -0
  60. package/dist/index.js +1597 -874
  61. package/dist/index.js.map +1 -1
  62. package/dist/index.umd.cjs +1 -1
  63. package/dist/index.umd.cjs.map +1 -1
  64. package/dist/shared/types/components.d.ts +289 -44
  65. package/dist/shared/types/customDataTableFilters.d.ts +10 -0
  66. package/dist/shared/types/droneUpload.d.ts +93 -0
  67. package/dist/shared/types/index.d.ts +4 -0
  68. package/dist/shared/types/observations.d.ts +25 -0
  69. package/dist/shared/types/report.d.ts +107 -0
  70. package/dist/shared/utils/datePickerValue.d.ts +36 -0
  71. package/dist/shared/utils/datePresets.d.ts +31 -0
  72. package/package.json +3 -1
  73. package/dist/api/types/copilot.d.ts +0 -162
  74. package/dist/api/types/vendorModel.d.ts +0 -15
@@ -1,12 +1,26 @@
1
- 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, TaskStatus, Tag, TuplePoint2D } from "@evercam/shared/types";
2
- import type { IngestUploadInitResponse } from "@evercam/api/types";
1
+ 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 { _360AssetType, AdminCamera, Camera, AuditLog, AuditLogDetails, AuditLogEntity, AuditLogsParams, DroneComparisonFrames, IngestUploadInitResponse, JsonValue, PaginationParams } from "@evercam/api/types";
3
3
  import type { TimelineChartType, TimelineEvent, TimelineEventsGroup } from "@evercam/ui";
4
4
  import { TimelineDataProvider } from "@evercam/shared/components/timelinePlayer/providers";
5
5
  import { SeriesOptionsType } from "highcharts";
6
+ export type ReorderableCamera = Camera & {
7
+ thumbnailSrc?: string;
8
+ batteryLevel?: {
9
+ voltage: number;
10
+ level: string;
11
+ icon: string;
12
+ color: string;
13
+ } | null;
14
+ };
6
15
  export type SelectItem = {
7
16
  text: string;
8
17
  value: string | number;
9
18
  };
19
+ export type RoiProjectGroup = {
20
+ exid: string;
21
+ name: string;
22
+ cameras: AdminCamera[];
23
+ };
10
24
  export declare enum IframeMessageType {
11
25
  LiveView = "liveView",
12
26
  EditSnapshot = "editSnapshot",
@@ -37,8 +51,131 @@ export declare enum IframeMessageType {
37
51
  ForgeTokenResponse = "ForgeTokenResponse",
38
52
  ShowBimUploadChoice = "showBimUploadChoice",
39
53
  ViewerLaunchFlags = "viewerLaunchFlags",
40
- CloseCameraMarkerPreview = "CloseCameraMarkerPreview"
54
+ Fetch360DrawingIds = "fetch360DrawingIds",
55
+ DrawingIdsResponse = "drawingIdsResponse",
56
+ CloseCameraMarkerPreview = "CloseCameraMarkerPreview",
57
+ ChatInit = "chatInit",
58
+ ChatToken = "chatToken",
59
+ ChatContext = "chatContext",
60
+ ChatTheme = "chatTheme",
61
+ ChatNavigate = "chatNavigate",
62
+ ChatConversations = "chatConversations",
63
+ ChatOpenConversation = "chatOpenConversation",
64
+ ChatNewConversation = "chatNewConversation",
65
+ ChatRenameConversation = "chatRenameConversation",
66
+ ChatDeleteConversation = "chatDeleteConversation",
67
+ ChatOpenWalkMarker = "chatOpenWalkMarker",
68
+ ProjectMembers = "projectMembers",
69
+ FocusComment = "focusComment",
70
+ ShareByEmail = "shareByEmail"
71
+ }
72
+ export declare enum ChatTheme {
73
+ Dark = "dark",
74
+ Light = "light"
41
75
  }
76
+ export type ChatUser = {
77
+ email: string;
78
+ name: string;
79
+ };
80
+ /**
81
+ * The dashboard's answer to the frame's `Ready`.
82
+ *
83
+ * The token travels here and nowhere else — never in the iframe URL, which
84
+ * would land it in history, referrers and logs.
85
+ */
86
+ export type ChatInitPayload = {
87
+ token: string;
88
+ user: ChatUser;
89
+ theme: ChatTheme;
90
+ timezone: string;
91
+ };
92
+ /** Pushed on rotation. A frame holding a mount-time token 401s the moment it changes. */
93
+ export type ChatTokenPayload = {
94
+ token: string;
95
+ };
96
+ /** Pushed on every dashboard route change. */
97
+ export type ChatContextPayload = {
98
+ pageId: string;
99
+ projectExid: string | null;
100
+ projectName: string | null;
101
+ cameraExid: string | null;
102
+ timezone: string;
103
+ /**
104
+ * A conversation to open, from `?chat=` on the dashboard's URL.
105
+ *
106
+ * Deep-linking lives in the *context* rather than in a message of its own
107
+ * because it is exactly that — a fact about where the host currently is, sent
108
+ * on every route change alongside the project and page. `null` means "no
109
+ * opinion", which is what every other page sends.
110
+ */
111
+ chatId: string | null;
112
+ };
113
+ export type ChatThemePayload = {
114
+ theme: ChatTheme;
115
+ };
116
+ /**
117
+ * A page id plus params, never a route string — the dashboard owns the
118
+ * id → route mapping.
119
+ */
120
+ export type ChatNavigatePayload = {
121
+ pageId: string;
122
+ params: Record<string, string>;
123
+ };
124
+ /**
125
+ * Open a 360-walk marker in the 360 viewer, facing one view.
126
+ *
127
+ * Sent by Chat when a `WalkView` in an answer is clicked. The dashboard opens the
128
+ * 360 app in its own dialog (`Walk360Preview`), outside the chat frame, so the
129
+ * viewer gets the whole screen. `walkName` and `walkDate` are how the 360 app
130
+ * knows a walk (its `floor` and `date` URL params); `camera` is the viewer's own
131
+ * azimuth/polar angles for that view, or null to open at the marker's default.
132
+ */
133
+ export type ChatOpenWalkMarkerPayload = {
134
+ projectExid: string;
135
+ walkId: string;
136
+ walkName: string;
137
+ walkDate: string;
138
+ markerId: string;
139
+ view: string;
140
+ camera: {
141
+ azimuthAngle: number;
142
+ polarAngle: number;
143
+ } | null;
144
+ };
145
+ /**
146
+ * One conversation, as the dashboard's sidebar needs it.
147
+ *
148
+ * A deliberate projection of the engine's `ChatSession` — a label and a
149
+ * timestamp, nothing else. The transcript stays in the frame: mirroring `turns`
150
+ * would put every message of every conversation on the bridge each time the list
151
+ * changed, to render a row that shows neither.
152
+ */
153
+ export type ChatSessionSummary = {
154
+ id: string;
155
+ title: string | null;
156
+ updatedAt: string;
157
+ };
158
+ /**
159
+ * The frame's conversation list, mirrored up for the left sidebar to draw.
160
+ *
161
+ * The frame stays the single owner of this data — it holds the engine client and
162
+ * the bearer. The host renders and sends intent back; it never fetches.
163
+ */
164
+ export type ChatConversationsPayload = {
165
+ sessions: ChatSessionSummary[];
166
+ openId: string | null;
167
+ isLoading: boolean;
168
+ };
169
+ export type ChatOpenConversationPayload = {
170
+ id: string;
171
+ };
172
+ export type ChatRenameConversationPayload = {
173
+ id: string;
174
+ title: string;
175
+ };
176
+ export type ChatDeleteConversationPayload = {
177
+ id: string;
178
+ };
42
179
  export declare enum NavigationArrow {
43
180
  Previous = "previous",
44
181
  Next = "next"
@@ -54,24 +191,6 @@ export declare enum PlayerMode {
54
191
  Video = "video",
55
192
  Jpegs = "jpegs"
56
193
  }
57
- export type TasksStatusMap = {
58
- [key: string]: TaskStatus;
59
- };
60
- export type TaskProgressItem = {
61
- status: TaskStatus;
62
- description: string;
63
- percentDone?: number;
64
- duration?: number;
65
- };
66
- export type GlobalSearchMatch = {
67
- path: Array<string>;
68
- value: string | number | boolean;
69
- };
70
- export type GlobalSearchResult = {
71
- index: number;
72
- matches: Array<GlobalSearchMatch>;
73
- };
74
- export type GlobalSearchResultInput = Array<Record<any, any> | Array<any>>;
75
194
  export type TimelineProviderRequestParams = TimelineDateInterval & {
76
195
  precision?: TimelinePrecision;
77
196
  labels?: string[];
@@ -182,12 +301,14 @@ export type TagSelectorItem = Tag & {
182
301
  };
183
302
  export declare enum FormSchemaComponents {
184
303
  SelectField = "SelectField",
304
+ HierarchicalSelect = "HierarchicalSelectField",
185
305
  MultiOption = "MultiOption",
186
306
  TextField = "TextField",
187
307
  SwitchField = "SwitchField",
188
308
  CheckBox = "CheckBoxField",
189
309
  Date = "DatePickerInput",
190
310
  DateTime = "DateTimeField",
311
+ Time = "TimeField",
191
312
  TextArea = "Textarea",
192
313
  Search = "Autocomplete",
193
314
  ReadOnly = "ReadOnly",
@@ -202,6 +323,7 @@ export declare enum FormSchemaDataType {
202
323
  export type FormSchemaOptions = {
203
324
  title: string;
204
325
  value: string;
326
+ parentId?: string | null;
205
327
  };
206
328
  export type FormSchemaField = {
207
329
  id: string;
@@ -229,6 +351,7 @@ export type DrawingStats = {
229
351
  };
230
352
  export interface ScrollListener {
231
353
  element: Element | Window;
354
+ event: "scroll" | "resize";
232
355
  handler: () => void;
233
356
  }
234
357
  export interface LeaderLineInstance {
@@ -242,24 +365,25 @@ export type SnapshotCardItem = {
242
365
  placeholderThumbnailUrl?: string;
243
366
  fallbackThumbnailUrl?: string;
244
367
  };
245
- export type DocumentExtended = Document & {
246
- webkitIsFullScreen?: boolean;
247
- mozFullScreen?: boolean;
248
- msFullscreenElement?: Element | null;
249
- fullscreenElement?: Element;
250
- webkitFullscreenElement?: Element;
251
- mozFullScreenElement?: Element;
252
- };
253
368
  export type HighchartsSeriesWithData<T extends number = number> = SeriesOptionsType & {
254
369
  data: T[];
255
370
  };
371
+ export type NotificationTitleSegment = {
372
+ text: string;
373
+ isBold?: boolean;
374
+ };
256
375
  export type FormattedNotificationData = {
257
376
  title: string;
377
+ titleSegments?: NotificationTitleSegment[];
258
378
  link: string;
259
379
  thumbnail?: string;
260
- icon?: string;
261
- drone?: boolean;
262
- is360?: boolean;
380
+ icon: string;
381
+ excerpt?: string;
382
+ commentTarget?: {
383
+ commentId: number;
384
+ dateId: string | number;
385
+ floorId: string;
386
+ };
263
387
  };
264
388
  export type FormattedNotification = FormattedNotificationData & {
265
389
  date: string;
@@ -288,6 +412,20 @@ export type AutodeskUploadFormData = {
288
412
  project: AutodeskProject | null;
289
413
  folder: AutodeskFolder | null;
290
414
  };
415
+ export type HammertechUploadFormData = {
416
+ project: HammertechProject | null;
417
+ issueType: HammertechIssueType | null;
418
+ description: string;
419
+ priority: HammertechPriority | null;
420
+ dueDate: string | null;
421
+ classification: HammertechClassification | null;
422
+ locationId: string | null;
423
+ isPositiveObservation: boolean;
424
+ isPhotoForFixRequired: boolean;
425
+ customFieldFormId: string | null;
426
+ customFieldValues: Record<string, unknown>;
427
+ fileCustomFieldValues: Record<string, HammertechFileFieldValue>;
428
+ };
291
429
  export interface MediaHubFilters {
292
430
  title: string;
293
431
  requesterEmail: string | undefined;
@@ -301,18 +439,6 @@ export interface MediaHubSortParameter {
301
439
  label: string;
302
440
  value: string;
303
441
  }
304
- export type TableHeaderParams<TItem = unknown> = {
305
- value: string;
306
- text: string;
307
- cellClass?: string;
308
- align?: string;
309
- sortable?: boolean;
310
- visible?: boolean;
311
- width?: number | string;
312
- copyable?: boolean;
313
- toStringFn?: (item: TItem, key: string) => any;
314
- sort?: (a: unknown, b: unknown) => number;
315
- };
316
442
  export type BimUploadObject = IngestUploadInitResponse & {
317
443
  projectName: string;
318
444
  };
@@ -321,3 +447,122 @@ export type BimUploadFileResult = {
321
447
  title: string;
322
448
  fileExtension: string;
323
449
  };
450
+ export type CameraCardItem = {
451
+ thumbnail: string;
452
+ title: string;
453
+ exid: string;
454
+ status: CameraStatus;
455
+ disabled: boolean;
456
+ to: string;
457
+ isOffline: boolean;
458
+ isWaiting: boolean;
459
+ isUnderNda: boolean;
460
+ isAdmin: boolean;
461
+ batteryVoltage: number | null;
462
+ };
463
+ export type ThreeSixtyGalleryView = "drawings" | "walks";
464
+ export interface ThreeSixtyWalk {
465
+ id: string;
466
+ name: string;
467
+ date: string;
468
+ monthKey: string;
469
+ color: string;
470
+ dateId: string;
471
+ floorId: string;
472
+ commentCount: number;
473
+ hasBim: boolean;
474
+ hasMinimodel: boolean;
475
+ }
476
+ export interface ThreeSixtyWalkGroup {
477
+ date: string;
478
+ walks: ThreeSixtyWalk[];
479
+ }
480
+ export type ThreeSixtyMediaDownloadOption = {
481
+ type: _360AssetType;
482
+ title: string;
483
+ icon: string;
484
+ };
485
+ export type DrawingSelection = {
486
+ pageNumber: number;
487
+ size: number;
488
+ thumbnail: string | null;
489
+ pageCount: number;
490
+ };
491
+ export type CommentCardComment = {
492
+ id?: number | string;
493
+ content?: string;
494
+ createdAt?: string;
495
+ archivedAt?: string;
496
+ creatorName?: string;
497
+ label?: string;
498
+ timestamp?: string;
499
+ cameraExid?: string;
500
+ position3d?: number[];
501
+ canDelete?: boolean;
502
+ };
503
+ export type ErrorPageParams = {
504
+ statusCode: number;
505
+ message: string;
506
+ homePageLink?: boolean;
507
+ };
508
+ export declare enum AuditLogDetailsView {
509
+ Diff = "diff",
510
+ OfflineMessage = "offlineMessage",
511
+ Delete = "delete",
512
+ Create = "create",
513
+ NvrDeviceSettings = "nvrDeviceSettings",
514
+ RouterDeviceSettings = "routerDeviceSettings"
515
+ }
516
+ export type AuditLogDetailsCell = AuditLogDetails[keyof AuditLogDetails] | JsonValue;
517
+ export type AuditLogDetailsRow = {
518
+ key: string;
519
+ cells: AuditLogDetailsCell[];
520
+ isJsonFormatted?: boolean;
521
+ isScopeList?: boolean;
522
+ rowClass?: string;
523
+ };
524
+ export type AuditLogDetailsTable = {
525
+ headers: {
526
+ text: string;
527
+ width?: string;
528
+ }[];
529
+ rows: AuditLogDetailsRow[];
530
+ };
531
+ export type AuditLogAuthMethodView = {
532
+ icon: string;
533
+ label: string;
534
+ tooltip: string;
535
+ };
536
+ export type AuditLogLinkEntity = AuditLogEntity.Cameras | AuditLogEntity.Projects | AuditLogEntity.Routers | AuditLogEntity.Users | AuditLogEntity.Sims;
537
+ export type AuditLogRow = AuditLog & {
538
+ canExpand: boolean;
539
+ authMethod: AuditLogAuthMethodView | null;
540
+ };
541
+ export type AuditLogsReportParams = PaginationParams & Partial<AuditLogsParams>;
542
+ export declare enum ShareByEmailKind {
543
+ Drone = "drone"
544
+ }
545
+ export declare enum ShareByEmailStatus {
546
+ Capturing = "capturing",
547
+ Ready = "ready",
548
+ Failed = "failed"
549
+ }
550
+ export type DroneEmailCapture = Pick<DroneComparisonFrames, "beforeDate" | "afterDate"> & Partial<Pick<DroneComparisonFrames, "beforeImage" | "afterImage">> & {
551
+ status: ShareByEmailStatus;
552
+ error?: string;
553
+ };
554
+ export type QuillEditorInstance = {
555
+ enable: (enabled: boolean) => void;
556
+ root: HTMLElement;
557
+ clipboard: {
558
+ dangerouslyPasteHTML: (index: number, html: string, source?: string) => void;
559
+ };
560
+ deleteText: (index: number, length: number, source?: string) => void;
561
+ getLength: () => number;
562
+ getSelection: (focus?: boolean) => {
563
+ index: number;
564
+ length: number;
565
+ } | null;
566
+ insertEmbed: (index: number, type: string, value: string, source?: string) => void;
567
+ setSelection: (index: number, length?: number) => void;
568
+ };
@@ -0,0 +1,10 @@
1
+ export declare enum CustomDataTableFilterType {
2
+ Select = "SelectSearchFilter",
3
+ Text = "TextFieldSearchFilter"
4
+ }
5
+ export interface CustomDataTableFilterField<T = unknown> {
6
+ component: CustomDataTableFilterType;
7
+ attributes?: Record<string, unknown>;
8
+ customFilter?: (item: T, fieldName: string, search: unknown) => boolean;
9
+ }
10
+ export type CustomDataTableFilterFields<T = unknown> = Record<string, CustomDataTableFilterField<T>>;
@@ -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,5 +1,9 @@
1
1
  export * from "@evercam/api/types";
2
2
  export * from "./components";
3
+ export * from "./report";
4
+ export * from "./customDataTableFilters";
3
5
  export * from "./imagePlayer";
4
6
  export * from "./timeline";
5
7
  export * from "./rbac";
8
+ export * from "./observations";
9
+ export * from "./droneUpload";
@@ -0,0 +1,25 @@
1
+ export type ObservationsTableHeader = {
2
+ isThumbnail?: boolean;
3
+ visible: boolean;
4
+ divider: boolean;
5
+ sortable: boolean;
6
+ text: string;
7
+ value: string;
8
+ class: string;
9
+ align: string;
10
+ };
11
+ export type ObservationsCountDay = {
12
+ day: string;
13
+ };
14
+ export type ObservationsTableOptionsUpdate = {
15
+ page: number;
16
+ sortBy: string[];
17
+ sortDesc: boolean[];
18
+ };
19
+ export type ObservationsEventsTableState = {
20
+ height: number | string;
21
+ };
22
+ export type ObservationTypeOption = {
23
+ value: string;
24
+ label: string;
25
+ };
@@ -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
+ };
@@ -0,0 +1,36 @@
1
+ import type { DateRange, DayMeta } from "@evercam/ui";
2
+ /**
3
+ * EDatePicker works in plain local `Date`s; this app stores dates as
4
+ * "YYYY-MM-DD" strings. Both helpers carry the wall-clock reading across that
5
+ * boundary — never the instant — so a date never shifts by a day.
6
+ */
7
+ export declare function toCalendarDate(value?: string | number | Date | null, { timezone, withHour }?: {
8
+ timezone?: string;
9
+ withHour?: boolean;
10
+ }): Date | undefined;
11
+ export declare function toIsoDay(date?: Date | null): string;
12
+ export declare function toCalendarDayEnd(value?: string | number | Date | null, timezone?: string): Date | undefined;
13
+ export declare function toCalendarRange(value?: string[] | null): DateRange;
14
+ export declare function fromCalendarRange(range?: DateRange | null): string[];
15
+ export declare function toCssColor(color?: string): string | undefined;
16
+ export declare function toDayMeta({ date, events, eventColor, }: {
17
+ date: Date;
18
+ events?: string[] | ((day: string) => boolean);
19
+ eventColor?: string | ((day: string) => string | undefined);
20
+ }): DayMeta | undefined;
21
+ /**
22
+ * Days inside the current selection carry no marker; everything else keeps the
23
+ * "available footage" dot. An empty or half-made selection marks every day.
24
+ */
25
+ export declare function getOutsideRangeColor(day: string, range?: string[] | null, color?: string): string | undefined;
26
+ export declare function orderDayRange(range?: string[] | null): {
27
+ fromDate: string;
28
+ toDate: string;
29
+ } | null;
30
+ export declare function toDayBounds({ fromDate, toDate, }: {
31
+ fromDate: string;
32
+ toDate: string;
33
+ }): {
34
+ fromDate: string;
35
+ toDate: string;
36
+ };