@evercam/api 1.0.0-c526e2564 → 1.0.0-c540355aa
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 +7 -1
- package/dist/api/api/adminApi.d.ts +15 -3
- package/dist/api/api/evercamApi.d.ts +7 -12
- package/dist/api/api/index.d.ts +1 -1
- package/dist/api/api/ingestApi.d.ts +31 -26
- package/dist/api/api/{workflowsApi.d.ts → reportsApi.d.ts} +2 -2
- package/dist/api/types/360.d.ts +1 -0
- package/dist/api/types/admin.d.ts +1 -1
- package/dist/api/types/analytics.d.ts +9 -0
- package/dist/api/types/apiKey.d.ts +70 -0
- package/dist/api/types/auditLogs.d.ts +145 -19
- package/dist/api/types/axios.d.ts +1 -1
- package/dist/api/types/bim.d.ts +1 -1
- package/dist/api/types/camera.d.ts +1 -1
- package/dist/api/types/compare.d.ts +1 -1
- package/dist/api/types/errors.d.ts +6 -2
- package/dist/api/types/index.d.ts +2 -1
- package/dist/api/types/ingest.d.ts +92 -25
- package/dist/api/types/kit.d.ts +1 -50
- package/dist/api/types/observations.d.ts +3 -7
- package/dist/api/types/project.d.ts +1 -1
- package/dist/api/types/{workflows.d.ts → reports.d.ts} +4 -4
- package/dist/api/types/shared.d.ts +13 -1
- package/dist/api/types/siteView.d.ts +6 -6
- package/dist/index.js +800 -673
- 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 +40 -12
- package/dist/shared/types/droneUpload.d.ts +93 -0
- package/dist/shared/types/index.d.ts +2 -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
|
@@ -1,5 +1,5 @@
|
|
|
1
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
|
+
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";
|
|
@@ -438,17 +438,6 @@ export interface MediaHubSortParameter {
|
|
|
438
438
|
label: string;
|
|
439
439
|
value: string;
|
|
440
440
|
}
|
|
441
|
-
export type TableHeaderParams<TItem = unknown> = {
|
|
442
|
-
value: string;
|
|
443
|
-
text: string;
|
|
444
|
-
align?: string;
|
|
445
|
-
sortable?: boolean;
|
|
446
|
-
visible?: boolean;
|
|
447
|
-
width?: number | string;
|
|
448
|
-
copyable?: boolean;
|
|
449
|
-
toStringFn?: (item: TItem, key: string) => any;
|
|
450
|
-
sort?: (a: unknown, b: unknown) => number;
|
|
451
|
-
};
|
|
452
441
|
export type BimUploadObject = IngestUploadInitResponse & {
|
|
453
442
|
projectName: string;
|
|
454
443
|
};
|
|
@@ -510,3 +499,42 @@ export type CommentCardComment = {
|
|
|
510
499
|
position3d?: number[];
|
|
511
500
|
canDelete?: boolean;
|
|
512
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,7 +1,9 @@
|
|
|
1
1
|
export * from "@evercam/api/types";
|
|
2
2
|
export * from "./components";
|
|
3
|
+
export * from "./report";
|
|
3
4
|
export * from "./customDataTableFilters";
|
|
4
5
|
export * from "./imagePlayer";
|
|
5
6
|
export * from "./timeline";
|
|
6
7
|
export * from "./rbac";
|
|
7
8
|
export * from "./observations";
|
|
9
|
+
export * from "./droneUpload";
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type Vue from "vue";
|
|
2
|
+
import type { CancelToken } from "axios";
|
|
3
|
+
import type { GlobalSearchResource, Operator } from "@evercam/api/types";
|
|
4
|
+
import type { DateRangeOption } from "@evercam/shared/utils/datePresets";
|
|
5
|
+
export type ReportTableHeaderParams<TItem = unknown> = {
|
|
6
|
+
value: string;
|
|
7
|
+
text: string;
|
|
8
|
+
align?: string;
|
|
9
|
+
sortable?: boolean;
|
|
10
|
+
visible?: boolean;
|
|
11
|
+
width?: number | string;
|
|
12
|
+
copyable?: boolean;
|
|
13
|
+
toStringFn?: (item: TItem, key: string) => string;
|
|
14
|
+
sort?(a: unknown, b: unknown): number;
|
|
15
|
+
togglable?: boolean;
|
|
16
|
+
filterable?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare enum ReportSortDirection {
|
|
19
|
+
Asc = "asc",
|
|
20
|
+
Desc = "desc"
|
|
21
|
+
}
|
|
22
|
+
export declare enum ReportFilterComponent {
|
|
23
|
+
Text = "TextFieldSearchFilter",
|
|
24
|
+
Select = "SelectSearchFilter",
|
|
25
|
+
DatePicker = "DatePickerSearchFilter",
|
|
26
|
+
CountField = "CountFieldSearchFilter",
|
|
27
|
+
Tag = "TagSearchFilter",
|
|
28
|
+
Autocomplete = "AutocompleteSearchFilter",
|
|
29
|
+
DateTimeRange = "DateTimeRangeSearchFilter"
|
|
30
|
+
}
|
|
31
|
+
export type ReportFilterCell = {
|
|
32
|
+
header: ReportTableHeaderParams;
|
|
33
|
+
field?: ReportFilterField;
|
|
34
|
+
};
|
|
35
|
+
export type OfflineCamerasReportContext = Vue & {
|
|
36
|
+
report: string;
|
|
37
|
+
};
|
|
38
|
+
export type ReportFilterItem = {
|
|
39
|
+
name?: string;
|
|
40
|
+
value: string | number | boolean | null;
|
|
41
|
+
};
|
|
42
|
+
export type ReportSearchParamValue = string | number | boolean | null | undefined | (string | number | boolean | null)[];
|
|
43
|
+
export type ReportSearchParams = Record<string, ReportSearchParamValue>;
|
|
44
|
+
export type ReportItem = Record<string, unknown>;
|
|
45
|
+
export type ReportProviderResponse<TItem = ReportItem> = {
|
|
46
|
+
total?: number;
|
|
47
|
+
[dataField: string]: TItem[] | number | undefined;
|
|
48
|
+
};
|
|
49
|
+
export type ReportTableProvider<TItem = ReportItem> = (request: {
|
|
50
|
+
cancelToken: CancelToken;
|
|
51
|
+
params: ReportSearchParams;
|
|
52
|
+
}) => Promise<ReportProviderResponse<TItem>>;
|
|
53
|
+
export type ReportTableOptions = {
|
|
54
|
+
page?: number;
|
|
55
|
+
itemsPerPage?: number | string;
|
|
56
|
+
sortBy?: string[];
|
|
57
|
+
sortDesc?: boolean[];
|
|
58
|
+
};
|
|
59
|
+
export type ReportFilterFieldNamesMap = {
|
|
60
|
+
fromField: string;
|
|
61
|
+
toField: string;
|
|
62
|
+
};
|
|
63
|
+
export type ReportFilterOperatorItem = {
|
|
64
|
+
value: Operator;
|
|
65
|
+
label: string;
|
|
66
|
+
};
|
|
67
|
+
export type ReportFilterAttributes = {
|
|
68
|
+
items?: ReportFilterItem[];
|
|
69
|
+
multiple?: boolean;
|
|
70
|
+
isAutocomplete?: boolean;
|
|
71
|
+
value?: string | number | string[];
|
|
72
|
+
label?: string;
|
|
73
|
+
textFieldAttrs?: {
|
|
74
|
+
placeholder?: string;
|
|
75
|
+
};
|
|
76
|
+
isRange?: boolean;
|
|
77
|
+
convertToIso?: boolean;
|
|
78
|
+
minDate?: string;
|
|
79
|
+
maxDate?: string;
|
|
80
|
+
options?: DateRangeOption[];
|
|
81
|
+
withOperator?: boolean;
|
|
82
|
+
operatorFieldName?: string;
|
|
83
|
+
operatorLabel?: string;
|
|
84
|
+
operatorItems?: ReportFilterOperatorItem[];
|
|
85
|
+
showToolTip?: boolean;
|
|
86
|
+
toolTipText?: string;
|
|
87
|
+
"menu-props"?: {
|
|
88
|
+
offsetY?: boolean;
|
|
89
|
+
};
|
|
90
|
+
itemText?: string;
|
|
91
|
+
resource?: GlobalSearchResource;
|
|
92
|
+
fromField?: string;
|
|
93
|
+
toField?: string;
|
|
94
|
+
};
|
|
95
|
+
export type ReportFilterField<TItem = ReportItem> = {
|
|
96
|
+
component: ReportFilterComponent;
|
|
97
|
+
name?: string;
|
|
98
|
+
width?: number;
|
|
99
|
+
attributes?: ReportFilterAttributes;
|
|
100
|
+
listeners?: {
|
|
101
|
+
keypress?: (event: KeyboardEvent) => boolean | void;
|
|
102
|
+
};
|
|
103
|
+
fieldNamesMap?: ReportFilterFieldNamesMap;
|
|
104
|
+
isGlobalFilter?: boolean;
|
|
105
|
+
offline?: boolean;
|
|
106
|
+
customFilter?: (item: TItem, fieldName: string, search: ReportSearchParamValue) => boolean;
|
|
107
|
+
};
|
|
@@ -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;
|