@evercam/api 1.0.0-eef6c21fd → 1.0.0-eefb67c4d
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/README.md +1 -0
- package/dist/api/api/3dFirebaseApi.d.ts +73 -30
- package/dist/api/api/adminApi.d.ts +31 -21
- package/dist/api/api/aiApi.d.ts +125 -2
- package/dist/api/api/authzApi.d.ts +4 -1
- package/dist/api/api/evercamApi.d.ts +45 -25
- package/dist/api/api/evercamLabsApi.d.ts +5 -16
- package/dist/api/api/index.d.ts +1 -0
- package/dist/api/api/ingestApi.d.ts +45 -32
- package/dist/api/api/workflowsApi.d.ts +15 -0
- package/dist/api/types/360.d.ts +127 -43
- package/dist/api/types/admin.d.ts +1 -1
- package/dist/api/types/aiConfigs.d.ts +244 -0
- package/dist/api/types/analytics.d.ts +49 -23
- package/dist/api/types/anpr.d.ts +31 -2
- package/dist/api/types/auditLogs.d.ts +1 -4
- package/dist/api/types/authz.d.ts +71 -0
- package/dist/api/types/automation.d.ts +32 -4
- package/dist/api/types/axios.d.ts +9 -9
- package/dist/api/types/bim.d.ts +29 -6
- package/dist/api/types/camera.d.ts +30 -23
- package/dist/api/types/comments.d.ts +9 -2
- 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 +2 -0
- package/dist/api/types/detections.d.ts +3 -1
- package/dist/api/types/drone.d.ts +7 -7
- package/dist/api/types/errors.d.ts +18 -2
- package/dist/api/types/gateReport.d.ts +1 -11
- package/dist/api/types/gateReportManagement.d.ts +170 -0
- package/dist/api/types/hammertech.d.ts +98 -0
- package/dist/api/types/index.d.ts +8 -2
- package/dist/api/types/ingest.d.ts +179 -25
- package/dist/api/types/kit.d.ts +44 -101
- package/dist/api/types/media.d.ts +7 -2
- package/dist/api/types/notification.d.ts +52 -2
- package/dist/api/types/observationEvents.d.ts +141 -0
- package/dist/api/types/observations.d.ts +84 -0
- package/dist/api/types/planner.d.ts +1 -8
- package/dist/api/types/posthog.d.ts +20 -0
- package/dist/api/types/project.d.ts +15 -3
- package/dist/api/types/recording.d.ts +5 -12
- package/dist/api/types/ring.d.ts +16 -16
- package/dist/api/types/roi.d.ts +2 -10
- package/dist/api/types/routeParams.d.ts +1 -0
- package/dist/api/types/shared.d.ts +5 -22
- 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 +127 -0
- package/dist/api/types/siteView.d.ts +12 -8
- package/dist/api/types/snapshots.d.ts +5 -0
- 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 +16 -4
- package/dist/api/types/workflows.d.ts +108 -0
- package/dist/api/utils.d.ts +1 -1
- package/dist/index.js +1855 -1039
- 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 +231 -42
- package/dist/shared/types/customDataTableFilters.d.ts +10 -0
- package/dist/shared/types/droneUpload.d.ts +67 -0
- package/dist/shared/types/index.d.ts +4 -0
- package/dist/shared/types/observations.d.ts +25 -0
- package/dist/shared/types/report.d.ts +101 -0
- package/dist/shared/utils/datePickerValue.d.ts +36 -0
- package/dist/shared/utils/datePresets.d.ts +31 -0
- package/package.json +4 -2
- package/dist/api/types/copilot.d.ts +0 -162
- 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,
|
|
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, IngestUploadInitResponse } 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,132 @@ export declare enum IframeMessageType {
|
|
|
34
49
|
Upload360 = "upload360",
|
|
35
50
|
FetchForgeToken = "FetchForgeToken",
|
|
36
51
|
ForgeTokenResponse = "ForgeTokenResponse",
|
|
37
|
-
|
|
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
|
+
}
|
|
71
|
+
export declare enum ChatTheme {
|
|
72
|
+
Dark = "dark",
|
|
73
|
+
Light = "light"
|
|
38
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
|
+
};
|
|
39
178
|
export declare enum NavigationArrow {
|
|
40
179
|
Previous = "previous",
|
|
41
180
|
Next = "next"
|
|
@@ -51,24 +190,6 @@ export declare enum PlayerMode {
|
|
|
51
190
|
Video = "video",
|
|
52
191
|
Jpegs = "jpegs"
|
|
53
192
|
}
|
|
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
193
|
export type TimelineProviderRequestParams = TimelineDateInterval & {
|
|
73
194
|
precision?: TimelinePrecision;
|
|
74
195
|
labels?: string[];
|
|
@@ -179,12 +300,14 @@ export type TagSelectorItem = Tag & {
|
|
|
179
300
|
};
|
|
180
301
|
export declare enum FormSchemaComponents {
|
|
181
302
|
SelectField = "SelectField",
|
|
303
|
+
HierarchicalSelect = "HierarchicalSelectField",
|
|
182
304
|
MultiOption = "MultiOption",
|
|
183
305
|
TextField = "TextField",
|
|
184
306
|
SwitchField = "SwitchField",
|
|
185
307
|
CheckBox = "CheckBoxField",
|
|
186
308
|
Date = "DatePickerInput",
|
|
187
309
|
DateTime = "DateTimeField",
|
|
310
|
+
Time = "TimeField",
|
|
188
311
|
TextArea = "Textarea",
|
|
189
312
|
Search = "Autocomplete",
|
|
190
313
|
ReadOnly = "ReadOnly",
|
|
@@ -199,6 +322,7 @@ export declare enum FormSchemaDataType {
|
|
|
199
322
|
export type FormSchemaOptions = {
|
|
200
323
|
title: string;
|
|
201
324
|
value: string;
|
|
325
|
+
parentId?: string | null;
|
|
202
326
|
};
|
|
203
327
|
export type FormSchemaField = {
|
|
204
328
|
id: string;
|
|
@@ -226,6 +350,7 @@ export type DrawingStats = {
|
|
|
226
350
|
};
|
|
227
351
|
export interface ScrollListener {
|
|
228
352
|
element: Element | Window;
|
|
353
|
+
event: "scroll" | "resize";
|
|
229
354
|
handler: () => void;
|
|
230
355
|
}
|
|
231
356
|
export interface LeaderLineInstance {
|
|
@@ -239,24 +364,25 @@ export type SnapshotCardItem = {
|
|
|
239
364
|
placeholderThumbnailUrl?: string;
|
|
240
365
|
fallbackThumbnailUrl?: string;
|
|
241
366
|
};
|
|
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
367
|
export type HighchartsSeriesWithData<T extends number = number> = SeriesOptionsType & {
|
|
251
368
|
data: T[];
|
|
252
369
|
};
|
|
370
|
+
export type NotificationTitleSegment = {
|
|
371
|
+
text: string;
|
|
372
|
+
isBold?: boolean;
|
|
373
|
+
};
|
|
253
374
|
export type FormattedNotificationData = {
|
|
254
375
|
title: string;
|
|
376
|
+
titleSegments?: NotificationTitleSegment[];
|
|
255
377
|
link: string;
|
|
256
378
|
thumbnail?: string;
|
|
257
|
-
icon
|
|
258
|
-
|
|
259
|
-
|
|
379
|
+
icon: string;
|
|
380
|
+
excerpt?: string;
|
|
381
|
+
commentTarget?: {
|
|
382
|
+
commentId: number;
|
|
383
|
+
dateId: string | number;
|
|
384
|
+
floorId: string;
|
|
385
|
+
};
|
|
260
386
|
};
|
|
261
387
|
export type FormattedNotification = FormattedNotificationData & {
|
|
262
388
|
date: string;
|
|
@@ -285,6 +411,20 @@ export type AutodeskUploadFormData = {
|
|
|
285
411
|
project: AutodeskProject | null;
|
|
286
412
|
folder: AutodeskFolder | null;
|
|
287
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
|
+
};
|
|
288
428
|
export interface MediaHubFilters {
|
|
289
429
|
title: string;
|
|
290
430
|
requesterEmail: string | undefined;
|
|
@@ -298,15 +438,64 @@ export interface MediaHubSortParameter {
|
|
|
298
438
|
label: string;
|
|
299
439
|
value: string;
|
|
300
440
|
}
|
|
301
|
-
export type
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
441
|
+
export type BimUploadObject = IngestUploadInitResponse & {
|
|
442
|
+
projectName: string;
|
|
443
|
+
};
|
|
444
|
+
export type BimUploadFileResult = {
|
|
445
|
+
url: string;
|
|
446
|
+
title: string;
|
|
447
|
+
fileExtension: string;
|
|
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";
|
|
463
|
+
export interface ThreeSixtyWalk {
|
|
464
|
+
id: string;
|
|
465
|
+
name: string;
|
|
466
|
+
date: string;
|
|
467
|
+
monthKey: string;
|
|
468
|
+
color: string;
|
|
469
|
+
dateId: string;
|
|
470
|
+
floorId: string;
|
|
471
|
+
commentCount: number;
|
|
472
|
+
hasBim: boolean;
|
|
473
|
+
hasMinimodel: boolean;
|
|
474
|
+
}
|
|
475
|
+
export interface ThreeSixtyWalkGroup {
|
|
476
|
+
date: string;
|
|
477
|
+
walks: ThreeSixtyWalk[];
|
|
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;
|
|
312
501
|
};
|
|
@@ -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,67 @@
|
|
|
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
|
+
ConnectionLost = "connection_lost",
|
|
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 type AerialUploadFile = {
|
|
17
|
+
file: File;
|
|
18
|
+
allocation: AerialAllocation;
|
|
19
|
+
};
|
|
20
|
+
export declare enum DroneUploadStatus {
|
|
21
|
+
Queued = "queued",
|
|
22
|
+
Uploading = "uploading",
|
|
23
|
+
Failed = "failed",
|
|
24
|
+
Completed = "completed"
|
|
25
|
+
}
|
|
26
|
+
export type DroneUploadProgress = {
|
|
27
|
+
status: DroneUploadStatus;
|
|
28
|
+
uploadedFiles: number;
|
|
29
|
+
totalFiles: number;
|
|
30
|
+
uploadedBytes: number;
|
|
31
|
+
totalBytes: number;
|
|
32
|
+
percentage: number;
|
|
33
|
+
startedAt: number;
|
|
34
|
+
initialBytes: number;
|
|
35
|
+
error?: Error;
|
|
36
|
+
};
|
|
37
|
+
export type DroneUploadOptions = {
|
|
38
|
+
label?: string;
|
|
39
|
+
projectId: string;
|
|
40
|
+
processingId?: number;
|
|
41
|
+
flightMetadata: DroneFlightMetadata;
|
|
42
|
+
files: File[];
|
|
43
|
+
aerialShots: AerialUploadFile[];
|
|
44
|
+
onProgress?: (progress: DroneUploadProgress) => void;
|
|
45
|
+
};
|
|
46
|
+
export type AerialUploadOptions = Pick<DroneUploadOptions, "label" | "aerialShots" | "onProgress"> & {
|
|
47
|
+
processingId: number;
|
|
48
|
+
};
|
|
49
|
+
export type DroneUploadJob = {
|
|
50
|
+
readonly projectId?: string;
|
|
51
|
+
readonly initialProcessingId?: number;
|
|
52
|
+
readonly label: string;
|
|
53
|
+
readonly aerialFilenames: string[];
|
|
54
|
+
processingId?: number;
|
|
55
|
+
ingestUrl?: string;
|
|
56
|
+
progress: DroneUploadProgress;
|
|
57
|
+
run: () => Promise<void>;
|
|
58
|
+
cancel: () => Promise<void>;
|
|
59
|
+
};
|
|
60
|
+
export type UploadCollection = {
|
|
61
|
+
files: File[];
|
|
62
|
+
initialStates?: DroneFileState[];
|
|
63
|
+
allocate: (files: File[]) => Promise<DroneFileState[]>;
|
|
64
|
+
acknowledge: (filenames: string[]) => Promise<{
|
|
65
|
+
errors: DroneFileError[];
|
|
66
|
+
}>;
|
|
67
|
+
};
|
|
@@ -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,101 @@
|
|
|
1
|
+
import type Vue from "vue";
|
|
2
|
+
import type { CancelToken } from "axios";
|
|
3
|
+
import type { 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
|
+
}
|
|
29
|
+
export type ReportFilterCell = {
|
|
30
|
+
header: ReportTableHeaderParams;
|
|
31
|
+
field?: ReportFilterField;
|
|
32
|
+
};
|
|
33
|
+
export type OfflineCamerasReportContext = Vue & {
|
|
34
|
+
report: string;
|
|
35
|
+
};
|
|
36
|
+
export type ReportFilterItem = {
|
|
37
|
+
name?: string;
|
|
38
|
+
value: string | number | boolean | null;
|
|
39
|
+
};
|
|
40
|
+
export type ReportSearchParamValue = string | number | boolean | null | undefined | (string | number | boolean | null)[];
|
|
41
|
+
export type ReportSearchParams = Record<string, ReportSearchParamValue>;
|
|
42
|
+
export type ReportItem = Record<string, unknown>;
|
|
43
|
+
export type ReportProviderResponse<TItem = ReportItem> = {
|
|
44
|
+
total?: number;
|
|
45
|
+
[dataField: string]: TItem[] | number | undefined;
|
|
46
|
+
};
|
|
47
|
+
export type ReportTableProvider<TItem = ReportItem> = (request: {
|
|
48
|
+
cancelToken: CancelToken;
|
|
49
|
+
params: ReportSearchParams;
|
|
50
|
+
}) => Promise<ReportProviderResponse<TItem>>;
|
|
51
|
+
export type ReportTableOptions = {
|
|
52
|
+
page?: number;
|
|
53
|
+
itemsPerPage?: number | string;
|
|
54
|
+
sortBy?: string[];
|
|
55
|
+
sortDesc?: boolean[];
|
|
56
|
+
};
|
|
57
|
+
export type ReportFilterFieldNamesMap = {
|
|
58
|
+
fromField: string;
|
|
59
|
+
toField: string;
|
|
60
|
+
};
|
|
61
|
+
export type ReportFilterOperatorItem = {
|
|
62
|
+
value: Operator;
|
|
63
|
+
label: string;
|
|
64
|
+
};
|
|
65
|
+
export type ReportFilterAttributes = {
|
|
66
|
+
items?: ReportFilterItem[];
|
|
67
|
+
multiple?: boolean;
|
|
68
|
+
isAutocomplete?: boolean;
|
|
69
|
+
value?: string | number | string[];
|
|
70
|
+
label?: string;
|
|
71
|
+
textFieldAttrs?: {
|
|
72
|
+
placeholder?: string;
|
|
73
|
+
};
|
|
74
|
+
isRange?: boolean;
|
|
75
|
+
convertToIso?: boolean;
|
|
76
|
+
minDate?: string;
|
|
77
|
+
maxDate?: string;
|
|
78
|
+
options?: DateRangeOption[];
|
|
79
|
+
withOperator?: boolean;
|
|
80
|
+
operatorFieldName?: string;
|
|
81
|
+
operatorLabel?: string;
|
|
82
|
+
operatorItems?: ReportFilterOperatorItem[];
|
|
83
|
+
showToolTip?: boolean;
|
|
84
|
+
toolTipText?: string;
|
|
85
|
+
"menu-props"?: {
|
|
86
|
+
offsetY?: boolean;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export type ReportFilterField<TItem = ReportItem> = {
|
|
90
|
+
component: ReportFilterComponent;
|
|
91
|
+
name?: string;
|
|
92
|
+
width?: number;
|
|
93
|
+
attributes?: ReportFilterAttributes;
|
|
94
|
+
listeners?: {
|
|
95
|
+
keypress?: (event: KeyboardEvent) => boolean | void;
|
|
96
|
+
};
|
|
97
|
+
fieldNamesMap?: ReportFilterFieldNamesMap;
|
|
98
|
+
isGlobalFilter?: boolean;
|
|
99
|
+
offline?: boolean;
|
|
100
|
+
customFilter?: (item: TItem, fieldName: string, search: ReportSearchParamValue) => boolean;
|
|
101
|
+
};
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evercam/api",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-eefb67c4d",
|
|
4
4
|
"description": "Evercam API client",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"readme": "README.md",
|
|
30
30
|
"scripts": {
|
|
31
|
+
"preinstall": "node ../shared/ci-scripts/check-bootstrap.js",
|
|
32
|
+
"bootstrap": "node ../shared/ci-scripts/bootstrap.js",
|
|
31
33
|
"clean": "rimraf dist",
|
|
32
34
|
"typecheck": "tsc --noEmit",
|
|
33
35
|
"build:types": "tsc --declaration --emitDeclarationOnly",
|
|
@@ -36,7 +38,7 @@
|
|
|
36
38
|
"publish-api": "cd ../.. && yarn publish-api"
|
|
37
39
|
},
|
|
38
40
|
"devDependencies": {
|
|
39
|
-
"@types/node": "^25.
|
|
41
|
+
"@types/node": "^25.9.1",
|
|
40
42
|
"vite": "latest",
|
|
41
43
|
"vite-plugin-commonjs": "^0.10.3",
|
|
42
44
|
"vite-plugin-dts": "^4.5.4"
|