@evercam/api 1.0.0-e82be48cd → 1.0.0-e8fa39610
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 +3 -0
- package/dist/api/api/3dFirebaseApi.d.ts +176 -0
- package/dist/api/api/adminApi.d.ts +377 -0
- package/dist/api/api/aiApi.d.ts +128 -0
- package/dist/api/api/authzApi.d.ts +37 -0
- package/dist/api/{client → api/client}/axios.d.ts +2 -1
- package/dist/api/{client → api/client}/customErrors.d.ts +10 -0
- package/dist/api/{client → api/client}/interceptors.d.ts +1 -1
- package/dist/api/api/client/swr/Swr.d.ts +14 -0
- package/dist/api/api/client/swr/SwrStore.d.ts +10 -0
- package/dist/api/api/evercamApi.d.ts +340 -0
- package/dist/api/api/evercamLabsApi.d.ts +45 -0
- package/dist/api/{exNvrApi.d.ts → api/exNvrApi.d.ts} +1 -1
- package/dist/api/api/index.d.ts +13 -0
- package/dist/api/api/ingestApi.d.ts +148 -0
- package/dist/api/{ptzApi.d.ts → api/ptzApi.d.ts} +12 -3
- package/dist/api/api/videoWallApi.d.ts +9 -0
- package/dist/api/api/weatherApi.d.ts +9 -0
- package/dist/api/index.d.ts +3 -13
- package/dist/api/types/360.d.ts +281 -0
- package/dist/api/types/aconex.d.ts +143 -0
- package/dist/api/types/admin.d.ts +51 -0
- package/dist/{types → api/types}/analytics.d.ts +210 -80
- package/dist/{types → api/types}/anpr.d.ts +25 -13
- package/dist/{types → api/types}/auditLogs.d.ts +19 -1
- package/dist/api/types/authz.d.ts +61 -0
- package/dist/{types → api/types}/autodesk.d.ts +7 -7
- package/dist/api/types/automation.d.ts +95 -0
- package/dist/{types → api/types}/axios.d.ts +23 -2
- package/dist/{types → api/types}/bim.d.ts +28 -5
- package/dist/{types → api/types}/camera.d.ts +114 -144
- package/dist/api/types/comments.d.ts +57 -0
- package/dist/api/types/company.d.ts +115 -0
- package/dist/{types → api/types}/compare.d.ts +20 -5
- package/dist/{types → api/types}/connector.d.ts +9 -6
- package/dist/api/types/coolify.d.ts +36 -0
- package/dist/{types → api/types}/copilot.d.ts +11 -6
- package/dist/{types → api/types}/countries.d.ts +0 -7
- package/dist/{types → api/types}/credentials.d.ts +1 -0
- package/dist/api/types/detections.d.ts +115 -0
- package/dist/api/types/drone.d.ts +107 -0
- package/dist/{types → api/types}/errors.d.ts +13 -0
- package/dist/{types → api/types}/gateReport.d.ts +49 -158
- package/dist/{types → api/types}/hdd.d.ts +26 -1
- package/dist/{types → api/types}/index.d.ts +14 -2
- package/dist/api/types/ingest.d.ts +147 -0
- package/dist/{types → api/types}/kit.d.ts +91 -7
- package/dist/api/types/map.d.ts +16 -0
- package/dist/{types → api/types}/media.d.ts +2 -1
- package/dist/api/types/notification.d.ts +57 -0
- package/dist/api/types/oauth.d.ts +62 -0
- package/dist/api/types/planner.d.ts +132 -0
- package/dist/api/types/posthog.d.ts +33 -0
- package/dist/api/types/procore.d.ts +229 -0
- package/dist/{types → api/types}/progressPhoto.d.ts +11 -23
- package/dist/api/types/project.d.ts +247 -0
- package/dist/{types → api/types}/recording.d.ts +6 -5
- package/dist/api/types/recycleBin.d.ts +14 -0
- package/dist/api/types/ring.d.ts +53 -0
- package/dist/{types → api/types}/roi.d.ts +1 -0
- package/dist/{types → api/types}/routeParams.d.ts +4 -2
- package/dist/{types → api/types}/router.d.ts +20 -1
- package/dist/{types → api/types}/shared.d.ts +31 -10
- package/dist/api/types/shares.d.ts +58 -0
- package/dist/{types → api/types}/sim.d.ts +6 -6
- package/dist/api/types/siteAnalytics.d.ts +287 -0
- package/dist/api/types/siteView.d.ts +74 -0
- package/dist/api/types/smartSeach.d.ts +5 -0
- package/dist/api/types/snapshots.d.ts +99 -0
- package/dist/api/types/sso.d.ts +55 -0
- package/dist/api/types/storageProvider.d.ts +19 -0
- package/dist/api/types/storyblok.d.ts +40 -0
- package/dist/{types → api/types}/streaming.d.ts +4 -25
- package/dist/api/types/systemCheck.d.ts +11 -0
- package/dist/api/types/tag.d.ts +12 -0
- package/dist/api/types/time.d.ts +7 -0
- package/dist/{types → api/types}/timelapse.d.ts +8 -5
- package/dist/{types → api/types}/user.d.ts +105 -36
- package/dist/api/types/videoWall.d.ts +66 -0
- package/dist/api/types/weather.d.ts +153 -0
- package/dist/{types → api/types}/widget.d.ts +96 -16
- package/dist/api/types/xweather.d.ts +12 -0
- package/dist/{utils.d.ts → api/utils.d.ts} +1 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2210 -1032
- 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/api/index.d.ts +3 -0
- package/dist/shared/components/timelinePlayer/providers/index.d.ts +3 -0
- package/dist/shared/components/timelinePlayer/providers/timelineAnprProvider.d.ts +17 -0
- package/dist/shared/components/timelinePlayer/providers/timelineDataProvider.d.ts +13 -0
- package/dist/shared/components/timelinePlayer/providers/timelineLuminanceProvider.d.ts +16 -0
- package/dist/shared/types/components.d.ts +322 -0
- package/dist/shared/types/imagePlayer.d.ts +41 -0
- package/dist/shared/types/index.d.ts +5 -0
- package/dist/shared/types/rbac.d.ts +67 -0
- package/dist/shared/types/timeline.d.ts +10 -0
- package/package.json +5 -4
- package/dist/api/3dFirebaseApi.d.ts +0 -9
- package/dist/api/adminApi.d.ts +0 -304
- package/dist/api/aiApi.d.ts +0 -110
- package/dist/api/authzApi.d.ts +0 -21
- package/dist/api/evercamApi.d.ts +0 -266
- package/dist/api/evercamLabsApi.d.ts +0 -46
- package/dist/api/ingestApi.d.ts +0 -65
- package/dist/api/videoWallApi.d.ts +0 -9
- package/dist/api/weatherApi.d.ts +0 -27
- package/dist/types/360.d.ts +0 -83
- package/dist/types/aconex.d.ts +0 -45
- package/dist/types/automation.d.ts +0 -6
- package/dist/types/comments.d.ts +0 -36
- package/dist/types/company.d.ts +0 -46
- package/dist/types/coolify.d.ts +0 -18
- package/dist/types/detections.d.ts +0 -76
- package/dist/types/devices.d.ts +0 -228
- package/dist/types/drone.d.ts +0 -17
- package/dist/types/ingest.d.ts +0 -43
- package/dist/types/map.d.ts +0 -4
- package/dist/types/notification.d.ts +0 -27
- package/dist/types/planner.d.ts +0 -28
- package/dist/types/procore.d.ts +0 -76
- package/dist/types/project.d.ts +0 -119
- package/dist/types/shares.d.ts +0 -192
- package/dist/types/siteAnalytics.d.ts +0 -84
- package/dist/types/snapshots.d.ts +0 -50
- package/dist/types/storageServers.d.ts +0 -4
- package/dist/types/time.d.ts +0 -19
- package/dist/types/videoWall.d.ts +0 -33
- package/dist/types/weather.d.ts +0 -83
- /package/dist/api/{client → api/client}/index.d.ts +0 -0
- /package/dist/api/{webRtcApi.d.ts → api/webRtcApi.d.ts} +0 -0
- /package/dist/{types → api/types}/nvr.d.ts +0 -0
- /package/dist/{types → api/types}/vendorModel.d.ts +0 -0
- /package/dist/{types → api/types}/voyageControl.d.ts +0 -0
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
import { BoundingBox, CameraExid, DateType, GateReportVehicleType, TimelinePrecision } from "
|
|
1
|
+
import { BoundingBox, CameraExid, DateType, GateReportVehicleType, TimelinePrecision } from "@evercam/api/types";
|
|
2
2
|
export type AnprQueryParams = {
|
|
3
3
|
page?: number;
|
|
4
4
|
limit?: number;
|
|
5
|
-
firstSeen?: {
|
|
6
|
-
gte: DateType;
|
|
7
|
-
};
|
|
8
|
-
lastSeen?: {
|
|
9
|
-
lte: DateType;
|
|
10
|
-
};
|
|
11
|
-
captureTime?: {
|
|
12
|
-
gte?: DateType;
|
|
13
|
-
lt?: DateType;
|
|
14
|
-
};
|
|
15
5
|
direction?: {
|
|
16
6
|
eq?: string;
|
|
17
7
|
} | string;
|
|
@@ -21,7 +11,11 @@ export type AnprQueryParams = {
|
|
|
21
11
|
sort?: string;
|
|
22
12
|
fromDate?: DateType;
|
|
23
13
|
toDate?: DateType;
|
|
24
|
-
|
|
14
|
+
camerasExid?: CameraExid[];
|
|
15
|
+
vehicleTypes?: GateReportVehicleType[];
|
|
16
|
+
isDuplicate?: boolean;
|
|
17
|
+
isPostprocessed?: boolean;
|
|
18
|
+
isPlate?: boolean;
|
|
25
19
|
};
|
|
26
20
|
export type AnprCountsQueryParams = {
|
|
27
21
|
precision: TimelinePrecision;
|
|
@@ -44,6 +38,7 @@ export type AnprEvent = {
|
|
|
44
38
|
id: number;
|
|
45
39
|
plateNumber: string;
|
|
46
40
|
cameraExid: CameraExid;
|
|
41
|
+
cameraex: CameraExid;
|
|
47
42
|
picName: string;
|
|
48
43
|
eventTime: string;
|
|
49
44
|
insertedAt: string;
|
|
@@ -61,11 +56,19 @@ export type AnprEvent = {
|
|
|
61
56
|
anprVehicleColor?: string;
|
|
62
57
|
anprVehicleSpeed?: number;
|
|
63
58
|
anprSnapshotLink: string;
|
|
59
|
+
contextSnapshotLink: string;
|
|
64
60
|
mainSnapshotLink: string;
|
|
65
61
|
contextCamera: string;
|
|
66
62
|
votedVehicleType: GateReportVehicleType | string;
|
|
67
63
|
roiId?: number;
|
|
68
|
-
|
|
64
|
+
captureTime: DateType;
|
|
65
|
+
contextThumbnailUrl: string;
|
|
66
|
+
isPublic: boolean;
|
|
67
|
+
label: string;
|
|
68
|
+
mp4Url: string;
|
|
69
|
+
plateThumbnailUrl: string;
|
|
70
|
+
thumbnailUrl: string;
|
|
71
|
+
metadata: {
|
|
69
72
|
evercamMetadata?: {
|
|
70
73
|
anpr?: {
|
|
71
74
|
bbox: BoundingBox;
|
|
@@ -98,3 +101,12 @@ export declare enum AnprEventStatus {
|
|
|
98
101
|
IsDuplicate = "is_duplicate",
|
|
99
102
|
NotDuplicate = "not_duplicate"
|
|
100
103
|
}
|
|
104
|
+
export type AnprBulkUpdateRequestPayload = {
|
|
105
|
+
anprEventsIds: number[];
|
|
106
|
+
action: AnprEventStatus;
|
|
107
|
+
};
|
|
108
|
+
export type AnprUpdateRequestPayload = {
|
|
109
|
+
plateNumber: string;
|
|
110
|
+
vehicleType: GateReportVehicleType;
|
|
111
|
+
direction: AnprDirection;
|
|
112
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CameraStatus, DateType, PaginationParams } from "
|
|
1
|
+
import { CameraStatus, DateType, PaginationParams } from "@evercam/api/types";
|
|
2
2
|
export declare enum AuditLogActionType {
|
|
3
3
|
VH_STATUS = "vh_status",
|
|
4
4
|
CR_UPDATED = "cr_updated",
|
|
@@ -33,6 +33,24 @@ export declare enum AuditLogActionType {
|
|
|
33
33
|
BIM_NOTE = "bim_note",
|
|
34
34
|
GATE_REPORT_NOTE = "gate_report_note"
|
|
35
35
|
}
|
|
36
|
+
export declare enum AuditLogEntity {
|
|
37
|
+
Cameras = "cameras",
|
|
38
|
+
Projects = "projects",
|
|
39
|
+
Layers = "layers",
|
|
40
|
+
Routers = "routers",
|
|
41
|
+
Sims = "sims",
|
|
42
|
+
Hdds = "hdds",
|
|
43
|
+
Nvr = "nvr",
|
|
44
|
+
Archives = "archives",
|
|
45
|
+
Users = "users",
|
|
46
|
+
Rois = "rois",
|
|
47
|
+
Kits = "kits",
|
|
48
|
+
Roles = "roles",
|
|
49
|
+
Tags = "tags",
|
|
50
|
+
KitsTags = "kits_tags",
|
|
51
|
+
Oauth = "oauth",
|
|
52
|
+
StorageProviders = "storage_providers"
|
|
53
|
+
}
|
|
36
54
|
export type AuditLog = {
|
|
37
55
|
id: number;
|
|
38
56
|
action: AuditLogActionType;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export declare enum RoleResourceType {
|
|
2
|
+
App = "app",
|
|
3
|
+
Camera = "camera",
|
|
4
|
+
Project = "project"
|
|
5
|
+
}
|
|
6
|
+
export type RoleSubRole = {
|
|
7
|
+
resourceId: string;
|
|
8
|
+
roleId: number;
|
|
9
|
+
roleName?: string;
|
|
10
|
+
permissions?: string[];
|
|
11
|
+
};
|
|
12
|
+
export type Role = {
|
|
13
|
+
id: number;
|
|
14
|
+
name: string;
|
|
15
|
+
description?: string | null;
|
|
16
|
+
resource?: string;
|
|
17
|
+
resourceType: RoleResourceType;
|
|
18
|
+
resourceId?: string | null;
|
|
19
|
+
permissions: string[];
|
|
20
|
+
subRoles?: RoleSubRole[];
|
|
21
|
+
isDefault?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export type ProjectResourceRole = Role & {
|
|
24
|
+
resourceType: RoleResourceType.Project;
|
|
25
|
+
};
|
|
26
|
+
export type CameraResourceRole = Omit<Role, "subRoles"> & {
|
|
27
|
+
resourceType: RoleResourceType.Camera;
|
|
28
|
+
};
|
|
29
|
+
export type ProjectRoleRequestPayload = {
|
|
30
|
+
name: string;
|
|
31
|
+
permissions: string[];
|
|
32
|
+
subRoles?: RoleSubRole[];
|
|
33
|
+
};
|
|
34
|
+
export type AuthzRoleUser = {
|
|
35
|
+
email: string;
|
|
36
|
+
resourceId: string;
|
|
37
|
+
};
|
|
38
|
+
export type AuthzUserRolesResponse = {
|
|
39
|
+
roles: Role[];
|
|
40
|
+
};
|
|
41
|
+
export type AuthzScopePermission = {
|
|
42
|
+
id: number;
|
|
43
|
+
action: string;
|
|
44
|
+
exid: string;
|
|
45
|
+
};
|
|
46
|
+
export type AuthzScope = {
|
|
47
|
+
id: number;
|
|
48
|
+
name: string;
|
|
49
|
+
description: string | null;
|
|
50
|
+
permissions: AuthzScopePermission[];
|
|
51
|
+
app: string;
|
|
52
|
+
exid: string;
|
|
53
|
+
};
|
|
54
|
+
export type AuthzScopeCreatePayload = {
|
|
55
|
+
name: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
permissions: string[];
|
|
58
|
+
};
|
|
59
|
+
export type AuthzScopeUpdatePayload = Partial<AuthzScopeCreatePayload>;
|
|
60
|
+
export declare function isProjectRole(role: Role): role is ProjectResourceRole;
|
|
61
|
+
export declare function isCameraRole(role: Role): role is CameraResourceRole;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type AutodeskUserHub = {
|
|
2
2
|
text: string;
|
|
3
3
|
value: string;
|
|
4
|
-
}
|
|
5
|
-
export type
|
|
4
|
+
};
|
|
5
|
+
export type AutodeskProject = {
|
|
6
6
|
text: string;
|
|
7
7
|
value: string;
|
|
8
|
-
}
|
|
9
|
-
export type
|
|
8
|
+
};
|
|
9
|
+
export type AutodeskFolder = {
|
|
10
10
|
text: string;
|
|
11
11
|
value: string;
|
|
12
12
|
allowedFileType: string;
|
|
13
13
|
allowedFolderType: string;
|
|
14
|
-
children: Array<
|
|
14
|
+
children: Array<AutodeskFolder>;
|
|
15
15
|
parentName?: string;
|
|
16
16
|
};
|
|
17
|
-
export type
|
|
17
|
+
export type AutodeskSnapshot = {
|
|
18
18
|
projectId: string;
|
|
19
19
|
folderId: string;
|
|
20
20
|
accFileType: string;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { AconexIdentifiers, CameraExid } from "@evercam/api/types";
|
|
2
|
+
export declare enum AutomationProvider {
|
|
3
|
+
Aconex = "aconex",
|
|
4
|
+
Procore = "procore",
|
|
5
|
+
Autodesk = "autodesk",
|
|
6
|
+
Email = "email"
|
|
7
|
+
}
|
|
8
|
+
export declare enum AutomationType {
|
|
9
|
+
Photo = "photo",
|
|
10
|
+
Compare = "compare",
|
|
11
|
+
GateReport = "gate_report"
|
|
12
|
+
}
|
|
13
|
+
export type AutomationCompareConfig = {
|
|
14
|
+
compareDelay: number;
|
|
15
|
+
};
|
|
16
|
+
export type AutomationEmailRecipient = string | {
|
|
17
|
+
email: string;
|
|
18
|
+
};
|
|
19
|
+
export type AutomationGateReportConfig = {
|
|
20
|
+
projectExid: string;
|
|
21
|
+
vehicleTypes: string[];
|
|
22
|
+
fileType: string;
|
|
23
|
+
period: number;
|
|
24
|
+
columns: string[];
|
|
25
|
+
recipients: string | string[];
|
|
26
|
+
};
|
|
27
|
+
export type AutomationEmailProviderConfig = {
|
|
28
|
+
cameraExids?: CameraExid[];
|
|
29
|
+
recipients: string | AutomationEmailRecipient[];
|
|
30
|
+
};
|
|
31
|
+
export type AutomationProcoreProviderConfig = {
|
|
32
|
+
companyId: number;
|
|
33
|
+
companyName: string;
|
|
34
|
+
projectId: number;
|
|
35
|
+
projectName: string;
|
|
36
|
+
categoryId: number;
|
|
37
|
+
categoryName: string;
|
|
38
|
+
};
|
|
39
|
+
export type AutomationAconexProviderConfig = {
|
|
40
|
+
projectId: number;
|
|
41
|
+
projectName: string;
|
|
42
|
+
} & Partial<Record<AconexIdentifiers, string | number | boolean>>;
|
|
43
|
+
export type AutomationAutodeskProviderConfig = {
|
|
44
|
+
hubId: number;
|
|
45
|
+
hubName: string;
|
|
46
|
+
projectId: number;
|
|
47
|
+
projectName: string;
|
|
48
|
+
folderId: number;
|
|
49
|
+
accFileType: string;
|
|
50
|
+
accFolderType: string;
|
|
51
|
+
folderName: string;
|
|
52
|
+
};
|
|
53
|
+
export type AutomationProviderConfig = AutomationEmailProviderConfig | AutomationProcoreProviderConfig | AutomationAconexProviderConfig | AutomationAutodeskProviderConfig;
|
|
54
|
+
export type AutomationOptionsConfig = AutomationCompareConfig | AutomationGateReportConfig | {};
|
|
55
|
+
export type AutomationConfig = AutomationProviderConfig & AutomationOptionsConfig;
|
|
56
|
+
export type Automation = {
|
|
57
|
+
id?: number;
|
|
58
|
+
cameraExids: CameraExid[];
|
|
59
|
+
name: string;
|
|
60
|
+
subject?: string;
|
|
61
|
+
provider: AutomationProvider;
|
|
62
|
+
type: AutomationType;
|
|
63
|
+
config: AutomationConfig;
|
|
64
|
+
notifyDays: string[];
|
|
65
|
+
notifyTime: string;
|
|
66
|
+
timezone: string;
|
|
67
|
+
isPaused: boolean;
|
|
68
|
+
restrictedCameraExids?: string[];
|
|
69
|
+
};
|
|
70
|
+
export declare enum AutomationConfigStep {
|
|
71
|
+
Type = "type",
|
|
72
|
+
Cameras = "cameras",
|
|
73
|
+
Settings = "settings",
|
|
74
|
+
Destination = "destination"
|
|
75
|
+
}
|
|
76
|
+
export type AutomationProviderOption = {
|
|
77
|
+
labelTranslationKey: string;
|
|
78
|
+
descriptionTranslationKey: string;
|
|
79
|
+
value: AutomationProvider;
|
|
80
|
+
icon: string;
|
|
81
|
+
iconSize?: string;
|
|
82
|
+
requiresConnection: boolean;
|
|
83
|
+
};
|
|
84
|
+
export type FormattedAutomation = {
|
|
85
|
+
cameraExids: string;
|
|
86
|
+
name: string;
|
|
87
|
+
subject: string;
|
|
88
|
+
provider: AutomationProvider;
|
|
89
|
+
type: AutomationType;
|
|
90
|
+
config: Partial<AutomationProviderConfig> & Partial<AutomationOptionsConfig>;
|
|
91
|
+
notifyDays: string;
|
|
92
|
+
notifyTime: string;
|
|
93
|
+
timezone: string;
|
|
94
|
+
isPaused: boolean;
|
|
95
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, CancelTokenSource, CancelTokenStatic } from "axios";
|
|
2
|
+
import { Swr } from "@evercam/api/api/client/swr/Swr";
|
|
2
3
|
export type TimedRequest<T> = Promise<AxiosResponse<T> & {
|
|
3
4
|
duration: number;
|
|
4
5
|
error?: AxiosError;
|
|
@@ -7,7 +8,9 @@ export type AxiosEnvironment = {
|
|
|
7
8
|
baseUrl?: string | null;
|
|
8
9
|
stagingAiApiUrl?: string | null;
|
|
9
10
|
aiApiUrl?: string | null;
|
|
10
|
-
|
|
11
|
+
ingestDroneApi?: string | null;
|
|
12
|
+
ingest360Api?: string | null;
|
|
13
|
+
ingestGpuApiUrl?: string | null;
|
|
11
14
|
posthogApiUrl?: string | null;
|
|
12
15
|
posthogProjectId?: string | null;
|
|
13
16
|
posthogPrivateApiKey?: string | null;
|
|
@@ -15,17 +18,21 @@ export type AxiosEnvironment = {
|
|
|
15
18
|
weatherApiBaseUrl?: string | null;
|
|
16
19
|
evercamLabsUrl?: string | null;
|
|
17
20
|
firebaseDbLink?: string | null;
|
|
21
|
+
firebaseStorageUrl?: string | null;
|
|
22
|
+
firebaseStorageToken?: string | null;
|
|
23
|
+
forgeTokenServerUrl?: string | null;
|
|
18
24
|
snapshotsURL?: string | null;
|
|
19
25
|
app?: string | null;
|
|
20
26
|
getAuthToken?: () => string | null;
|
|
21
27
|
errorLogger?: (error: AxiosError) => void;
|
|
28
|
+
swrKey?: string;
|
|
22
29
|
};
|
|
23
30
|
export type RequestInterceptor = (req: AxiosRequestConfig, env: AxiosEnvironment) => AxiosRequestConfig & any;
|
|
24
31
|
export type ResponseInterceptor = (res: AxiosResponse, env: AxiosEnvironment) => AxiosResponse & any;
|
|
25
32
|
export type ErrorInterceptor = (error: any, env: AxiosEnvironment) => any;
|
|
26
33
|
export interface ExtendedAxiosInstance extends AxiosInstance {
|
|
27
34
|
CancelToken: CancelTokenStatic;
|
|
28
|
-
isCancel: (value: AxiosResponse | AxiosError |
|
|
35
|
+
isCancel: (value: AxiosResponse | AxiosError | unknown) => boolean;
|
|
29
36
|
setToken: (token: string) => void;
|
|
30
37
|
setHeader: (headerName: string, value: any) => void;
|
|
31
38
|
generateCancelTokenSource: () => CancelTokenSource;
|
|
@@ -37,7 +44,17 @@ export interface ExtendedAxiosInstance extends AxiosInstance {
|
|
|
37
44
|
addRequestInterceptor: (interceptor: RequestInterceptor, errorInterceptor?: ErrorInterceptor) => void;
|
|
38
45
|
addResponseInterceptor: (interceptor: ResponseInterceptor, errorInterceptor?: ErrorInterceptor) => void;
|
|
39
46
|
addErrorInterceptor: (interceptor: ErrorInterceptor) => void;
|
|
47
|
+
swr: Swr;
|
|
40
48
|
}
|
|
49
|
+
export type ResponseValue<T> = T | undefined;
|
|
50
|
+
export type SwrResponse<T> = {
|
|
51
|
+
cachedValue: ResponseValue<T>;
|
|
52
|
+
freshPromise: Promise<ResponseValue<T>>;
|
|
53
|
+
};
|
|
54
|
+
export type SwrRequestConfig<T> = Omit<AxiosRequestConfig, "onSwrHit" | "onSwrRefresh"> & {
|
|
55
|
+
onSwrHit?: (data: T) => unknown;
|
|
56
|
+
onSwrRefresh?: (data: T) => unknown;
|
|
57
|
+
};
|
|
41
58
|
declare module "axios" {
|
|
42
59
|
interface AxiosRequestConfig {
|
|
43
60
|
raw?: boolean;
|
|
@@ -46,5 +63,9 @@ declare module "axios" {
|
|
|
46
63
|
_metadata?: {
|
|
47
64
|
startTime: number;
|
|
48
65
|
};
|
|
66
|
+
swr?: boolean;
|
|
67
|
+
onSwrHit?: (data: any) => unknown;
|
|
68
|
+
onSwrRefresh?: (data: any) => unknown;
|
|
69
|
+
onSwrError?: (error: Error) => unknown;
|
|
49
70
|
}
|
|
50
71
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CompareLogoPosition, DateType } from "@evercam/api/types";
|
|
2
2
|
export declare enum BimModelType {
|
|
3
3
|
Architectural = "Architectural",
|
|
4
4
|
Structural = "Structural",
|
|
@@ -48,14 +48,15 @@ export type BimCompareExportRequestPayload = {
|
|
|
48
48
|
layerId?: number;
|
|
49
49
|
maskId?: number;
|
|
50
50
|
evercamWatermark?: boolean;
|
|
51
|
+
logo?: CompareLogoPosition;
|
|
51
52
|
};
|
|
52
53
|
export type BimLayerResponsePayload = {
|
|
53
54
|
id: number;
|
|
54
55
|
name: string;
|
|
55
|
-
insertedAt:
|
|
56
|
-
updatedAt:
|
|
56
|
+
insertedAt: string;
|
|
57
|
+
updatedAt: string;
|
|
57
58
|
shapes: string;
|
|
58
|
-
startAt:
|
|
59
|
+
startAt: string;
|
|
59
60
|
};
|
|
60
61
|
export declare enum BimUploadStatus {
|
|
61
62
|
Initial = 0,
|
|
@@ -78,13 +79,18 @@ export type BimCreationPayload = {
|
|
|
78
79
|
};
|
|
79
80
|
export declare enum BIMLayerTypes {
|
|
80
81
|
Mask = "mask",
|
|
82
|
+
BimMask = "bim_mask",
|
|
81
83
|
MeasuringGrid = "measuring_grid",
|
|
82
84
|
BimArchitectural = "bim_architectural",
|
|
83
85
|
BimStructural = "bim_structural",
|
|
84
86
|
Bim4D = "bim_4d",
|
|
85
87
|
BimMep = "bim_mep",
|
|
86
88
|
RecordingsTag = "recordings_tag",
|
|
87
|
-
Milestone = "milestone"
|
|
89
|
+
Milestone = "milestone",
|
|
90
|
+
ForgeBimArchitectural = "forge_bim_architectural",
|
|
91
|
+
ForgeBimStructural = "forge_bim_structural",
|
|
92
|
+
ForgeBim4D = "forge_bim_4d",
|
|
93
|
+
ForgeBimMep = "forge_bim_mep"
|
|
88
94
|
}
|
|
89
95
|
export type BimLayersQueryParams = {
|
|
90
96
|
layerType: BIMLayerTypes;
|
|
@@ -145,3 +151,20 @@ export type BimUploadPayload = {
|
|
|
145
151
|
fileExtension: string;
|
|
146
152
|
}[];
|
|
147
153
|
};
|
|
154
|
+
export declare enum ForgeBimUploadMethod {
|
|
155
|
+
FileUpload = "file_upload",
|
|
156
|
+
AutodeskAcc = "autodesk_acc"
|
|
157
|
+
}
|
|
158
|
+
export declare enum ForgeBimFileRejectionReason {
|
|
159
|
+
InvalidType = "invalid_type",
|
|
160
|
+
ExceedsSizeLimit = "exceeds_size_limit"
|
|
161
|
+
}
|
|
162
|
+
export declare enum ForgeBimUploadStage {
|
|
163
|
+
TusUpload = "tus_upload",
|
|
164
|
+
IngestUpload = "ingest_upload"
|
|
165
|
+
}
|
|
166
|
+
export declare enum ForgeBimDialogTrigger {
|
|
167
|
+
UpdateModel = "update_model",
|
|
168
|
+
AddModel = "add_model",
|
|
169
|
+
InitialSetup = "initial_setup"
|
|
170
|
+
}
|