@evercam/api 1.0.0-1e9dde45a → 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 (75) hide show
  1. package/README.md +1 -0
  2. package/dist/api/api/3dFirebaseApi.d.ts +77 -36
  3. package/dist/api/api/adminApi.d.ts +39 -22
  4. package/dist/api/api/aiApi.d.ts +125 -2
  5. package/dist/api/api/authzApi.d.ts +4 -1
  6. package/dist/api/api/evercamApi.d.ts +48 -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 +56 -34
  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 +244 -0
  14. package/dist/api/types/analytics.d.ts +57 -23
  15. package/dist/api/types/anpr.d.ts +31 -2
  16. package/dist/api/types/apiKey.d.ts +70 -0
  17. package/dist/api/types/auditLogs.d.ts +163 -20
  18. package/dist/api/types/authz.d.ts +71 -0
  19. package/dist/api/types/automation.d.ts +32 -4
  20. package/dist/api/types/axios.d.ts +9 -9
  21. package/dist/api/types/bim.d.ts +29 -6
  22. package/dist/api/types/camera.d.ts +39 -30
  23. package/dist/api/types/comments.d.ts +10 -3
  24. package/dist/api/types/company.d.ts +1 -2
  25. package/dist/api/types/compare.d.ts +1 -1
  26. package/dist/api/types/connector.d.ts +2 -0
  27. package/dist/api/types/detections.d.ts +3 -10
  28. package/dist/api/types/drone.d.ts +7 -7
  29. package/dist/api/types/emailMessages.d.ts +27 -0
  30. package/dist/api/types/errors.d.ts +18 -2
  31. package/dist/api/types/gateReport.d.ts +1 -11
  32. package/dist/api/types/gateReportManagement.d.ts +170 -0
  33. package/dist/api/types/hammertech.d.ts +98 -0
  34. package/dist/api/types/index.d.ts +10 -2
  35. package/dist/api/types/ingest.d.ts +194 -27
  36. package/dist/api/types/kit.d.ts +44 -101
  37. package/dist/api/types/media.d.ts +7 -2
  38. package/dist/api/types/notification.d.ts +52 -2
  39. package/dist/api/types/nvr.d.ts +8 -8
  40. package/dist/api/types/observationEvents.d.ts +141 -0
  41. package/dist/api/types/observations.d.ts +80 -0
  42. package/dist/api/types/planner.d.ts +3 -11
  43. package/dist/api/types/posthog.d.ts +20 -0
  44. package/dist/api/types/project.d.ts +15 -3
  45. package/dist/api/types/recording.d.ts +5 -12
  46. package/dist/api/types/reports.d.ts +108 -0
  47. package/dist/api/types/ring.d.ts +16 -16
  48. package/dist/api/types/roi.d.ts +2 -10
  49. package/dist/api/types/routeParams.d.ts +1 -0
  50. package/dist/api/types/shared.d.ts +15 -23
  51. package/dist/api/types/shares.d.ts +0 -13
  52. package/dist/api/types/siteAnalytics.d.ts +3 -5
  53. package/dist/api/types/siteAnalyticsManagement.d.ts +127 -0
  54. package/dist/api/types/siteView.d.ts +12 -8
  55. package/dist/api/types/snapshots.d.ts +13 -0
  56. package/dist/api/types/socket.d.ts +4 -0
  57. package/dist/api/types/storyblok.d.ts +0 -13
  58. package/dist/api/types/timelapse.d.ts +2 -13
  59. package/dist/api/types/user.d.ts +29 -4
  60. package/dist/api/utils.d.ts +1 -1
  61. package/dist/index.js +1780 -939
  62. package/dist/index.js.map +1 -1
  63. package/dist/index.umd.cjs +1 -1
  64. package/dist/index.umd.cjs.map +1 -1
  65. package/dist/shared/types/components.d.ts +300 -44
  66. package/dist/shared/types/customDataTableFilters.d.ts +10 -0
  67. package/dist/shared/types/droneUpload.d.ts +93 -0
  68. package/dist/shared/types/index.d.ts +4 -0
  69. package/dist/shared/types/observations.d.ts +25 -0
  70. package/dist/shared/types/report.d.ts +107 -0
  71. package/dist/shared/utils/datePickerValue.d.ts +36 -0
  72. package/dist/shared/utils/datePresets.d.ts +31 -0
  73. package/package.json +4 -2
  74. package/dist/api/types/copilot.d.ts +0 -162
  75. package/dist/api/types/vendorModel.d.ts +0 -15
@@ -1,11 +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 } from "@evercam/shared/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";
2
3
  import type { TimelineChartType, TimelineEvent, TimelineEventsGroup } from "@evercam/ui";
3
4
  import { TimelineDataProvider } from "@evercam/shared/components/timelinePlayer/providers";
4
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
+ };
5
15
  export type SelectItem = {
6
16
  text: string;
7
17
  value: string | number;
8
18
  };
19
+ export type RoiProjectGroup = {
20
+ exid: string;
21
+ name: string;
22
+ cameras: AdminCamera[];
23
+ };
9
24
  export declare enum IframeMessageType {
10
25
  LiveView = "liveView",
11
26
  EditSnapshot = "editSnapshot",
@@ -34,8 +49,133 @@ export declare enum IframeMessageType {
34
49
  Upload360 = "upload360",
35
50
  FetchForgeToken = "FetchForgeToken",
36
51
  ForgeTokenResponse = "ForgeTokenResponse",
37
- ViewerLaunchFlags = "viewerLaunchFlags"
52
+ ShowBimUploadChoice = "showBimUploadChoice",
53
+ ViewerLaunchFlags = "viewerLaunchFlags",
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"
38
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
+ };
39
179
  export declare enum NavigationArrow {
40
180
  Previous = "previous",
41
181
  Next = "next"
@@ -51,24 +191,6 @@ export declare enum PlayerMode {
51
191
  Video = "video",
52
192
  Jpegs = "jpegs"
53
193
  }
54
- export type TasksStatusMap = {
55
- [key: string]: TaskStatus;
56
- };
57
- export type TaskProgressItem = {
58
- status: TaskStatus;
59
- description: string;
60
- percentDone?: number;
61
- duration?: number;
62
- };
63
- export type GlobalSearchMatch = {
64
- path: Array<string>;
65
- value: string | number | boolean;
66
- };
67
- export type GlobalSearchResult = {
68
- index: number;
69
- matches: Array<GlobalSearchMatch>;
70
- };
71
- export type GlobalSearchResultInput = Array<Record<any, any> | Array<any>>;
72
194
  export type TimelineProviderRequestParams = TimelineDateInterval & {
73
195
  precision?: TimelinePrecision;
74
196
  labels?: string[];
@@ -151,8 +273,8 @@ export type LeaderLineOptions = {
151
273
  startPlugSize?: number;
152
274
  endPlugSize?: number;
153
275
  path?: LeaderLinesPathType;
154
- startSocketGravity?: [number, number];
155
- endSocketGravity?: [number, number];
276
+ startSocketGravity?: TuplePoint2D;
277
+ endSocketGravity?: TuplePoint2D;
156
278
  dash?: {
157
279
  animation: boolean | {
158
280
  duration: number;
@@ -179,12 +301,14 @@ export type TagSelectorItem = Tag & {
179
301
  };
180
302
  export declare enum FormSchemaComponents {
181
303
  SelectField = "SelectField",
304
+ HierarchicalSelect = "HierarchicalSelectField",
182
305
  MultiOption = "MultiOption",
183
306
  TextField = "TextField",
184
307
  SwitchField = "SwitchField",
185
308
  CheckBox = "CheckBoxField",
186
309
  Date = "DatePickerInput",
187
310
  DateTime = "DateTimeField",
311
+ Time = "TimeField",
188
312
  TextArea = "Textarea",
189
313
  Search = "Autocomplete",
190
314
  ReadOnly = "ReadOnly",
@@ -199,6 +323,7 @@ export declare enum FormSchemaDataType {
199
323
  export type FormSchemaOptions = {
200
324
  title: string;
201
325
  value: string;
326
+ parentId?: string | null;
202
327
  };
203
328
  export type FormSchemaField = {
204
329
  id: string;
@@ -226,6 +351,7 @@ export type DrawingStats = {
226
351
  };
227
352
  export interface ScrollListener {
228
353
  element: Element | Window;
354
+ event: "scroll" | "resize";
229
355
  handler: () => void;
230
356
  }
231
357
  export interface LeaderLineInstance {
@@ -239,24 +365,25 @@ export type SnapshotCardItem = {
239
365
  placeholderThumbnailUrl?: string;
240
366
  fallbackThumbnailUrl?: string;
241
367
  };
242
- export type DocumentExtended = Document & {
243
- webkitIsFullScreen?: boolean;
244
- mozFullScreen?: boolean;
245
- msFullscreenElement?: Element | null;
246
- fullscreenElement?: Element;
247
- webkitFullscreenElement?: Element;
248
- mozFullScreenElement?: Element;
249
- };
250
368
  export type HighchartsSeriesWithData<T extends number = number> = SeriesOptionsType & {
251
369
  data: T[];
252
370
  };
371
+ export type NotificationTitleSegment = {
372
+ text: string;
373
+ isBold?: boolean;
374
+ };
253
375
  export type FormattedNotificationData = {
254
376
  title: string;
377
+ titleSegments?: NotificationTitleSegment[];
255
378
  link: string;
256
379
  thumbnail?: string;
257
- icon?: string;
258
- drone?: boolean;
259
- is360?: boolean;
380
+ icon: string;
381
+ excerpt?: string;
382
+ commentTarget?: {
383
+ commentId: number;
384
+ dateId: string | number;
385
+ floorId: string;
386
+ };
260
387
  };
261
388
  export type FormattedNotification = FormattedNotificationData & {
262
389
  date: string;
@@ -285,6 +412,20 @@ export type AutodeskUploadFormData = {
285
412
  project: AutodeskProject | null;
286
413
  folder: AutodeskFolder | null;
287
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
+ };
288
429
  export interface MediaHubFilters {
289
430
  title: string;
290
431
  requesterEmail: string | undefined;
@@ -298,15 +439,130 @@ export interface MediaHubSortParameter {
298
439
  label: string;
299
440
  value: string;
300
441
  }
301
- export type TableHeaderParams<TItem = unknown> = {
302
- value: string;
303
- text: string;
304
- cellClass?: string;
305
- align?: string;
306
- sortable?: boolean;
307
- visible?: boolean;
308
- width?: number | string;
309
- copyable?: boolean;
310
- toStringFn?: (item: TItem, key: string) => any;
311
- sort?: (a: unknown, b: unknown) => number;
442
+ export type BimUploadObject = IngestUploadInitResponse & {
443
+ projectName: string;
444
+ };
445
+ export type BimUploadFileResult = {
446
+ url: string;
447
+ title: string;
448
+ fileExtension: string;
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;
312
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
+ };