@evercam/api 1.0.0-4530231e7 → 1.0.0-4544b2a4c
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 +212 -15
- package/dist/api/api/adminApi.d.ts +120 -96
- package/dist/api/api/aiApi.d.ts +188 -53
- package/dist/api/api/authzApi.d.ts +5 -3
- package/dist/api/api/client/interceptors.d.ts +1 -1
- package/dist/api/api/evercamApi.d.ts +86 -28
- package/dist/api/api/evercamLabsApi.d.ts +9 -18
- package/dist/api/api/exNvrApi.d.ts +1 -1
- package/dist/api/api/index.d.ts +1 -0
- package/dist/api/api/ingestApi.d.ts +90 -65
- package/dist/api/api/reportsApi.d.ts +15 -0
- package/dist/api/types/360.d.ts +178 -86
- package/dist/api/types/admin.d.ts +41 -3
- package/dist/api/types/aiConfigs.d.ts +244 -0
- package/dist/api/types/analytics.d.ts +141 -71
- package/dist/api/types/anpr.d.ts +134 -0
- package/dist/api/types/apiKey.d.ts +70 -0
- package/dist/api/types/auditLogs.d.ts +179 -21
- package/dist/api/types/authz.d.ts +72 -0
- package/dist/api/types/automation.d.ts +40 -3
- package/dist/api/types/axios.d.ts +12 -11
- package/dist/api/types/bim.d.ts +70 -12
- package/dist/api/types/camera.d.ts +244 -128
- package/dist/api/types/comments.d.ts +67 -26
- package/dist/api/types/company.d.ts +11 -5
- package/dist/api/types/compare.d.ts +1 -1
- package/dist/api/types/connector.d.ts +3 -0
- package/dist/api/types/coolify.d.ts +18 -2
- package/dist/api/types/detections.d.ts +10 -11
- package/dist/api/types/drone.d.ts +95 -6
- package/dist/api/types/emailMessages.d.ts +27 -0
- package/dist/api/types/errors.d.ts +19 -2
- package/dist/api/types/gateReport.d.ts +59 -49
- package/dist/api/types/gateReportManagement.d.ts +170 -0
- package/dist/api/types/hammertech.d.ts +98 -0
- package/dist/api/types/hdd.d.ts +1 -1
- package/dist/api/types/index.d.ts +15 -3
- package/dist/api/types/ingest.d.ts +207 -20
- package/dist/api/types/kit.d.ts +97 -117
- package/dist/api/types/map.d.ts +12 -0
- package/dist/api/types/media.d.ts +32 -3
- package/dist/api/types/notification.d.ts +52 -2
- package/dist/api/types/nvr.d.ts +39 -8
- package/dist/api/types/oauth.d.ts +62 -0
- package/dist/api/types/observationEvents.d.ts +167 -0
- package/dist/api/types/observations.d.ts +89 -0
- package/dist/api/types/planner.d.ts +98 -8
- package/dist/api/types/posthog.d.ts +72 -0
- package/dist/api/types/progressPhoto.d.ts +39 -25
- package/dist/api/types/project.d.ts +77 -24
- package/dist/api/types/recording.d.ts +9 -15
- package/dist/api/types/recycleBin.d.ts +8 -2
- package/dist/api/types/reports.d.ts +109 -0
- package/dist/api/types/ring.d.ts +53 -0
- package/dist/api/types/roi.d.ts +3 -11
- package/dist/api/types/routeParams.d.ts +1 -0
- package/dist/api/types/router.d.ts +15 -10
- package/dist/api/types/shared.d.ts +39 -29
- package/dist/api/types/shares.d.ts +0 -13
- package/dist/api/types/sim.d.ts +18 -6
- package/dist/api/types/siteAnalytics.d.ts +7 -19
- package/dist/api/types/siteAnalyticsManagement.d.ts +127 -0
- package/dist/api/types/siteView.d.ts +80 -0
- package/dist/api/types/smartSeach.d.ts +5 -0
- package/dist/api/types/snapshots.d.ts +98 -13
- package/dist/api/types/socket.d.ts +4 -0
- package/dist/api/types/sso.d.ts +12 -37
- package/dist/api/types/storageProvider.d.ts +30 -0
- package/dist/api/types/storyblok.d.ts +0 -13
- package/dist/api/types/timelapse.d.ts +6 -9
- package/dist/api/types/user.d.ts +48 -34
- package/dist/api/types/widget.d.ts +13 -4
- package/dist/api/utils.d.ts +1 -1
- package/dist/index.js +2635 -1120
- 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 +702 -42
- package/dist/shared/types/customDataTableFilters.d.ts +10 -0
- package/dist/shared/types/droneUpload.d.ts +93 -0
- package/dist/shared/types/imagePlayer.d.ts +8 -1
- package/dist/shared/types/index.d.ts +5 -0
- package/dist/shared/types/observations.d.ts +25 -0
- package/dist/shared/types/rbac.d.ts +80 -0
- package/dist/shared/types/report.d.ts +108 -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 -157
- package/dist/api/types/storageServers.d.ts +0 -4
- package/dist/api/types/vendorModel.d.ts +0 -15
package/dist/api/types/anpr.d.ts
CHANGED
|
@@ -29,6 +29,10 @@ export type AnprCountsQueryParams = {
|
|
|
29
29
|
vehicleTypes?: GateReportVehicleType[];
|
|
30
30
|
camerasExid?: CameraExid[];
|
|
31
31
|
};
|
|
32
|
+
export declare enum AnprThumbnailType {
|
|
33
|
+
Anpr = "anpr",
|
|
34
|
+
Context = "context"
|
|
35
|
+
}
|
|
32
36
|
export declare enum AnprDirection {
|
|
33
37
|
Left = "reverse",
|
|
34
38
|
Arrived = "forward",
|
|
@@ -68,8 +72,21 @@ export type AnprEvent = {
|
|
|
68
72
|
mp4Url: string;
|
|
69
73
|
plateThumbnailUrl: string;
|
|
70
74
|
thumbnailUrl: string;
|
|
75
|
+
companyId?: number | null;
|
|
76
|
+
coverState?: AnprCoverState | null;
|
|
77
|
+
loadState?: AnprLoadState | null;
|
|
78
|
+
loadCategory?: AnprLoadCategory | null;
|
|
71
79
|
metadata: {
|
|
72
80
|
evercamMetadata?: {
|
|
81
|
+
company?: Partial<AnprMetadataCompany>;
|
|
82
|
+
covered?: boolean;
|
|
83
|
+
loadContent?: {
|
|
84
|
+
description?: string;
|
|
85
|
+
confidence?: number;
|
|
86
|
+
visible?: boolean;
|
|
87
|
+
};
|
|
88
|
+
vehicle?: Partial<AnprMetadataVehicle>;
|
|
89
|
+
enrichmentStatus?: string;
|
|
73
90
|
anpr?: {
|
|
74
91
|
bbox: BoundingBox;
|
|
75
92
|
label: string;
|
|
@@ -91,6 +108,76 @@ export type AnprEvent = {
|
|
|
91
108
|
};
|
|
92
109
|
};
|
|
93
110
|
};
|
|
111
|
+
export type AnprListEvent = AnprEvent & {
|
|
112
|
+
isSelected: boolean;
|
|
113
|
+
};
|
|
114
|
+
export declare enum AnprCoverState {
|
|
115
|
+
Covered = "covered",
|
|
116
|
+
Uncovered = "uncovered",
|
|
117
|
+
Enclosed = "enclosed",
|
|
118
|
+
NotApplicable = "not_applicable",
|
|
119
|
+
NotVisible = "not_visible"
|
|
120
|
+
}
|
|
121
|
+
export declare enum AnprLoadState {
|
|
122
|
+
Empty = "empty",
|
|
123
|
+
Loaded = "loaded",
|
|
124
|
+
NotVisible = "not_visible"
|
|
125
|
+
}
|
|
126
|
+
export declare enum AnprLoadCategory {
|
|
127
|
+
Soil = "soil",
|
|
128
|
+
Rubble = "rubble",
|
|
129
|
+
Sand = "sand",
|
|
130
|
+
Aggregate = "aggregate",
|
|
131
|
+
Concrete = "concrete",
|
|
132
|
+
Asphalt = "asphalt",
|
|
133
|
+
Steel = "steel",
|
|
134
|
+
Timber = "timber",
|
|
135
|
+
Scaffolding = "scaffolding",
|
|
136
|
+
Pallets = "pallets",
|
|
137
|
+
Blocks = "blocks",
|
|
138
|
+
Pipes = "pipes",
|
|
139
|
+
CableDrums = "cable_drums",
|
|
140
|
+
Plant = "plant",
|
|
141
|
+
Waste = "waste",
|
|
142
|
+
Mixed = "mixed",
|
|
143
|
+
Other = "other"
|
|
144
|
+
}
|
|
145
|
+
export type AnprMetadataCompany = {
|
|
146
|
+
id: number;
|
|
147
|
+
name: string;
|
|
148
|
+
normalizedKey: string;
|
|
149
|
+
description: string | null;
|
|
150
|
+
activity: string | null;
|
|
151
|
+
confidence: number | null;
|
|
152
|
+
};
|
|
153
|
+
export type AnprMetadataVehicle = {
|
|
154
|
+
description: string | null;
|
|
155
|
+
remarks: string[] | null;
|
|
156
|
+
confidence: number | null;
|
|
157
|
+
bodyType: string | null;
|
|
158
|
+
color: string | null;
|
|
159
|
+
make: string | null;
|
|
160
|
+
model: string | null;
|
|
161
|
+
source: string;
|
|
162
|
+
vlmFilled: string[];
|
|
163
|
+
};
|
|
164
|
+
export type AnprCompany = {
|
|
165
|
+
id: number | null;
|
|
166
|
+
name: string;
|
|
167
|
+
normalizedKey?: string | null;
|
|
168
|
+
description?: string | null;
|
|
169
|
+
activity?: string | null;
|
|
170
|
+
count: number;
|
|
171
|
+
};
|
|
172
|
+
export type AnprRegistryCompany = AnprCompany & {
|
|
173
|
+
id: number;
|
|
174
|
+
};
|
|
175
|
+
export type AnprEnrichmentFilter = {
|
|
176
|
+
companyId?: number;
|
|
177
|
+
coverState?: AnprCoverState;
|
|
178
|
+
loadState?: AnprLoadState;
|
|
179
|
+
loadCategory?: AnprLoadCategory;
|
|
180
|
+
};
|
|
94
181
|
export type AnprCount = {
|
|
95
182
|
date: string;
|
|
96
183
|
counts: Record<AnprDirection, number>;
|
|
@@ -101,3 +188,50 @@ export declare enum AnprEventStatus {
|
|
|
101
188
|
IsDuplicate = "is_duplicate",
|
|
102
189
|
NotDuplicate = "not_duplicate"
|
|
103
190
|
}
|
|
191
|
+
export type AnprBulkUpdateRequestPayload = {
|
|
192
|
+
anprEventIds: number[];
|
|
193
|
+
action: AnprEventStatus;
|
|
194
|
+
};
|
|
195
|
+
export type AnprUpdateRequestPayload = {
|
|
196
|
+
id?: number;
|
|
197
|
+
plateNumber?: string;
|
|
198
|
+
vehicleType?: GateReportVehicleType;
|
|
199
|
+
direction?: AnprDirection;
|
|
200
|
+
};
|
|
201
|
+
export declare enum AnprExtractionStatus {
|
|
202
|
+
Pending = "pending",
|
|
203
|
+
Running = "running",
|
|
204
|
+
Completed = "completed",
|
|
205
|
+
Failed = "failed"
|
|
206
|
+
}
|
|
207
|
+
export declare enum AnprExtractionSaveMode {
|
|
208
|
+
All = "all",
|
|
209
|
+
AiDbOnly = "ai_db_only",
|
|
210
|
+
ImagesOnly = "images_only"
|
|
211
|
+
}
|
|
212
|
+
export type AnprExtraction = {
|
|
213
|
+
id: number;
|
|
214
|
+
cameraId: number;
|
|
215
|
+
userId: number | null;
|
|
216
|
+
startDate: string;
|
|
217
|
+
endDate: string;
|
|
218
|
+
status: AnprExtractionStatus;
|
|
219
|
+
totalRecords: number;
|
|
220
|
+
error: string | null;
|
|
221
|
+
saveMode: AnprExtractionSaveMode;
|
|
222
|
+
startedAt: string | null;
|
|
223
|
+
completedAt: string | null;
|
|
224
|
+
insertedAt: string;
|
|
225
|
+
updatedAt: string;
|
|
226
|
+
};
|
|
227
|
+
export type AnprExtractionCreatePayload = {
|
|
228
|
+
startDate: string;
|
|
229
|
+
endDate: string;
|
|
230
|
+
saveMode?: AnprExtractionSaveMode;
|
|
231
|
+
};
|
|
232
|
+
export declare enum AnprEnrichmentFilterName {
|
|
233
|
+
Company = "company",
|
|
234
|
+
Load = "load",
|
|
235
|
+
Cover = "cover",
|
|
236
|
+
Material = "material"
|
|
237
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare enum ApiKeyType {
|
|
2
|
+
User = "user",
|
|
3
|
+
Workflows = "workflows",
|
|
4
|
+
Widget = "widget"
|
|
5
|
+
}
|
|
6
|
+
export type ApiKey = {
|
|
7
|
+
id: number;
|
|
8
|
+
name: string;
|
|
9
|
+
type: ApiKeyType;
|
|
10
|
+
maskedKey: string;
|
|
11
|
+
key: string | null;
|
|
12
|
+
scopes: string[];
|
|
13
|
+
projects: string[];
|
|
14
|
+
active: boolean;
|
|
15
|
+
expiresAt: string | null;
|
|
16
|
+
lastUsedAt: string | null;
|
|
17
|
+
revokedAt: string | null;
|
|
18
|
+
insertedAt: string;
|
|
19
|
+
updatedAt: string;
|
|
20
|
+
};
|
|
21
|
+
export declare enum ApiKeyStatus {
|
|
22
|
+
Active = "active",
|
|
23
|
+
Expired = "expired",
|
|
24
|
+
Revoked = "revoked"
|
|
25
|
+
}
|
|
26
|
+
export type ApiKeysRequestParams = {
|
|
27
|
+
name?: string;
|
|
28
|
+
type?: ApiKeyType;
|
|
29
|
+
status?: ApiKeyStatus[];
|
|
30
|
+
expiresAtFrom?: string;
|
|
31
|
+
expiresAtTo?: string;
|
|
32
|
+
lastUsedAtFrom?: string;
|
|
33
|
+
lastUsedAtTo?: string;
|
|
34
|
+
sort?: string;
|
|
35
|
+
page?: number;
|
|
36
|
+
limit?: number;
|
|
37
|
+
};
|
|
38
|
+
export type CreateApiKeyPayload = {
|
|
39
|
+
name: string;
|
|
40
|
+
scopes: string[];
|
|
41
|
+
resources?: {
|
|
42
|
+
projects: string[];
|
|
43
|
+
};
|
|
44
|
+
type?: ApiKeyType;
|
|
45
|
+
expiresAt?: string;
|
|
46
|
+
};
|
|
47
|
+
export type UpdateApiKeyPayload = {
|
|
48
|
+
name?: string;
|
|
49
|
+
scopes?: string[];
|
|
50
|
+
resources?: {
|
|
51
|
+
projects: string[];
|
|
52
|
+
};
|
|
53
|
+
expiresAt?: string | null;
|
|
54
|
+
};
|
|
55
|
+
export type AdminApiKey = Omit<ApiKey, "key"> & {
|
|
56
|
+
user: {
|
|
57
|
+
email: string;
|
|
58
|
+
fullname: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export type AdminApiKeysRequestParams = ApiKeysRequestParams & {
|
|
62
|
+
user?: string;
|
|
63
|
+
userId?: number;
|
|
64
|
+
lastUsedAtFrom?: string;
|
|
65
|
+
lastUsedAtTo?: string;
|
|
66
|
+
};
|
|
67
|
+
export type UpdateAdminApiKeyPayload = {
|
|
68
|
+
name: string;
|
|
69
|
+
expiresAt: string | null;
|
|
70
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CameraStatus, DateType, PaginationParams } from "@evercam/api/types";
|
|
1
|
+
import { CameraStatus, DateType, JsonValue, PaginationParams } from "@evercam/api/types";
|
|
2
2
|
export declare enum AuditLogActionType {
|
|
3
3
|
VH_STATUS = "vh_status",
|
|
4
4
|
CR_UPDATED = "cr_updated",
|
|
@@ -12,7 +12,6 @@ export declare enum AuditLogActionType {
|
|
|
12
12
|
WAITING_FOR_SITE_VISIT = "waiting_for_site_visit",
|
|
13
13
|
SMS = "sms",
|
|
14
14
|
CUSTOM = "custom",
|
|
15
|
-
PUBLIC_NOTE = "public_note",
|
|
16
15
|
SIM = "sim",
|
|
17
16
|
LOGIN = "login",
|
|
18
17
|
LOGOUT = "logout",
|
|
@@ -30,32 +29,176 @@ export declare enum AuditLogActionType {
|
|
|
30
29
|
SHARE_REQUEST = "share_request",
|
|
31
30
|
DELETE_SHARE_REQUEST = "delete_share_request",
|
|
32
31
|
TRANSFER_OWNERSHIP = "transfer_ownership",
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
TRANSFER_PROJECT = "transfer_project",
|
|
33
|
+
ASSIGN = "assign",
|
|
34
|
+
UNASSIGN = "unassign",
|
|
35
|
+
OAUTH_AUTHORIZE = "oauth_authorize",
|
|
36
|
+
OAUTH_TOKEN_ISSUE = "oauth_token_issue",
|
|
37
|
+
OAUTH_TOKEN_REFRESH = "oauth_token_refresh",
|
|
38
|
+
OAUTH_TOKEN_REVOKE = "oauth_token_revoke",
|
|
39
|
+
OAUTH_CLIENT_CREATE = "oauth_client_create",
|
|
40
|
+
OAUTH_CLIENT_DELETE = "oauth_client_delete",
|
|
41
|
+
API_KEY_REGENERATE = "api_key_regenerate",
|
|
42
|
+
API_KEY_REVOKE = "api_key_revoke"
|
|
35
43
|
}
|
|
44
|
+
export declare enum AuditLogEntity {
|
|
45
|
+
Cameras = "cameras",
|
|
46
|
+
Projects = "projects",
|
|
47
|
+
Layers = "layers",
|
|
48
|
+
Routers = "routers",
|
|
49
|
+
Sims = "sims",
|
|
50
|
+
Hdds = "hdds",
|
|
51
|
+
Nvr = "nvr",
|
|
52
|
+
Archives = "archives",
|
|
53
|
+
Users = "users",
|
|
54
|
+
Rois = "rois",
|
|
55
|
+
Kits = "kits",
|
|
56
|
+
Roles = "roles",
|
|
57
|
+
Tags = "tags",
|
|
58
|
+
KitsTags = "kits_tags",
|
|
59
|
+
Oauth = "oauth",
|
|
60
|
+
ApiKeys = "api_keys",
|
|
61
|
+
StorageProviders = "storage_providers"
|
|
62
|
+
}
|
|
63
|
+
export type AuditLogDiff = {
|
|
64
|
+
old: Record<string, JsonValue>;
|
|
65
|
+
new: Record<string, JsonValue>;
|
|
66
|
+
};
|
|
67
|
+
export type AuditLogHddInfoItem = {
|
|
68
|
+
name?: string;
|
|
69
|
+
capacity?: string;
|
|
70
|
+
freeSpace?: string;
|
|
71
|
+
status?: string;
|
|
72
|
+
property?: string;
|
|
73
|
+
};
|
|
74
|
+
export type AuditLogCameraDetails = {
|
|
75
|
+
exid?: string;
|
|
76
|
+
name?: string;
|
|
77
|
+
with?: string;
|
|
78
|
+
errorBody?: string;
|
|
79
|
+
reason?: string;
|
|
80
|
+
settings?: AuditLogDiff;
|
|
81
|
+
};
|
|
82
|
+
export type AuditLogRouterDetails = {
|
|
83
|
+
serialNumber?: string;
|
|
84
|
+
cameraExid?: string;
|
|
85
|
+
cameraName?: string;
|
|
86
|
+
simNumber?: string;
|
|
87
|
+
settings?: AuditLogDiff;
|
|
88
|
+
deviceSettings?: Record<string, JsonValue>;
|
|
89
|
+
};
|
|
90
|
+
export type AuditLogUserEntityDetails = {
|
|
91
|
+
firstname?: string;
|
|
92
|
+
lastname?: string;
|
|
93
|
+
settings?: AuditLogDiff;
|
|
94
|
+
};
|
|
95
|
+
export type AuditLogProjectDetails = {
|
|
96
|
+
exid?: string;
|
|
97
|
+
name?: string;
|
|
98
|
+
settings?: AuditLogDiff;
|
|
99
|
+
};
|
|
100
|
+
export type AuditLogApiKeyDetails = {
|
|
101
|
+
name?: string;
|
|
102
|
+
maskedKey?: string;
|
|
103
|
+
userId?: number;
|
|
104
|
+
};
|
|
105
|
+
export type AuditLogDetails = {
|
|
106
|
+
id?: number;
|
|
107
|
+
exid?: string;
|
|
108
|
+
name?: string;
|
|
109
|
+
displayName?: string;
|
|
110
|
+
layerId?: number;
|
|
111
|
+
serial?: string;
|
|
112
|
+
type?: string;
|
|
113
|
+
note?: string;
|
|
114
|
+
with?: string;
|
|
115
|
+
message?: string;
|
|
116
|
+
config?: Record<string, JsonValue>;
|
|
117
|
+
settings?: AuditLogDiff;
|
|
118
|
+
camera?: AuditLogCameraDetails;
|
|
119
|
+
router?: AuditLogRouterDetails;
|
|
120
|
+
user?: AuditLogUserEntityDetails;
|
|
121
|
+
project?: AuditLogProjectDetails;
|
|
122
|
+
sim?: {
|
|
123
|
+
number?: string;
|
|
124
|
+
};
|
|
125
|
+
kit?: {
|
|
126
|
+
name?: string;
|
|
127
|
+
};
|
|
128
|
+
hdd?: {
|
|
129
|
+
serialNumber?: string;
|
|
130
|
+
settings?: AuditLogDiff;
|
|
131
|
+
};
|
|
132
|
+
roi?: {
|
|
133
|
+
settings?: AuditLogDiff;
|
|
134
|
+
};
|
|
135
|
+
hddInfo?: AuditLogHddInfoItem[];
|
|
136
|
+
oldOwner?: string;
|
|
137
|
+
newOwner?: string;
|
|
138
|
+
oldProjectExid?: string;
|
|
139
|
+
oldProjectName?: string;
|
|
140
|
+
newProjectExid?: string;
|
|
141
|
+
newProjectName?: string;
|
|
142
|
+
fromAdmin?: boolean;
|
|
143
|
+
who?: string;
|
|
144
|
+
email?: string;
|
|
145
|
+
scope?: string;
|
|
146
|
+
resourceId?: string;
|
|
147
|
+
clientId?: string;
|
|
148
|
+
clientName?: string;
|
|
149
|
+
oauthClientId?: string;
|
|
150
|
+
scopes?: string[];
|
|
151
|
+
grantType?: string;
|
|
152
|
+
tokenType?: string;
|
|
153
|
+
maskedKey?: string;
|
|
154
|
+
userId?: number;
|
|
155
|
+
apiKey?: AuditLogApiKeyDetails;
|
|
156
|
+
revoked?: AuditLogApiKeyDetails;
|
|
157
|
+
};
|
|
158
|
+
export declare enum AuditLogAuthMethod {
|
|
159
|
+
Password = "password",
|
|
160
|
+
ApiKeyV2 = "api_key_v2",
|
|
161
|
+
Widget = "widget",
|
|
162
|
+
OauthAccess = "oauth_access",
|
|
163
|
+
Impersonation = "impersonation",
|
|
164
|
+
Sso = "sso"
|
|
165
|
+
}
|
|
166
|
+
export type AuditLogUserDetails = {
|
|
167
|
+
browser: string;
|
|
168
|
+
country: string;
|
|
169
|
+
countryCode: string;
|
|
170
|
+
device: string | null;
|
|
171
|
+
ip: string;
|
|
172
|
+
os: string | null;
|
|
173
|
+
authMethod?: AuditLogAuthMethod;
|
|
174
|
+
apiKeyId?: number;
|
|
175
|
+
apiKeyName?: string;
|
|
176
|
+
apiKeyMasked?: string;
|
|
177
|
+
widgetId?: number;
|
|
178
|
+
oauthClientId?: string;
|
|
179
|
+
impersonatedBy?: string;
|
|
180
|
+
who?: string;
|
|
181
|
+
};
|
|
36
182
|
export type AuditLog = {
|
|
37
183
|
id: number;
|
|
38
184
|
action: AuditLogActionType;
|
|
39
|
-
details:
|
|
185
|
+
details: AuditLogDetails;
|
|
40
186
|
insertedAt: DateType;
|
|
41
|
-
entity:
|
|
42
|
-
|
|
43
|
-
browser: string;
|
|
44
|
-
country: string;
|
|
45
|
-
countryCode: string;
|
|
46
|
-
device: string | null;
|
|
47
|
-
ip: string;
|
|
48
|
-
os: string | null;
|
|
49
|
-
};
|
|
187
|
+
entity: AuditLogEntity;
|
|
188
|
+
userDetails: AuditLogUserDetails;
|
|
50
189
|
who: string;
|
|
51
190
|
};
|
|
52
191
|
export type AuditLogsParams = PaginationParams & {
|
|
53
|
-
routerId: number;
|
|
54
|
-
cameraId: number;
|
|
55
|
-
entity:
|
|
56
|
-
byRouter:
|
|
57
|
-
byCamera:
|
|
58
|
-
byProject:
|
|
192
|
+
routerId: number | null;
|
|
193
|
+
cameraId: number | null;
|
|
194
|
+
entity: AuditLogEntity[] | "";
|
|
195
|
+
byRouter: string;
|
|
196
|
+
byCamera: string;
|
|
197
|
+
byProject: string;
|
|
198
|
+
userId: number;
|
|
199
|
+
byIp: string;
|
|
200
|
+
from: string;
|
|
201
|
+
to: string;
|
|
59
202
|
action: string;
|
|
60
203
|
};
|
|
61
204
|
export type CameraLogsQueryParams = {
|
|
@@ -95,5 +238,20 @@ export type CameraAuditLog = {
|
|
|
95
238
|
export type CameraAuditLogsQueryParams = PaginationParams & {
|
|
96
239
|
from: string;
|
|
97
240
|
to: string;
|
|
98
|
-
action:
|
|
241
|
+
action: string[] | null;
|
|
242
|
+
routerId?: number | null;
|
|
243
|
+
};
|
|
244
|
+
export type CamerasStatusLogsQueryParams = {
|
|
245
|
+
projectId: string;
|
|
246
|
+
status?: CameraStatus[];
|
|
247
|
+
historyDays?: number;
|
|
248
|
+
from: DateType;
|
|
249
|
+
to: DateType;
|
|
250
|
+
};
|
|
251
|
+
export type CameraStatusLogItem = CameraLogItem & {
|
|
252
|
+
status: CameraStatus;
|
|
253
|
+
};
|
|
254
|
+
export type CamerasStatusLog = {
|
|
255
|
+
data: CameraStatusLogItem[];
|
|
256
|
+
measure: string;
|
|
99
257
|
};
|
|
@@ -3,6 +3,10 @@ export declare enum RoleResourceType {
|
|
|
3
3
|
Camera = "camera",
|
|
4
4
|
Project = "project"
|
|
5
5
|
}
|
|
6
|
+
export declare enum RoleAssignmentLogAction {
|
|
7
|
+
Assign = "assign",
|
|
8
|
+
Unassign = "unassign"
|
|
9
|
+
}
|
|
6
10
|
export type RoleSubRole = {
|
|
7
11
|
resourceId: string;
|
|
8
12
|
roleId: number;
|
|
@@ -18,6 +22,7 @@ export type Role = {
|
|
|
18
22
|
resourceId?: string | null;
|
|
19
23
|
permissions: string[];
|
|
20
24
|
subRoles?: RoleSubRole[];
|
|
25
|
+
isDefault?: boolean;
|
|
21
26
|
};
|
|
22
27
|
export type ProjectResourceRole = Role & {
|
|
23
28
|
resourceType: RoleResourceType.Project;
|
|
@@ -58,3 +63,70 @@ export type AuthzScopeCreatePayload = {
|
|
|
58
63
|
export type AuthzScopeUpdatePayload = Partial<AuthzScopeCreatePayload>;
|
|
59
64
|
export declare function isProjectRole(role: Role): role is ProjectResourceRole;
|
|
60
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
|
+
};
|
|
@@ -7,14 +7,42 @@ 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
|
};
|
|
15
36
|
export type AutomationEmailRecipient = string | {
|
|
16
37
|
email: string;
|
|
17
38
|
};
|
|
39
|
+
export type AutomationGateReportConfig = {
|
|
40
|
+
projectExid: string;
|
|
41
|
+
vehicleTypes: string[];
|
|
42
|
+
fileType: string;
|
|
43
|
+
period: number;
|
|
44
|
+
columns: string[];
|
|
45
|
+
};
|
|
18
46
|
export type AutomationEmailProviderConfig = {
|
|
19
47
|
cameraExids?: CameraExid[];
|
|
20
48
|
recipients: string | AutomationEmailRecipient[];
|
|
@@ -42,7 +70,7 @@ export type AutomationAutodeskProviderConfig = {
|
|
|
42
70
|
folderName: string;
|
|
43
71
|
};
|
|
44
72
|
export type AutomationProviderConfig = AutomationEmailProviderConfig | AutomationProcoreProviderConfig | AutomationAconexProviderConfig | AutomationAutodeskProviderConfig;
|
|
45
|
-
export type AutomationOptionsConfig = AutomationCompareConfig | {};
|
|
73
|
+
export type AutomationOptionsConfig = AutomationCompareConfig | AutomationGateReportConfig | AutomationWeatherConfig | {};
|
|
46
74
|
export type AutomationConfig = AutomationProviderConfig & AutomationOptionsConfig;
|
|
47
75
|
export type Automation = {
|
|
48
76
|
id?: number;
|
|
@@ -72,8 +100,17 @@ export type AutomationProviderOption = {
|
|
|
72
100
|
iconSize?: string;
|
|
73
101
|
requiresConnection: boolean;
|
|
74
102
|
};
|
|
103
|
+
export type AutomationTypeOption = {
|
|
104
|
+
labelTranslationKey: string;
|
|
105
|
+
descriptionTranslationKey: string;
|
|
106
|
+
label?: string;
|
|
107
|
+
description?: string;
|
|
108
|
+
value: AutomationType;
|
|
109
|
+
icon: string;
|
|
110
|
+
iconType?: string;
|
|
111
|
+
};
|
|
75
112
|
export type FormattedAutomation = {
|
|
76
|
-
cameraExids
|
|
113
|
+
cameraExids?: string;
|
|
77
114
|
name: string;
|
|
78
115
|
subject: string;
|
|
79
116
|
provider: AutomationProvider;
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import type { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, CancelTokenSource, CancelTokenStatic } from "axios";
|
|
2
2
|
import { Swr } from "@evercam/api/api/client/swr/Swr";
|
|
3
|
-
export type TimedRequest<T> = Promise<AxiosResponse<T> & {
|
|
4
|
-
duration: number;
|
|
5
|
-
error?: AxiosError;
|
|
6
|
-
}>;
|
|
7
3
|
export type AxiosEnvironment = {
|
|
8
4
|
baseUrl?: string | null;
|
|
9
5
|
stagingAiApiUrl?: string | null;
|
|
10
6
|
aiApiUrl?: string | null;
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
ingestDroneApi?: string | null;
|
|
8
|
+
ingest360Api?: string | null;
|
|
13
9
|
ingestGpuApiUrl?: string | null;
|
|
14
10
|
posthogApiUrl?: string | null;
|
|
15
11
|
posthogProjectId?: string | null;
|
|
16
|
-
posthogPrivateApiKey?: string | null;
|
|
17
12
|
firebaseVideowallUrl?: string | null;
|
|
18
13
|
weatherApiBaseUrl?: string | null;
|
|
19
14
|
evercamLabsUrl?: string | null;
|
|
15
|
+
isLabsStaging?: boolean;
|
|
16
|
+
reportsApiUrl?: string | null;
|
|
20
17
|
firebaseDbLink?: string | null;
|
|
21
18
|
firebaseStorageUrl?: string | null;
|
|
22
19
|
firebaseStorageToken?: string | null;
|
|
20
|
+
forgeTokenServerUrl?: string | null;
|
|
23
21
|
snapshotsURL?: string | null;
|
|
24
22
|
app?: string | null;
|
|
25
23
|
getAuthToken?: () => string | null;
|
|
@@ -29,15 +27,18 @@ export type AxiosEnvironment = {
|
|
|
29
27
|
export type RequestInterceptor = (req: AxiosRequestConfig, env: AxiosEnvironment) => AxiosRequestConfig & any;
|
|
30
28
|
export type ResponseInterceptor = (res: AxiosResponse, env: AxiosEnvironment) => AxiosResponse & any;
|
|
31
29
|
export type ErrorInterceptor = (error: any, env: AxiosEnvironment) => any;
|
|
30
|
+
export type RequestManager = {
|
|
31
|
+
createToken: (key: string) => CancelTokenSource["token"];
|
|
32
|
+
cancelToken: (key: string) => void;
|
|
33
|
+
cancelAll: () => void;
|
|
34
|
+
};
|
|
32
35
|
export interface ExtendedAxiosInstance extends AxiosInstance {
|
|
33
36
|
CancelToken: CancelTokenStatic;
|
|
34
37
|
isCancel: (value: AxiosResponse | AxiosError | unknown) => boolean;
|
|
35
38
|
setToken: (token: string) => void;
|
|
36
39
|
setHeader: (headerName: string, value: any) => void;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
resetCancelTokens: () => void;
|
|
40
|
-
cancelRequests: () => void;
|
|
40
|
+
createRequestManager: () => RequestManager;
|
|
41
|
+
requestManager: RequestManager;
|
|
41
42
|
env: AxiosEnvironment;
|
|
42
43
|
addEnvironmentVariables: (vars: Record<string, any>) => void;
|
|
43
44
|
addRequestInterceptor: (interceptor: RequestInterceptor, errorInterceptor?: ErrorInterceptor) => void;
|