@evercam/api 1.0.0-70861323c → 1.0.0-741727bc1
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.
- package/dist/api/api/3dFirebaseApi.d.ts +26 -15
- package/dist/api/api/adminApi.d.ts +22 -8
- package/dist/api/api/aiApi.d.ts +85 -2
- package/dist/api/api/authzApi.d.ts +2 -2
- package/dist/api/api/evercamApi.d.ts +32 -18
- package/dist/api/api/evercamLabsApi.d.ts +1 -12
- package/dist/api/api/index.d.ts +1 -0
- package/dist/api/api/ingestApi.d.ts +44 -34
- package/dist/api/api/reportsApi.d.ts +15 -0
- package/dist/api/types/360.d.ts +29 -59
- package/dist/api/types/admin.d.ts +1 -1
- package/dist/api/types/aiConfigs.d.ts +102 -12
- package/dist/api/types/analytics.d.ts +30 -23
- package/dist/api/types/apiKey.d.ts +70 -0
- package/dist/api/types/auditLogs.d.ts +145 -20
- package/dist/api/types/authz.d.ts +34 -9
- package/dist/api/types/automation.d.ts +32 -4
- package/dist/api/types/axios.d.ts +2 -4
- package/dist/api/types/bim.d.ts +4 -6
- package/dist/api/types/camera.d.ts +34 -27
- package/dist/api/types/comments.d.ts +7 -1
- package/dist/api/types/company.d.ts +1 -2
- package/dist/api/types/compare.d.ts +1 -1
- package/dist/api/types/connector.d.ts +1 -0
- package/dist/api/types/detections.d.ts +1 -0
- package/dist/api/types/drone.d.ts +1 -2
- package/dist/api/types/errors.d.ts +7 -2
- package/dist/api/types/gateReport.d.ts +0 -11
- package/dist/api/types/gateReportManagement.d.ts +2 -7
- package/dist/api/types/hammertech.d.ts +98 -0
- package/dist/api/types/index.d.ts +6 -2
- package/dist/api/types/ingest.d.ts +169 -26
- package/dist/api/types/kit.d.ts +33 -99
- package/dist/api/types/media.d.ts +3 -3
- package/dist/api/types/notification.d.ts +52 -2
- package/dist/api/types/nvr.d.ts +8 -8
- package/dist/api/types/observationEvents.d.ts +141 -0
- package/dist/api/types/observations.d.ts +80 -0
- package/dist/api/types/planner.d.ts +1 -8
- package/dist/api/types/project.d.ts +15 -3
- package/dist/api/types/recording.d.ts +2 -4
- package/dist/api/types/reports.d.ts +108 -0
- package/dist/api/types/ring.d.ts +16 -16
- package/dist/api/types/roi.d.ts +0 -9
- package/dist/api/types/routeParams.d.ts +1 -0
- package/dist/api/types/shared.d.ts +14 -23
- package/dist/api/types/shares.d.ts +0 -13
- package/dist/api/types/siteAnalytics.d.ts +1 -3
- package/dist/api/types/siteAnalyticsManagement.d.ts +39 -4
- package/dist/api/types/siteView.d.ts +12 -7
- package/dist/api/types/socket.d.ts +4 -0
- package/dist/api/types/storyblok.d.ts +0 -13
- package/dist/api/types/timelapse.d.ts +1 -8
- package/dist/api/types/user.d.ts +15 -0
- package/dist/api/utils.d.ts +1 -0
- package/dist/index.js +1393 -907
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/shared/types/components.d.ts +238 -44
- package/dist/shared/types/droneUpload.d.ts +93 -0
- package/dist/shared/types/index.d.ts +3 -0
- package/dist/shared/types/observations.d.ts +25 -0
- package/dist/shared/types/report.d.ts +107 -0
- package/dist/shared/utils/datePickerValue.d.ts +36 -0
- package/dist/shared/utils/datePresets.d.ts +31 -0
- package/package.json +1 -1
- package/dist/api/types/copilot.d.ts +0 -162
- package/dist/api/types/vendorModel.d.ts +0 -15
|
@@ -1,8 +1,17 @@
|
|
|
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,
|
|
2
|
-
import type { AdminCamera, 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, 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;
|
|
@@ -42,8 +51,130 @@ export declare enum IframeMessageType {
|
|
|
42
51
|
ForgeTokenResponse = "ForgeTokenResponse",
|
|
43
52
|
ShowBimUploadChoice = "showBimUploadChoice",
|
|
44
53
|
ViewerLaunchFlags = "viewerLaunchFlags",
|
|
45
|
-
|
|
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
|
+
}
|
|
71
|
+
export declare enum ChatTheme {
|
|
72
|
+
Dark = "dark",
|
|
73
|
+
Light = "light"
|
|
46
74
|
}
|
|
75
|
+
export type ChatUser = {
|
|
76
|
+
email: string;
|
|
77
|
+
name: string;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* The dashboard's answer to the frame's `Ready`.
|
|
81
|
+
*
|
|
82
|
+
* The token travels here and nowhere else — never in the iframe URL, which
|
|
83
|
+
* would land it in history, referrers and logs.
|
|
84
|
+
*/
|
|
85
|
+
export type ChatInitPayload = {
|
|
86
|
+
token: string;
|
|
87
|
+
user: ChatUser;
|
|
88
|
+
theme: ChatTheme;
|
|
89
|
+
timezone: string;
|
|
90
|
+
};
|
|
91
|
+
/** Pushed on rotation. A frame holding a mount-time token 401s the moment it changes. */
|
|
92
|
+
export type ChatTokenPayload = {
|
|
93
|
+
token: string;
|
|
94
|
+
};
|
|
95
|
+
/** Pushed on every dashboard route change. */
|
|
96
|
+
export type ChatContextPayload = {
|
|
97
|
+
pageId: string;
|
|
98
|
+
projectExid: string | null;
|
|
99
|
+
projectName: string | null;
|
|
100
|
+
cameraExid: string | null;
|
|
101
|
+
timezone: string;
|
|
102
|
+
/**
|
|
103
|
+
* A conversation to open, from `?chat=` on the dashboard's URL.
|
|
104
|
+
*
|
|
105
|
+
* Deep-linking lives in the *context* rather than in a message of its own
|
|
106
|
+
* because it is exactly that — a fact about where the host currently is, sent
|
|
107
|
+
* on every route change alongside the project and page. `null` means "no
|
|
108
|
+
* opinion", which is what every other page sends.
|
|
109
|
+
*/
|
|
110
|
+
chatId: string | null;
|
|
111
|
+
};
|
|
112
|
+
export type ChatThemePayload = {
|
|
113
|
+
theme: ChatTheme;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* A page id plus params, never a route string — the dashboard owns the
|
|
117
|
+
* id → route mapping.
|
|
118
|
+
*/
|
|
119
|
+
export type ChatNavigatePayload = {
|
|
120
|
+
pageId: string;
|
|
121
|
+
params: Record<string, string>;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Open a 360-walk marker in the 360 viewer, facing one view.
|
|
125
|
+
*
|
|
126
|
+
* Sent by Chat when a `WalkView` in an answer is clicked. The dashboard opens the
|
|
127
|
+
* 360 app in its own dialog (`Walk360Preview`), outside the chat frame, so the
|
|
128
|
+
* viewer gets the whole screen. `walkName` and `walkDate` are how the 360 app
|
|
129
|
+
* knows a walk (its `floor` and `date` URL params); `camera` is the viewer's own
|
|
130
|
+
* azimuth/polar angles for that view, or null to open at the marker's default.
|
|
131
|
+
*/
|
|
132
|
+
export type ChatOpenWalkMarkerPayload = {
|
|
133
|
+
projectExid: string;
|
|
134
|
+
walkId: string;
|
|
135
|
+
walkName: string;
|
|
136
|
+
walkDate: string;
|
|
137
|
+
markerId: string;
|
|
138
|
+
view: string;
|
|
139
|
+
camera: {
|
|
140
|
+
azimuthAngle: number;
|
|
141
|
+
polarAngle: number;
|
|
142
|
+
} | null;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* One conversation, as the dashboard's sidebar needs it.
|
|
146
|
+
*
|
|
147
|
+
* A deliberate projection of the engine's `ChatSession` — a label and a
|
|
148
|
+
* timestamp, nothing else. The transcript stays in the frame: mirroring `turns`
|
|
149
|
+
* would put every message of every conversation on the bridge each time the list
|
|
150
|
+
* changed, to render a row that shows neither.
|
|
151
|
+
*/
|
|
152
|
+
export type ChatSessionSummary = {
|
|
153
|
+
id: string;
|
|
154
|
+
title: string | null;
|
|
155
|
+
updatedAt: string;
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* The frame's conversation list, mirrored up for the left sidebar to draw.
|
|
159
|
+
*
|
|
160
|
+
* The frame stays the single owner of this data — it holds the engine client and
|
|
161
|
+
* the bearer. The host renders and sends intent back; it never fetches.
|
|
162
|
+
*/
|
|
163
|
+
export type ChatConversationsPayload = {
|
|
164
|
+
sessions: ChatSessionSummary[];
|
|
165
|
+
openId: string | null;
|
|
166
|
+
isLoading: boolean;
|
|
167
|
+
};
|
|
168
|
+
export type ChatOpenConversationPayload = {
|
|
169
|
+
id: string;
|
|
170
|
+
};
|
|
171
|
+
export type ChatRenameConversationPayload = {
|
|
172
|
+
id: string;
|
|
173
|
+
title: string;
|
|
174
|
+
};
|
|
175
|
+
export type ChatDeleteConversationPayload = {
|
|
176
|
+
id: string;
|
|
177
|
+
};
|
|
47
178
|
export declare enum NavigationArrow {
|
|
48
179
|
Previous = "previous",
|
|
49
180
|
Next = "next"
|
|
@@ -59,24 +190,6 @@ export declare enum PlayerMode {
|
|
|
59
190
|
Video = "video",
|
|
60
191
|
Jpegs = "jpegs"
|
|
61
192
|
}
|
|
62
|
-
export type TasksStatusMap = {
|
|
63
|
-
[key: string]: TaskStatus;
|
|
64
|
-
};
|
|
65
|
-
export type TaskProgressItem = {
|
|
66
|
-
status: TaskStatus;
|
|
67
|
-
description: string;
|
|
68
|
-
percentDone?: number;
|
|
69
|
-
duration?: number;
|
|
70
|
-
};
|
|
71
|
-
export type GlobalSearchMatch = {
|
|
72
|
-
path: Array<string>;
|
|
73
|
-
value: string | number | boolean;
|
|
74
|
-
};
|
|
75
|
-
export type GlobalSearchResult = {
|
|
76
|
-
index: number;
|
|
77
|
-
matches: Array<GlobalSearchMatch>;
|
|
78
|
-
};
|
|
79
|
-
export type GlobalSearchResultInput = Array<Record<any, any> | Array<any>>;
|
|
80
193
|
export type TimelineProviderRequestParams = TimelineDateInterval & {
|
|
81
194
|
precision?: TimelinePrecision;
|
|
82
195
|
labels?: string[];
|
|
@@ -187,12 +300,14 @@ export type TagSelectorItem = Tag & {
|
|
|
187
300
|
};
|
|
188
301
|
export declare enum FormSchemaComponents {
|
|
189
302
|
SelectField = "SelectField",
|
|
303
|
+
HierarchicalSelect = "HierarchicalSelectField",
|
|
190
304
|
MultiOption = "MultiOption",
|
|
191
305
|
TextField = "TextField",
|
|
192
306
|
SwitchField = "SwitchField",
|
|
193
307
|
CheckBox = "CheckBoxField",
|
|
194
308
|
Date = "DatePickerInput",
|
|
195
309
|
DateTime = "DateTimeField",
|
|
310
|
+
Time = "TimeField",
|
|
196
311
|
TextArea = "Textarea",
|
|
197
312
|
Search = "Autocomplete",
|
|
198
313
|
ReadOnly = "ReadOnly",
|
|
@@ -207,6 +322,7 @@ export declare enum FormSchemaDataType {
|
|
|
207
322
|
export type FormSchemaOptions = {
|
|
208
323
|
title: string;
|
|
209
324
|
value: string;
|
|
325
|
+
parentId?: string | null;
|
|
210
326
|
};
|
|
211
327
|
export type FormSchemaField = {
|
|
212
328
|
id: string;
|
|
@@ -248,14 +364,6 @@ export type SnapshotCardItem = {
|
|
|
248
364
|
placeholderThumbnailUrl?: string;
|
|
249
365
|
fallbackThumbnailUrl?: string;
|
|
250
366
|
};
|
|
251
|
-
export type DocumentExtended = Document & {
|
|
252
|
-
webkitIsFullScreen?: boolean;
|
|
253
|
-
mozFullScreen?: boolean;
|
|
254
|
-
msFullscreenElement?: Element | null;
|
|
255
|
-
fullscreenElement?: Element;
|
|
256
|
-
webkitFullscreenElement?: Element;
|
|
257
|
-
mozFullScreenElement?: Element;
|
|
258
|
-
};
|
|
259
367
|
export type HighchartsSeriesWithData<T extends number = number> = SeriesOptionsType & {
|
|
260
368
|
data: T[];
|
|
261
369
|
};
|
|
@@ -268,9 +376,13 @@ export type FormattedNotificationData = {
|
|
|
268
376
|
titleSegments?: NotificationTitleSegment[];
|
|
269
377
|
link: string;
|
|
270
378
|
thumbnail?: string;
|
|
271
|
-
icon
|
|
272
|
-
|
|
273
|
-
|
|
379
|
+
icon: string;
|
|
380
|
+
excerpt?: string;
|
|
381
|
+
commentTarget?: {
|
|
382
|
+
commentId: number;
|
|
383
|
+
dateId: string | number;
|
|
384
|
+
floorId: string;
|
|
385
|
+
};
|
|
274
386
|
};
|
|
275
387
|
export type FormattedNotification = FormattedNotificationData & {
|
|
276
388
|
date: string;
|
|
@@ -299,6 +411,20 @@ export type AutodeskUploadFormData = {
|
|
|
299
411
|
project: AutodeskProject | null;
|
|
300
412
|
folder: AutodeskFolder | null;
|
|
301
413
|
};
|
|
414
|
+
export type HammertechUploadFormData = {
|
|
415
|
+
project: HammertechProject | null;
|
|
416
|
+
issueType: HammertechIssueType | null;
|
|
417
|
+
description: string;
|
|
418
|
+
priority: HammertechPriority | null;
|
|
419
|
+
dueDate: string | null;
|
|
420
|
+
classification: HammertechClassification | null;
|
|
421
|
+
locationId: string | null;
|
|
422
|
+
isPositiveObservation: boolean;
|
|
423
|
+
isPhotoForFixRequired: boolean;
|
|
424
|
+
customFieldFormId: string | null;
|
|
425
|
+
customFieldValues: Record<string, unknown>;
|
|
426
|
+
fileCustomFieldValues: Record<string, HammertechFileFieldValue>;
|
|
427
|
+
};
|
|
302
428
|
export interface MediaHubFilters {
|
|
303
429
|
title: string;
|
|
304
430
|
requesterEmail: string | undefined;
|
|
@@ -312,18 +438,6 @@ export interface MediaHubSortParameter {
|
|
|
312
438
|
label: string;
|
|
313
439
|
value: string;
|
|
314
440
|
}
|
|
315
|
-
export type TableHeaderParams<TItem = unknown> = {
|
|
316
|
-
value: string;
|
|
317
|
-
text: string;
|
|
318
|
-
cellClass?: string;
|
|
319
|
-
align?: string;
|
|
320
|
-
sortable?: boolean;
|
|
321
|
-
visible?: boolean;
|
|
322
|
-
width?: number | string;
|
|
323
|
-
copyable?: boolean;
|
|
324
|
-
toStringFn?: (item: TItem, key: string) => any;
|
|
325
|
-
sort?: (a: unknown, b: unknown) => number;
|
|
326
|
-
};
|
|
327
441
|
export type BimUploadObject = IngestUploadInitResponse & {
|
|
328
442
|
projectName: string;
|
|
329
443
|
};
|
|
@@ -332,15 +446,95 @@ export type BimUploadFileResult = {
|
|
|
332
446
|
title: string;
|
|
333
447
|
fileExtension: string;
|
|
334
448
|
};
|
|
449
|
+
export type CameraCardItem = {
|
|
450
|
+
thumbnail: string;
|
|
451
|
+
title: string;
|
|
452
|
+
exid: string;
|
|
453
|
+
status: CameraStatus;
|
|
454
|
+
disabled: boolean;
|
|
455
|
+
to: string;
|
|
456
|
+
isOffline: boolean;
|
|
457
|
+
isWaiting: boolean;
|
|
458
|
+
isUnderNda: boolean;
|
|
459
|
+
isAdmin: boolean;
|
|
460
|
+
batteryVoltage: number | null;
|
|
461
|
+
};
|
|
462
|
+
export type ThreeSixtyGalleryView = "drawings" | "walks";
|
|
335
463
|
export interface ThreeSixtyWalk {
|
|
336
464
|
id: string;
|
|
337
465
|
name: string;
|
|
338
466
|
date: string;
|
|
467
|
+
monthKey: string;
|
|
339
468
|
color: string;
|
|
340
469
|
dateId: string;
|
|
341
470
|
floorId: string;
|
|
471
|
+
commentCount: number;
|
|
472
|
+
hasBim: boolean;
|
|
473
|
+
hasMinimodel: boolean;
|
|
342
474
|
}
|
|
343
475
|
export interface ThreeSixtyWalkGroup {
|
|
344
476
|
date: string;
|
|
345
477
|
walks: ThreeSixtyWalk[];
|
|
346
478
|
}
|
|
479
|
+
export type ThreeSixtyMediaDownloadOption = {
|
|
480
|
+
type: _360AssetType;
|
|
481
|
+
title: string;
|
|
482
|
+
icon: string;
|
|
483
|
+
};
|
|
484
|
+
export type DrawingSelection = {
|
|
485
|
+
pageNumber: number;
|
|
486
|
+
size: number;
|
|
487
|
+
thumbnail: string | null;
|
|
488
|
+
pageCount: number;
|
|
489
|
+
};
|
|
490
|
+
export type CommentCardComment = {
|
|
491
|
+
id?: number | string;
|
|
492
|
+
content?: string;
|
|
493
|
+
createdAt?: string;
|
|
494
|
+
archivedAt?: string;
|
|
495
|
+
creatorName?: string;
|
|
496
|
+
label?: string;
|
|
497
|
+
timestamp?: string;
|
|
498
|
+
cameraExid?: string;
|
|
499
|
+
position3d?: number[];
|
|
500
|
+
canDelete?: boolean;
|
|
501
|
+
};
|
|
502
|
+
export type ErrorPageParams = {
|
|
503
|
+
statusCode: number;
|
|
504
|
+
message: string;
|
|
505
|
+
homePageLink?: boolean;
|
|
506
|
+
};
|
|
507
|
+
export declare enum AuditLogDetailsView {
|
|
508
|
+
Diff = "diff",
|
|
509
|
+
OfflineMessage = "offlineMessage",
|
|
510
|
+
Delete = "delete",
|
|
511
|
+
Create = "create",
|
|
512
|
+
NvrDeviceSettings = "nvrDeviceSettings",
|
|
513
|
+
RouterDeviceSettings = "routerDeviceSettings"
|
|
514
|
+
}
|
|
515
|
+
export type AuditLogDetailsCell = AuditLogDetails[keyof AuditLogDetails] | JsonValue;
|
|
516
|
+
export type AuditLogDetailsRow = {
|
|
517
|
+
key: string;
|
|
518
|
+
cells: AuditLogDetailsCell[];
|
|
519
|
+
isJsonFormatted?: boolean;
|
|
520
|
+
isScopeList?: boolean;
|
|
521
|
+
rowClass?: string;
|
|
522
|
+
};
|
|
523
|
+
export type AuditLogDetailsTable = {
|
|
524
|
+
headers: {
|
|
525
|
+
text: string;
|
|
526
|
+
width?: string;
|
|
527
|
+
}[];
|
|
528
|
+
rows: AuditLogDetailsRow[];
|
|
529
|
+
};
|
|
530
|
+
export type AuditLogAuthMethodView = {
|
|
531
|
+
icon: string;
|
|
532
|
+
label: string;
|
|
533
|
+
tooltip: string;
|
|
534
|
+
};
|
|
535
|
+
export type AuditLogLinkEntity = AuditLogEntity.Cameras | AuditLogEntity.Projects | AuditLogEntity.Routers | AuditLogEntity.Users | AuditLogEntity.Sims;
|
|
536
|
+
export type AuditLogRow = AuditLog & {
|
|
537
|
+
canExpand: boolean;
|
|
538
|
+
authMethod: AuditLogAuthMethodView | null;
|
|
539
|
+
};
|
|
540
|
+
export type AuditLogsReportParams = PaginationParams & Partial<AuditLogsParams>;
|
|
@@ -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,6 +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";
|
|
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
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DatePreset as EDatePickerPreset, WeekStart } from "@evercam/ui";
|
|
2
|
+
export declare enum DateRangeOption {
|
|
3
|
+
Today = 0,
|
|
4
|
+
Yesterday = -1,
|
|
5
|
+
Last7Days = -7,
|
|
6
|
+
Last30Days = -30,
|
|
7
|
+
Last90Days = -90,
|
|
8
|
+
Last365Days = -365,
|
|
9
|
+
Next7Days = 7,
|
|
10
|
+
Next30Days = 30,
|
|
11
|
+
Next60Days = 60,
|
|
12
|
+
ThisMonth = "__thisMonth__",
|
|
13
|
+
LastCalendarMonth = "__lastCalendarMonth__",
|
|
14
|
+
DataRange = "__dataRange__",
|
|
15
|
+
CalendarRange = "__calendarRange__"
|
|
16
|
+
}
|
|
17
|
+
export declare const DefaultDateRangeOptions: DateRangeOption[];
|
|
18
|
+
export type DateRangePresetOptions = {
|
|
19
|
+
min?: Date;
|
|
20
|
+
max?: Date;
|
|
21
|
+
dataRangeLabel?: string;
|
|
22
|
+
weekStartsOn?: WeekStart;
|
|
23
|
+
};
|
|
24
|
+
export declare function toDateRangePresets(options: DateRangeOption[], $t: (key: string) => string, { min, max, dataRangeLabel, weekStartsOn }?: DateRangePresetOptions): EDatePickerPreset[];
|
|
25
|
+
export declare function matchDateRangePreset({ range, presets, min, max, weekStartsOn, }: {
|
|
26
|
+
range?: string[] | null;
|
|
27
|
+
presets: EDatePickerPreset[];
|
|
28
|
+
min?: Date;
|
|
29
|
+
max?: Date;
|
|
30
|
+
weekStartsOn?: WeekStart;
|
|
31
|
+
}): EDatePickerPreset | null;
|