@evercam/api 1.0.0-cd4690ce8 → 1.0.0-d0847b9fa
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 +217 -0
- package/dist/api/{adminApi.d.ts → api/adminApi.d.ts} +104 -96
- package/dist/api/api/aiApi.d.ts +214 -0
- package/dist/api/api/authzApi.d.ts +40 -0
- package/dist/api/{client → api/client}/axios.d.ts +2 -1
- package/dist/api/{client → api/client}/swr/Swr.d.ts +1 -1
- package/dist/api/{evercamApi.d.ts → api/evercamApi.d.ts} +144 -101
- package/dist/api/{evercamLabsApi.d.ts → api/evercamLabsApi.d.ts} +7 -6
- 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 +162 -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/{weatherApi.d.ts → api/weatherApi.d.ts} +2 -2
- package/dist/api/index.d.ts +3 -13
- package/dist/api/types/360.d.ts +375 -0
- package/dist/{types → api/types}/aconex.d.ts +9 -9
- package/dist/api/types/admin.d.ts +51 -0
- package/dist/api/types/aiConfigs.d.ts +242 -0
- package/dist/{types → api/types}/analytics.d.ts +149 -59
- package/dist/{types → api/types}/anpr.d.ts +48 -2
- package/dist/{types → api/types}/auditLogs.d.ts +19 -1
- package/dist/api/types/authz.d.ts +132 -0
- package/dist/{types → api/types}/autodesk.d.ts +7 -7
- package/dist/{types → api/types}/automation.d.ts +56 -3
- package/dist/{types → api/types}/axios.d.ts +19 -14
- package/dist/{types → api/types}/bim.d.ts +38 -9
- package/dist/{types → api/types}/camera.d.ts +102 -106
- package/dist/{types → api/types}/comments.d.ts +10 -11
- package/dist/{types → api/types}/company.d.ts +42 -1
- package/dist/{types → api/types}/compare.d.ts +20 -5
- package/dist/{types → api/types}/connector.d.ts +5 -5
- package/dist/{types → api/types}/coolify.d.ts +18 -2
- package/dist/{types → api/types}/copilot.d.ts +11 -9
- package/dist/{types → api/types}/credentials.d.ts +1 -0
- package/dist/{types → api/types}/detections.d.ts +23 -18
- package/dist/api/types/drone.d.ts +107 -0
- package/dist/{types → api/types}/errors.d.ts +13 -1
- package/dist/{types → api/types}/gateReport.d.ts +49 -168
- package/dist/api/types/gateReportManagement.d.ts +170 -0
- package/dist/api/types/hammertech.d.ts +98 -0
- package/dist/{types → api/types}/hdd.d.ts +26 -1
- package/dist/{types → api/types}/index.d.ts +15 -2
- package/dist/api/types/ingest.d.ts +234 -0
- package/dist/{types → api/types}/kit.d.ts +74 -56
- package/dist/api/types/map.d.ts +16 -0
- package/dist/{types → api/types}/media.d.ts +10 -3
- package/dist/api/types/notification.d.ts +96 -0
- package/dist/api/types/oauth.d.ts +62 -0
- package/dist/api/types/observationEvents.d.ts +61 -0
- package/dist/api/types/observations.d.ts +85 -0
- package/dist/api/types/planner.d.ts +124 -0
- package/dist/api/types/posthog.d.ts +53 -0
- package/dist/{types → api/types}/procore.d.ts +13 -6
- package/dist/{types → api/types}/progressPhoto.d.ts +6 -2
- package/dist/api/types/project.d.ts +254 -0
- package/dist/{types → api/types}/recording.d.ts +10 -15
- package/dist/{types → api/types}/recycleBin.d.ts +1 -1
- package/dist/api/types/ring.d.ts +53 -0
- package/dist/{types → api/types}/roi.d.ts +3 -11
- package/dist/{types → api/types}/routeParams.d.ts +1 -0
- package/dist/{types → api/types}/router.d.ts +20 -1
- package/dist/{types → api/types}/shared.d.ts +29 -22
- package/dist/api/types/shares.d.ts +45 -0
- package/dist/{types → api/types}/sim.d.ts +6 -6
- package/dist/api/types/siteAnalytics.d.ts +285 -0
- package/dist/api/types/siteAnalyticsManagement.d.ts +117 -0
- package/dist/api/types/siteView.d.ts +73 -0
- package/dist/api/types/smartSeach.d.ts +5 -0
- package/dist/{types → api/types}/snapshots.d.ts +49 -4
- package/dist/api/types/socket.d.ts +4 -0
- package/dist/api/types/storageProvider.d.ts +19 -0
- package/dist/api/types/storyblok.d.ts +27 -0
- package/dist/{types → api/types}/streaming.d.ts +3 -3
- package/dist/{types → api/types}/tag.d.ts +1 -1
- package/dist/api/types/time.d.ts +7 -0
- package/dist/{types → api/types}/timelapse.d.ts +7 -11
- package/dist/{types → api/types}/user.d.ts +106 -35
- package/dist/api/types/videoWall.d.ts +66 -0
- package/dist/{types → api/types}/weather.d.ts +75 -11
- package/dist/{types → api/types}/widget.d.ts +72 -11
- package/dist/{types → api/types}/xweather.d.ts +4 -4
- package/dist/{utils.d.ts → api/utils.d.ts} +0 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2334 -1087
- 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 +374 -0
- package/dist/shared/types/customDataTableFilters.d.ts +10 -0
- package/dist/shared/types/imagePlayer.d.ts +41 -0
- package/dist/shared/types/index.d.ts +7 -0
- package/dist/shared/types/observations.d.ts +21 -0
- package/dist/shared/types/rbac.d.ts +67 -0
- package/dist/shared/types/timeline.d.ts +10 -0
- package/package.json +4 -2
- package/dist/api/3dFirebaseApi.d.ts +0 -21
- package/dist/api/aiApi.d.ts +0 -155
- package/dist/api/authzApi.d.ts +0 -21
- package/dist/api/ingestApi.d.ts +0 -95
- package/dist/api/videoWallApi.d.ts +0 -9
- package/dist/types/360.d.ts +0 -141
- package/dist/types/drone.d.ts +0 -17
- package/dist/types/ingest.d.ts +0 -51
- package/dist/types/map.d.ts +0 -4
- package/dist/types/notification.d.ts +0 -27
- package/dist/types/planner.d.ts +0 -32
- package/dist/types/posthog.d.ts +0 -18
- package/dist/types/project.d.ts +0 -132
- package/dist/types/shares.d.ts +0 -196
- package/dist/types/siteAnalytics.d.ts +0 -163
- package/dist/types/storageServers.d.ts +0 -4
- package/dist/types/time.d.ts +0 -25
- package/dist/types/vendorModel.d.ts +0 -15
- package/dist/types/videoWall.d.ts +0 -33
- /package/dist/api/{client → api/client}/customErrors.d.ts +0 -0
- /package/dist/api/{client → api/client}/index.d.ts +0 -0
- /package/dist/api/{client → api/client}/interceptors.d.ts +0 -0
- /package/dist/api/{client → api/client}/swr/SwrStore.d.ts +0 -0
- /package/dist/api/{webRtcApi.d.ts → api/webRtcApi.d.ts} +0 -0
- /package/dist/{types → api/types}/countries.d.ts +0 -0
- /package/dist/{types → api/types}/nvr.d.ts +0 -0
- /package/dist/{types → api/types}/sso.d.ts +0 -0
- /package/dist/{types → api/types}/systemCheck.d.ts +0 -0
- /package/dist/{types → api/types}/voyageControl.d.ts +0 -0
|
@@ -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,132 @@
|
|
|
1
|
+
export declare enum RoleResourceType {
|
|
2
|
+
App = "app",
|
|
3
|
+
Camera = "camera",
|
|
4
|
+
Project = "project"
|
|
5
|
+
}
|
|
6
|
+
export declare enum RoleAssignmentLogAction {
|
|
7
|
+
Assign = "assign",
|
|
8
|
+
Unassign = "unassign"
|
|
9
|
+
}
|
|
10
|
+
export type RoleSubRole = {
|
|
11
|
+
resourceId: string;
|
|
12
|
+
roleId: number;
|
|
13
|
+
roleName?: string;
|
|
14
|
+
permissions?: string[];
|
|
15
|
+
};
|
|
16
|
+
export type Role = {
|
|
17
|
+
id: number;
|
|
18
|
+
name: string;
|
|
19
|
+
description?: string | null;
|
|
20
|
+
resource?: string;
|
|
21
|
+
resourceType: RoleResourceType;
|
|
22
|
+
resourceId?: string | null;
|
|
23
|
+
permissions: string[];
|
|
24
|
+
subRoles?: RoleSubRole[];
|
|
25
|
+
isDefault?: boolean;
|
|
26
|
+
};
|
|
27
|
+
export type ProjectResourceRole = Role & {
|
|
28
|
+
resourceType: RoleResourceType.Project;
|
|
29
|
+
};
|
|
30
|
+
export type CameraResourceRole = Omit<Role, "subRoles"> & {
|
|
31
|
+
resourceType: RoleResourceType.Camera;
|
|
32
|
+
};
|
|
33
|
+
export type ProjectRoleRequestPayload = {
|
|
34
|
+
name: string;
|
|
35
|
+
permissions: string[];
|
|
36
|
+
subRoles?: RoleSubRole[];
|
|
37
|
+
};
|
|
38
|
+
export type AuthzRoleUser = {
|
|
39
|
+
email: string;
|
|
40
|
+
resourceId: string;
|
|
41
|
+
};
|
|
42
|
+
export type AuthzUserRolesResponse = {
|
|
43
|
+
roles: Role[];
|
|
44
|
+
};
|
|
45
|
+
export type AuthzScopePermission = {
|
|
46
|
+
id: number;
|
|
47
|
+
action: string;
|
|
48
|
+
exid: string;
|
|
49
|
+
};
|
|
50
|
+
export type AuthzScope = {
|
|
51
|
+
id: number;
|
|
52
|
+
name: string;
|
|
53
|
+
description: string | null;
|
|
54
|
+
permissions: AuthzScopePermission[];
|
|
55
|
+
app: string;
|
|
56
|
+
exid: string;
|
|
57
|
+
};
|
|
58
|
+
export type AuthzScopeCreatePayload = {
|
|
59
|
+
name: string;
|
|
60
|
+
description?: string;
|
|
61
|
+
permissions: string[];
|
|
62
|
+
};
|
|
63
|
+
export type AuthzScopeUpdatePayload = Partial<AuthzScopeCreatePayload>;
|
|
64
|
+
export declare function isProjectRole(role: Role): role is ProjectResourceRole;
|
|
65
|
+
export declare function isCameraRole(role: Role): role is CameraResourceRole;
|
|
66
|
+
export type RoleAssignmentUserDetails = {
|
|
67
|
+
browser?: string | null;
|
|
68
|
+
device?: string | null;
|
|
69
|
+
os?: string | null;
|
|
70
|
+
country?: string | null;
|
|
71
|
+
countryCode?: string | null;
|
|
72
|
+
ip?: string | null;
|
|
73
|
+
impersonatedBy?: string | null;
|
|
74
|
+
};
|
|
75
|
+
export type RoleAssignmentRowUserDetails = RoleAssignmentUserDetails & {
|
|
76
|
+
via?: string | null;
|
|
77
|
+
inviteId?: number | null;
|
|
78
|
+
inviteEmail?: string | null;
|
|
79
|
+
};
|
|
80
|
+
export type RoleAssignmentLog = {
|
|
81
|
+
id: number;
|
|
82
|
+
action: RoleAssignmentLogAction;
|
|
83
|
+
assignerId: number | null;
|
|
84
|
+
assignerEmail: string | null;
|
|
85
|
+
assigneeId: number | null;
|
|
86
|
+
assigneeEmail: string;
|
|
87
|
+
roleId: number | null;
|
|
88
|
+
roleName: string | null;
|
|
89
|
+
previousRoleId: number | null;
|
|
90
|
+
previousRoleName: string | null;
|
|
91
|
+
scope: RoleResourceType;
|
|
92
|
+
projectExid: string | null;
|
|
93
|
+
cameraExid: string | null;
|
|
94
|
+
cameraName: string | null;
|
|
95
|
+
projectName: string | null;
|
|
96
|
+
ip: string | null;
|
|
97
|
+
userDetails: RoleAssignmentRowUserDetails | null;
|
|
98
|
+
insertedAt: string;
|
|
99
|
+
};
|
|
100
|
+
export type RoleAssignmentResourceRef = {
|
|
101
|
+
exid: string;
|
|
102
|
+
name: string | null;
|
|
103
|
+
};
|
|
104
|
+
export type RoleAssignmentLogBatch = {
|
|
105
|
+
groupId: string;
|
|
106
|
+
batchId: string | null;
|
|
107
|
+
batchSize: number;
|
|
108
|
+
assigneeId: number | null;
|
|
109
|
+
assigneeEmail: string;
|
|
110
|
+
actions: RoleAssignmentLogAction[];
|
|
111
|
+
projects: RoleAssignmentResourceRef[];
|
|
112
|
+
ip: string | null;
|
|
113
|
+
userDetails: RoleAssignmentUserDetails | null;
|
|
114
|
+
insertedAt: string;
|
|
115
|
+
children: RoleAssignmentLog[];
|
|
116
|
+
};
|
|
117
|
+
export type RoleAssignmentLogsParams = {
|
|
118
|
+
page?: number;
|
|
119
|
+
limit?: number;
|
|
120
|
+
sort?: string;
|
|
121
|
+
action?: RoleAssignmentLogAction;
|
|
122
|
+
roleId?: number;
|
|
123
|
+
roleName?: string;
|
|
124
|
+
assigneeEmail?: string;
|
|
125
|
+
assignerEmail?: string;
|
|
126
|
+
scope?: RoleResourceType;
|
|
127
|
+
projectExid?: string;
|
|
128
|
+
cameraExid?: string;
|
|
129
|
+
ip?: string;
|
|
130
|
+
from?: string;
|
|
131
|
+
to?: string;
|
|
132
|
+
};
|
|
@@ -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;
|
|
@@ -7,13 +7,45 @@ export declare enum AutomationProvider {
|
|
|
7
7
|
}
|
|
8
8
|
export declare enum AutomationType {
|
|
9
9
|
Photo = "photo",
|
|
10
|
-
Compare = "compare"
|
|
10
|
+
Compare = "compare",
|
|
11
|
+
GateReport = "gate_report",
|
|
12
|
+
Weather = "weather"
|
|
11
13
|
}
|
|
14
|
+
export declare enum AutomationWeatherReportType {
|
|
15
|
+
Forecast = "forecast",
|
|
16
|
+
History = "history"
|
|
17
|
+
}
|
|
18
|
+
export declare enum AutomationExportFormat {
|
|
19
|
+
Pdf = "pdf",
|
|
20
|
+
Csv = "csv"
|
|
21
|
+
}
|
|
22
|
+
export declare enum AutomationWeatherDataGranularity {
|
|
23
|
+
Daily = "daily",
|
|
24
|
+
Hourly = "hourly"
|
|
25
|
+
}
|
|
26
|
+
export type AutomationWeatherConfig = {
|
|
27
|
+
reportType: AutomationWeatherReportType;
|
|
28
|
+
exportFormat: AutomationExportFormat;
|
|
29
|
+
dataGranularity?: AutomationWeatherDataGranularity;
|
|
30
|
+
selectedColumns?: string[];
|
|
31
|
+
forecastDays?: number;
|
|
32
|
+
};
|
|
12
33
|
export type AutomationCompareConfig = {
|
|
13
34
|
compareDelay: number;
|
|
14
35
|
};
|
|
36
|
+
export type AutomationEmailRecipient = string | {
|
|
37
|
+
email: string;
|
|
38
|
+
};
|
|
39
|
+
export type AutomationGateReportConfig = {
|
|
40
|
+
projectExid: string;
|
|
41
|
+
vehicleTypes: string[];
|
|
42
|
+
fileType: string;
|
|
43
|
+
period: number;
|
|
44
|
+
columns: string[];
|
|
45
|
+
};
|
|
15
46
|
export type AutomationEmailProviderConfig = {
|
|
16
|
-
|
|
47
|
+
cameraExids?: CameraExid[];
|
|
48
|
+
recipients: string | AutomationEmailRecipient[];
|
|
17
49
|
};
|
|
18
50
|
export type AutomationProcoreProviderConfig = {
|
|
19
51
|
companyId: number;
|
|
@@ -38,9 +70,10 @@ export type AutomationAutodeskProviderConfig = {
|
|
|
38
70
|
folderName: string;
|
|
39
71
|
};
|
|
40
72
|
export type AutomationProviderConfig = AutomationEmailProviderConfig | AutomationProcoreProviderConfig | AutomationAconexProviderConfig | AutomationAutodeskProviderConfig;
|
|
41
|
-
export type AutomationOptionsConfig = AutomationCompareConfig | {};
|
|
73
|
+
export type AutomationOptionsConfig = AutomationCompareConfig | AutomationGateReportConfig | AutomationWeatherConfig | {};
|
|
42
74
|
export type AutomationConfig = AutomationProviderConfig & AutomationOptionsConfig;
|
|
43
75
|
export type Automation = {
|
|
76
|
+
id?: number;
|
|
44
77
|
cameraExids: CameraExid[];
|
|
45
78
|
name: string;
|
|
46
79
|
subject?: string;
|
|
@@ -59,3 +92,23 @@ export declare enum AutomationConfigStep {
|
|
|
59
92
|
Settings = "settings",
|
|
60
93
|
Destination = "destination"
|
|
61
94
|
}
|
|
95
|
+
export type AutomationProviderOption = {
|
|
96
|
+
labelTranslationKey: string;
|
|
97
|
+
descriptionTranslationKey: string;
|
|
98
|
+
value: AutomationProvider;
|
|
99
|
+
icon: string;
|
|
100
|
+
iconSize?: string;
|
|
101
|
+
requiresConnection: boolean;
|
|
102
|
+
};
|
|
103
|
+
export type FormattedAutomation = {
|
|
104
|
+
cameraExids?: string;
|
|
105
|
+
name: string;
|
|
106
|
+
subject: string;
|
|
107
|
+
provider: AutomationProvider;
|
|
108
|
+
type: AutomationType;
|
|
109
|
+
config: Partial<AutomationProviderConfig> & Partial<AutomationOptionsConfig>;
|
|
110
|
+
notifyDays: string;
|
|
111
|
+
notifyTime: string;
|
|
112
|
+
timezone: string;
|
|
113
|
+
isPaused: boolean;
|
|
114
|
+
};
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import type { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, CancelTokenSource, CancelTokenStatic } from "axios";
|
|
2
|
-
import { Swr } from "
|
|
3
|
-
export type TimedRequest<T> = Promise<AxiosResponse<T> & {
|
|
4
|
-
duration: number;
|
|
5
|
-
error?: AxiosError;
|
|
6
|
-
}>;
|
|
2
|
+
import { Swr } from "@evercam/api/api/client/swr/Swr";
|
|
7
3
|
export type AxiosEnvironment = {
|
|
8
4
|
baseUrl?: string | null;
|
|
9
5
|
stagingAiApiUrl?: string | null;
|
|
10
6
|
aiApiUrl?: string | null;
|
|
11
|
-
|
|
7
|
+
ingestDroneApi?: string | null;
|
|
8
|
+
ingest360Api?: string | null;
|
|
12
9
|
ingestGpuApiUrl?: string | null;
|
|
13
10
|
posthogApiUrl?: string | null;
|
|
14
11
|
posthogProjectId?: string | null;
|
|
15
|
-
posthogPrivateApiKey?: string | null;
|
|
16
12
|
firebaseVideowallUrl?: string | null;
|
|
17
13
|
weatherApiBaseUrl?: string | null;
|
|
18
14
|
evercamLabsUrl?: string | null;
|
|
15
|
+
isLabsStaging?: boolean;
|
|
19
16
|
firebaseDbLink?: string | null;
|
|
20
17
|
firebaseStorageUrl?: string | null;
|
|
21
18
|
firebaseStorageToken?: string | null;
|
|
19
|
+
forgeTokenServerUrl?: string | null;
|
|
22
20
|
snapshotsURL?: string | null;
|
|
23
21
|
app?: string | null;
|
|
24
22
|
getAuthToken?: () => string | null;
|
|
@@ -28,15 +26,18 @@ export type AxiosEnvironment = {
|
|
|
28
26
|
export type RequestInterceptor = (req: AxiosRequestConfig, env: AxiosEnvironment) => AxiosRequestConfig & any;
|
|
29
27
|
export type ResponseInterceptor = (res: AxiosResponse, env: AxiosEnvironment) => AxiosResponse & any;
|
|
30
28
|
export type ErrorInterceptor = (error: any, env: AxiosEnvironment) => any;
|
|
29
|
+
export type RequestManager = {
|
|
30
|
+
createToken: (key: string) => CancelTokenSource["token"];
|
|
31
|
+
cancelToken: (key: string) => void;
|
|
32
|
+
cancelAll: () => void;
|
|
33
|
+
};
|
|
31
34
|
export interface ExtendedAxiosInstance extends AxiosInstance {
|
|
32
35
|
CancelToken: CancelTokenStatic;
|
|
33
|
-
isCancel: (value: AxiosResponse | AxiosError |
|
|
36
|
+
isCancel: (value: AxiosResponse | AxiosError | unknown) => boolean;
|
|
34
37
|
setToken: (token: string) => void;
|
|
35
38
|
setHeader: (headerName: string, value: any) => void;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
resetCancelTokens: () => void;
|
|
39
|
-
cancelRequests: () => void;
|
|
39
|
+
createRequestManager: () => RequestManager;
|
|
40
|
+
requestManager: RequestManager;
|
|
40
41
|
env: AxiosEnvironment;
|
|
41
42
|
addEnvironmentVariables: (vars: Record<string, any>) => void;
|
|
42
43
|
addRequestInterceptor: (interceptor: RequestInterceptor, errorInterceptor?: ErrorInterceptor) => void;
|
|
@@ -49,6 +50,10 @@ export type SwrResponse<T> = {
|
|
|
49
50
|
cachedValue: ResponseValue<T>;
|
|
50
51
|
freshPromise: Promise<ResponseValue<T>>;
|
|
51
52
|
};
|
|
53
|
+
export type SwrRequestConfig<T> = Omit<AxiosRequestConfig, "onSwrHit" | "onSwrRefresh"> & {
|
|
54
|
+
onSwrHit?: (data: T) => unknown;
|
|
55
|
+
onSwrRefresh?: (data: T) => unknown;
|
|
56
|
+
};
|
|
52
57
|
declare module "axios" {
|
|
53
58
|
interface AxiosRequestConfig {
|
|
54
59
|
raw?: boolean;
|
|
@@ -58,8 +63,8 @@ declare module "axios" {
|
|
|
58
63
|
startTime: number;
|
|
59
64
|
};
|
|
60
65
|
swr?: boolean;
|
|
61
|
-
onSwrHit?:
|
|
62
|
-
onSwrRefresh?:
|
|
66
|
+
onSwrHit?: (data: any) => unknown;
|
|
67
|
+
onSwrRefresh?: (data: any) => unknown;
|
|
63
68
|
onSwrError?: (error: Error) => unknown;
|
|
64
69
|
}
|
|
65
70
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CompareLogoPosition, DateType, PaginationParams } 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;
|
|
@@ -95,7 +101,7 @@ export type BIMLayerPostPayload = {
|
|
|
95
101
|
layerType: BIMLayerTypes;
|
|
96
102
|
startAt: DateType;
|
|
97
103
|
shapes: string;
|
|
98
|
-
zIndex
|
|
104
|
+
zIndex?: number;
|
|
99
105
|
};
|
|
100
106
|
export type BIMLayer = {
|
|
101
107
|
id: number;
|
|
@@ -131,9 +137,7 @@ export type ProcessPendingImagesBimParams = {
|
|
|
131
137
|
apiId: string;
|
|
132
138
|
apiKey: string;
|
|
133
139
|
};
|
|
134
|
-
export type BimUploadsQueryParams = {
|
|
135
|
-
page: number;
|
|
136
|
-
limit: number;
|
|
140
|
+
export type BimUploadsQueryParams = PaginationParams & {
|
|
137
141
|
projectId: string;
|
|
138
142
|
id: string;
|
|
139
143
|
uploadedBy: string;
|
|
@@ -145,3 +149,28 @@ export type BimUploadPayload = {
|
|
|
145
149
|
fileExtension: string;
|
|
146
150
|
}[];
|
|
147
151
|
};
|
|
152
|
+
export declare enum ForgeBimUploadMethod {
|
|
153
|
+
FileUpload = "file_upload",
|
|
154
|
+
AutodeskAcc = "autodesk_acc"
|
|
155
|
+
}
|
|
156
|
+
export declare enum ForgeBimFileRejectionReason {
|
|
157
|
+
InvalidType = "invalid_type",
|
|
158
|
+
ExceedsSizeLimit = "exceeds_size_limit"
|
|
159
|
+
}
|
|
160
|
+
export declare enum ForgeBimUploadStage {
|
|
161
|
+
TusUpload = "tus_upload",
|
|
162
|
+
IngestUpload = "ingest_upload"
|
|
163
|
+
}
|
|
164
|
+
export declare enum ForgeBimDialogTrigger {
|
|
165
|
+
UpdateModel = "update_model",
|
|
166
|
+
AddModel = "add_model",
|
|
167
|
+
InitialSetup = "initial_setup"
|
|
168
|
+
}
|
|
169
|
+
export type BimUpdatedWebhookPayload = {
|
|
170
|
+
eventName: "bim.updated";
|
|
171
|
+
projectId: string;
|
|
172
|
+
data: {
|
|
173
|
+
updatedAt: string;
|
|
174
|
+
bimIdentifier: string;
|
|
175
|
+
};
|
|
176
|
+
};
|