@evercam/api 1.0.0-1b8a09aec → 1.0.0-20348a04c
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 +9 -0
- package/dist/api/api/adminApi.d.ts +24 -4
- package/dist/api/api/aiApi.d.ts +2 -2
- 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 +13 -5
- package/dist/api/types/360.d.ts +5 -0
- package/dist/api/types/analytics.d.ts +9 -0
- package/dist/api/types/axios.d.ts +14 -0
- package/dist/api/types/camera.d.ts +7 -3
- package/dist/api/types/comments.d.ts +18 -2
- package/dist/api/types/company.d.ts +1 -1
- package/dist/api/types/countries.d.ts +0 -7
- package/dist/api/types/detections.d.ts +1 -2
- package/dist/api/types/index.d.ts +1 -0
- package/dist/api/types/kit.d.ts +34 -7
- package/dist/api/types/progressPhoto.d.ts +20 -8
- package/dist/api/types/project.d.ts +1 -0
- package/dist/api/types/shared.d.ts +1 -6
- package/dist/api/types/siteAnalytics.d.ts +3 -2
- package/dist/api/types/sso.d.ts +55 -0
- package/dist/api/types/streaming.d.ts +1 -2
- package/dist/index.js +826 -586
- 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 +8 -0
- package/package.json +3 -2
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { _360ProjectJsonResponse, DroneProjectJsonResponse, ProjectExid } from "@evercam/api/types";
|
|
2
2
|
export declare const getFirebaseDbApi: () => string | null | undefined;
|
|
3
|
+
export declare const getFirebaseStorageUrl: () => string | null | undefined;
|
|
4
|
+
export declare const getFirebaseStorageToken: () => string | null | undefined;
|
|
3
5
|
export declare const _3dFirebaseApi: {
|
|
4
6
|
drone: {
|
|
5
7
|
getProjectInfo(projectExid: ProjectExid): Promise<DroneProjectJsonResponse>;
|
|
@@ -7,5 +9,12 @@ export declare const _3dFirebaseApi: {
|
|
|
7
9
|
_360: {
|
|
8
10
|
getProjectInfo(projectExid: ProjectExid): Promise<_360ProjectJsonResponse>;
|
|
9
11
|
updateFloor(projectExid: ProjectExid, dateId: string, floorIndex: string, body: any): Promise<_360ProjectJsonResponse>;
|
|
12
|
+
updateRoute(projectExid: ProjectExid, dateId: string, floorIndex: string, body: any): Promise<any>;
|
|
13
|
+
updateFeatureFlag(projectID: string, dateID: string, floorID: string, featureFlagName: string, value: boolean): Promise<any>;
|
|
14
|
+
saveSteps(projectID: string, dateID: string, floorID: string, stepsValue: number): Promise<any>;
|
|
15
|
+
updateGPXFile(projectExid: ProjectExid, dateId: string, floorIndex: string, gpxContent: any): Promise<any>;
|
|
16
|
+
};
|
|
17
|
+
forge: {
|
|
18
|
+
getProjectInfo(projectExid: ProjectExid): Promise<any>;
|
|
10
19
|
};
|
|
11
20
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FootageCreateUpdatePayload, HDDCreateUpdatePayload, HDDsQueryParams } from "@/types/hdd";
|
|
2
|
-
import type { CamerasResponsePayload, CameraUpdateRequestPayload, PaginatedItems, AdminCamera, Project, Hdd, AdminUser, ProgressPhotosCreateUpdateRequestPayload,
|
|
2
|
+
import type { CamerasResponsePayload, CameraUpdateRequestPayload, PaginatedItems, AdminCamera, Project, Hdd, AdminUser, ProgressPhotosCreateUpdateRequestPayload, Kit, PatchPayload, StorageServersResponsePayload, MediaFilterQueryParams, Media, MediaDeleteRequestPayload, AuditLogsParams, AuditLog, SnapshotExtractionQyeryParams, SnapshotExtraction, CameraCreateRequestPayload, CameraDeletePayload, SnapshotTestPayload, SnapshotTestResponse, DuplicatedCameraFields, DuplicatedCameraResponse, MergeDuplicatedCameraPayload, FetchCameraQueryParams, DeleteSnapshotQueryParams, SaveNotePayload, CameraNote, CreateCameraNotePayload, CompanyQueryParams, Company, CompanyUpdatePayload, SsoProvider, SsoUpdatePayload, SsoCreatePayload, SuppressionsQueryParams, Suppression, SnapshotExtractionType, KitQueryParams, KitCreatePayload, AdminKit, CameraLogsQueryParams, CameraLog, CameraAuditLogsQueryParams, CameraAuditLog, NvrQueryParams, Nvr, SiteVisitCamerasQueryParams, OfflineCameraQueryParams, OfflineCamera, OfflineCameraNoteResponse, UserStatsResponse, UserCameraResponse, UserProjectResponse, ProjectUsers, ProjectCamera, ProjectsQueryParams, ProjectStatusStats, ProjectCreateRequestPayload, ProjectCreateResponse, ProjectUpdateRequestPayload, RouterQueryParams, Router, RouterCreatePayload, GlobalSearchQueryParams, CameraShareRequestsQueryParams, CameraShareRequest, CameraShareRequestPayload, ShareCreateResponsePayload, ShareQueryParams, AdminShare, SimCreateUpdatePayload, SimsQueryParams, Sim, SendSmsPayload, SendSmsResponse, SmsHistoryResponse, SmsQueryParams, Sms, ProgressPhotosQueryParams, ProgressPhotoItem, progressPhotosHistoryQueryParams, ProgressPhotosHistory, AdminUserUpdateRequestPayload, AdminQueryParams, Admin, ImpersonateUserResponse, AdminUserQueryParams, AdminCompareQueryParams, AdminCompare, NvrCreatePayload, WidgetsListRequestPayload, Widget, WidgetFull, WidgetPayload, PaginationParams, KitStorageRequestPayload, CompanyUser, CompanyProject, Automation, KitStorage, KitFootageRequestPayload, CommentsListRequestPayload, Comment, KitFootage, KitAlarmItem } from "@evercam/api/types";
|
|
3
3
|
import { KitMetricId } from "@evercam/api/types";
|
|
4
4
|
import { Tag } from "@/types/tag";
|
|
5
5
|
export declare const AdminApi: {
|
|
@@ -62,9 +62,10 @@ export declare const AdminApi: {
|
|
|
62
62
|
message: string;
|
|
63
63
|
}>;
|
|
64
64
|
update(cameraId: string, params: CameraUpdateRequestPayload): Promise<CamerasResponsePayload>;
|
|
65
|
+
transferOwnership(cameraId: string, newOwnerId: number): Promise<void>;
|
|
65
66
|
};
|
|
66
67
|
companies: {
|
|
67
|
-
show(id: string): Promise<Company>;
|
|
68
|
+
show(id: string, params: Object): Promise<Company>;
|
|
68
69
|
getCompanyUsers(id: string, params: {
|
|
69
70
|
params: {
|
|
70
71
|
page: number;
|
|
@@ -100,6 +101,16 @@ export declare const AdminApi: {
|
|
|
100
101
|
success: true;
|
|
101
102
|
}>;
|
|
102
103
|
};
|
|
104
|
+
sso: {
|
|
105
|
+
getProviders(params: {
|
|
106
|
+
params: PaginationParams;
|
|
107
|
+
}): Promise<SsoProvider[]>;
|
|
108
|
+
updateProvider(id: string, params: SsoUpdatePayload): Promise<SsoProvider>;
|
|
109
|
+
createProvider(params: SsoCreatePayload): Promise<SsoProvider>;
|
|
110
|
+
deleteProviders(ids: string[]): Promise<{
|
|
111
|
+
success: true;
|
|
112
|
+
}>;
|
|
113
|
+
};
|
|
103
114
|
emailing: {
|
|
104
115
|
performEmailing(template: string, params: Record<string, unknown>): Promise<import("axios").AxiosResponse<any, any>>;
|
|
105
116
|
suppressions(params: {
|
|
@@ -138,7 +149,11 @@ export declare const AdminApi: {
|
|
|
138
149
|
detachTag(kitId: number, tagId: number): Promise<void>;
|
|
139
150
|
getStorages(params: {
|
|
140
151
|
params: KitStorageRequestPayload;
|
|
141
|
-
}): Promise<PaginatedItems<
|
|
152
|
+
}): Promise<PaginatedItems<KitStorage[]>>;
|
|
153
|
+
getFootage(id: number, params?: {
|
|
154
|
+
params?: KitFootageRequestPayload;
|
|
155
|
+
}): Promise<KitFootage[]>;
|
|
156
|
+
getAlarms(kitId: number): Promise<KitAlarmItem[]>;
|
|
142
157
|
};
|
|
143
158
|
logs: {
|
|
144
159
|
getAllCamerasStatusLogs(params: {
|
|
@@ -285,7 +300,7 @@ export declare const AdminApi: {
|
|
|
285
300
|
}): Promise<{
|
|
286
301
|
progressPhoto: string;
|
|
287
302
|
}>;
|
|
288
|
-
update(id: string, payload: ProgressPhotosCreateUpdateRequestPayload): Promise<
|
|
303
|
+
update(id: string, payload: ProgressPhotosCreateUpdateRequestPayload): Promise<Automation>;
|
|
289
304
|
};
|
|
290
305
|
tags: {
|
|
291
306
|
index(): Promise<Tag[]>;
|
|
@@ -331,4 +346,9 @@ export declare const AdminApi: {
|
|
|
331
346
|
zohoDesk: {
|
|
332
347
|
searchTickets(params: Record<string, unknown>): Promise<import("axios").AxiosResponse<any, any>>;
|
|
333
348
|
};
|
|
349
|
+
comments: {
|
|
350
|
+
index(params: {
|
|
351
|
+
params: Partial<CommentsListRequestPayload>;
|
|
352
|
+
}): Promise<PaginatedItems<Comment>>;
|
|
353
|
+
};
|
|
334
354
|
};
|
package/dist/api/api/aiApi.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnprQueryParams, AnprEvent, EventCountRequestPayload, EventCountResponsePayload, EventsExportRequestParameters, EventsRequestPayload, EventsResponsePayload, GateReportROI, PaginatedItems, GateReportVerifiedDay, ProjectExid, CameraExid, AnprCountsQueryParams, AnprCount, AnprBasedGateReportExportRequestParams, GateReportResponsePayload, GatReportRequestPayload, AnalyticsParameters, VerifiedDaysQueryParams, EventUpdateRequestPayload, VerifyDayUpdateRequestPayload, ProcessedDaysQueryParams, GateReportEventType, DateTime, RoisQueryParams, GateReportROICreateRequestPayload, SegmentsSimilaritySearchParams, DetectionsFilters, TrackingsByLabel, SegmentsByLabel, DetectionsCountsParams, DetectionsPresenceByLabel, SmartSearchQueryParams, SavedQuery, DateType, DetectionsRequestParams, DetectionsGroup, DetectionsCountsByPeriod, DetectionsExportRequestParams, SegmentsFilters,
|
|
1
|
+
import { AnprQueryParams, AnprEvent, EventCountRequestPayload, EventCountResponsePayload, EventsExportRequestParameters, EventsRequestPayload, EventsResponsePayload, GateReportROI, PaginatedItems, GateReportVerifiedDay, ProjectExid, CameraExid, AnprCountsQueryParams, AnprCount, AnprBasedGateReportExportRequestParams, GateReportResponsePayload, GatReportRequestPayload, AnalyticsParameters, VerifiedDaysQueryParams, EventUpdateRequestPayload, VerifyDayUpdateRequestPayload, ProcessedDaysQueryParams, GateReportEventType, DateTime, RoisQueryParams, GateReportROICreateRequestPayload, SegmentsSimilaritySearchParams, DetectionsFilters, TrackingsByLabel, SegmentsByLabel, DetectionsCountsParams, DetectionsPresenceByLabel, SmartSearchQueryParams, SavedQuery, DateType, DetectionsRequestParams, DetectionsGroup, DetectionsCountsByPeriod, DetectionsExportRequestParams, SegmentsFilters, DownloadFileType, SmartSearchQuery, Schedule } from "@evercam/api/types";
|
|
2
2
|
import type { AxiosPromise, AxiosRequestConfig } from "axios";
|
|
3
3
|
import { CreateCoolifyAppRequestPayload, SaveCoolifyAppRequestPayload } from "@/types/coolify";
|
|
4
4
|
export declare const getAiApiUrl: () => string | null | undefined;
|
|
@@ -110,7 +110,7 @@ export declare const AiApi: {
|
|
|
110
110
|
fromDate?: DateType;
|
|
111
111
|
toDate?: DateType;
|
|
112
112
|
query: string;
|
|
113
|
-
fileType:
|
|
113
|
+
fileType: DownloadFileType;
|
|
114
114
|
directDownload?: boolean;
|
|
115
115
|
payload: {
|
|
116
116
|
req: SmartSearchQuery;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from "axios";
|
|
2
|
+
import { ExtendedAxiosInstance, ResponseValue } from "@/types";
|
|
3
|
+
export declare class Swr {
|
|
4
|
+
private axiosInstance;
|
|
5
|
+
private store;
|
|
6
|
+
constructor({ key, axiosInstance, }: {
|
|
7
|
+
key: string;
|
|
8
|
+
axiosInstance: ExtendedAxiosInstance;
|
|
9
|
+
});
|
|
10
|
+
get<T = any>(url: string, config?: AxiosRequestConfig): Promise<ResponseValue<T>>;
|
|
11
|
+
private getCachedValue;
|
|
12
|
+
private getFreshValue;
|
|
13
|
+
clear(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from "axios";
|
|
2
|
+
export declare class SwrStore {
|
|
3
|
+
private prefix;
|
|
4
|
+
constructor(prefix: string);
|
|
5
|
+
generateKey(config: AxiosRequestConfig): string;
|
|
6
|
+
get(key: string): Promise<any>;
|
|
7
|
+
set(key: string, value: unknown): Promise<void>;
|
|
8
|
+
delete(key: string): Promise<void>;
|
|
9
|
+
clear(): Promise<void>;
|
|
10
|
+
}
|
|
@@ -10,6 +10,13 @@ export declare const EvercamApi: {
|
|
|
10
10
|
features: string[];
|
|
11
11
|
}>;
|
|
12
12
|
impersonationLogin(token: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
13
|
+
fetchLoginOptions(email: string): Promise<{
|
|
14
|
+
options: any[];
|
|
15
|
+
}>;
|
|
16
|
+
fetchSignupOptions(email: string): Promise<{
|
|
17
|
+
options: any[];
|
|
18
|
+
}>;
|
|
19
|
+
fetchProviderConfig(provider: string): Promise<any>;
|
|
13
20
|
login(params: LoginRequestPayload): Promise<LoginResponsePayload>;
|
|
14
21
|
loginWithApiCredentials(apiId: String, apiKey: String): Promise<LoginResponsePayload>;
|
|
15
22
|
loginWithWidgetCredentials(widgetId: String, widgetKey: String): Promise<LoginResponsePayload>;
|
|
@@ -56,7 +63,8 @@ export declare const EvercamApi: {
|
|
|
56
63
|
};
|
|
57
64
|
cameras: {
|
|
58
65
|
getCameras(params: {
|
|
59
|
-
params
|
|
66
|
+
params?: Partial<FetchCameraQueryParams>;
|
|
67
|
+
config?: AxiosRequestConfig;
|
|
60
68
|
}): Promise<CamerasResponsePayload>;
|
|
61
69
|
getCameraById(cameraId: string, params?: ApiCredentials): Promise<CamerasResponsePayload>;
|
|
62
70
|
getCameraLastPublicNote(cameraId: string): Promise<CameraLogsResponsePayload>;
|
|
@@ -78,7 +86,10 @@ export declare const EvercamApi: {
|
|
|
78
86
|
updateCamera(exid: string, params: CameraUpdateRequestPayload): Promise<CamerasResponsePayload>;
|
|
79
87
|
};
|
|
80
88
|
projects: {
|
|
81
|
-
index(params
|
|
89
|
+
index({ params, config, }: {
|
|
90
|
+
params?: ApiCredentials;
|
|
91
|
+
config: AxiosRequestConfig;
|
|
92
|
+
}): Promise<ProjectResponsePayload>;
|
|
82
93
|
getLogos(projectId: string): Promise<ProjectLogoResponsePayload>;
|
|
83
94
|
createLogo(projectId: string, formData: FormData): Promise<Logo & {
|
|
84
95
|
id: number;
|
|
@@ -229,9 +240,6 @@ export declare const EvercamApi: {
|
|
|
229
240
|
cCreate(cameraId: string, payload: ShareCreateRequestPayload): Promise<ShareCreateResponsePayload>;
|
|
230
241
|
shareProjectCameras(projectExid: ProjectExid, payload: ShareProjectCamerasRequestPayload): Promise<import("axios").AxiosResponse<any, any>>;
|
|
231
242
|
getShareRequestByKey(key: string): Promise<Pick<ShareCreateResponsePayload, "shareRequests">>;
|
|
232
|
-
transferOwnership(cameraId: string, payload: {
|
|
233
|
-
userId: number;
|
|
234
|
-
}): Promise<void>;
|
|
235
243
|
resendShareRequest(cameraId: string, data: ResendShareRequestPayload): Promise<void>;
|
|
236
244
|
getProjectShares(exid: string): Promise<ProjectShareResponse>;
|
|
237
245
|
updateUserRestriction(projectExid: ProjectExid, payload: UpdateUserRestrictionPayload): Promise<import("axios").AxiosResponse<any, any>>;
|
package/dist/api/types/360.d.ts
CHANGED
|
@@ -52,6 +52,11 @@ export declare enum _360IntergrationType {
|
|
|
52
52
|
HoloBuilder = "Holobuilder",
|
|
53
53
|
DroneDeploy = "Dronedeploy"
|
|
54
54
|
}
|
|
55
|
+
export declare enum PathMarkerColor {
|
|
56
|
+
Start = "#00e74c",
|
|
57
|
+
End = "#fd7567",
|
|
58
|
+
Default = "#2196F3"
|
|
59
|
+
}
|
|
55
60
|
export type _360AssetsQueryParams = {
|
|
56
61
|
page: number;
|
|
57
62
|
limit: number;
|
|
@@ -386,12 +386,14 @@ export declare enum AnalyticsEvent {
|
|
|
386
386
|
ProgressPhotoPause = "ProgressPhoto-Pause",
|
|
387
387
|
ProgressPhotoResume = "ProgressPhoto-Resume",
|
|
388
388
|
ProgressPhotoResumeDelete = "ProgressPhoto-ResumeDelete",
|
|
389
|
+
ProgressPhotoSelectType = "ProgressPhoto-SelectType",
|
|
389
390
|
ProgressPhotoSelectCameras = "ProgressPhoto-SelectCameras",
|
|
390
391
|
ProgressPhotoSelectDays = "ProgressPhoto-SelectDays",
|
|
391
392
|
ProgressPhotoSelectMember = "ProgressPhoto-SelectMember",
|
|
392
393
|
ProgressPhotoSelectProvider = "ProgressPhoto-SelectProvider",
|
|
393
394
|
ProgressPhotoSelectTime = "ProgressPhoto-SelectTime",
|
|
394
395
|
ProgressPhotoSelectTimezone = "ProgressPhoto-SelectTimezone",
|
|
396
|
+
ProgressPhotoSelectDelay = "ProgressPhoto-SelectDelay",
|
|
395
397
|
ProgressPhotoToggleCreateDialog = "ProgressPhoto-ToggleCreateDialog",
|
|
396
398
|
ProgressPhotoToggleEditDialog = "ProgressPhoto-ToggleEditDialog",
|
|
397
399
|
ProgressPhotoUnsubscribeUser = "ProgressPhoto-UnsubscribeUser",
|
|
@@ -455,6 +457,13 @@ export declare enum AnalyticsEvent {
|
|
|
455
457
|
HelpMenuClickUserManuaLink = "HelpMenu-ClickUserManuaLink",
|
|
456
458
|
HelpMenuClickSupportTicketsLink = "HelpMenu-ClickSupportTicketsLink",
|
|
457
459
|
HelpMenuClickSystemCheckLink = "HelpMenu-ClickSystemCheckLink",
|
|
460
|
+
Recording = "Recording",
|
|
461
|
+
CameraFilter = "CameraFilter",
|
|
462
|
+
MissingEquipmentHardHat = "MissingEquipment-HardHat",
|
|
463
|
+
MissingEquipmentHighVisibilityVest = "MissingEquipment-HighVisibilityVest",
|
|
464
|
+
MissingEquipmentSafetyGlasses = "MissingEquipment-SafetyGlasses",
|
|
465
|
+
MissingEquipmentSafetyGloves = "MissingEquipment-SafteyGLoves",
|
|
466
|
+
ExportAs = "ExportAs",
|
|
458
467
|
ExportPdf = "ExportPdf",
|
|
459
468
|
ExportCsv = "ExportCsv",
|
|
460
469
|
FilterCameras = "FilterCameras",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, CancelTokenSource, CancelTokenStatic } from "axios";
|
|
2
|
+
import { Swr } from "@/api/client/swr/Swr";
|
|
2
3
|
export type TimedRequest<T> = Promise<AxiosResponse<T> & {
|
|
3
4
|
duration: number;
|
|
4
5
|
error?: AxiosError;
|
|
@@ -16,10 +17,13 @@ export type AxiosEnvironment = {
|
|
|
16
17
|
weatherApiBaseUrl?: string | null;
|
|
17
18
|
evercamLabsUrl?: string | null;
|
|
18
19
|
firebaseDbLink?: string | null;
|
|
20
|
+
firebaseStorageUrl?: string | null;
|
|
21
|
+
firebaseStorageToken?: string | null;
|
|
19
22
|
snapshotsURL?: string | null;
|
|
20
23
|
app?: string | null;
|
|
21
24
|
getAuthToken?: () => string | null;
|
|
22
25
|
errorLogger?: (error: AxiosError) => void;
|
|
26
|
+
swrKey?: string;
|
|
23
27
|
};
|
|
24
28
|
export type RequestInterceptor = (req: AxiosRequestConfig, env: AxiosEnvironment) => AxiosRequestConfig & any;
|
|
25
29
|
export type ResponseInterceptor = (res: AxiosResponse, env: AxiosEnvironment) => AxiosResponse & any;
|
|
@@ -38,7 +42,13 @@ export interface ExtendedAxiosInstance extends AxiosInstance {
|
|
|
38
42
|
addRequestInterceptor: (interceptor: RequestInterceptor, errorInterceptor?: ErrorInterceptor) => void;
|
|
39
43
|
addResponseInterceptor: (interceptor: ResponseInterceptor, errorInterceptor?: ErrorInterceptor) => void;
|
|
40
44
|
addErrorInterceptor: (interceptor: ErrorInterceptor) => void;
|
|
45
|
+
swr: Swr;
|
|
41
46
|
}
|
|
47
|
+
export type ResponseValue<T> = T | undefined;
|
|
48
|
+
export type SwrResponse<T> = {
|
|
49
|
+
cachedValue: ResponseValue<T>;
|
|
50
|
+
freshPromise: Promise<ResponseValue<T>>;
|
|
51
|
+
};
|
|
42
52
|
declare module "axios" {
|
|
43
53
|
interface AxiosRequestConfig {
|
|
44
54
|
raw?: boolean;
|
|
@@ -47,5 +57,9 @@ declare module "axios" {
|
|
|
47
57
|
_metadata?: {
|
|
48
58
|
startTime: number;
|
|
49
59
|
};
|
|
60
|
+
swr?: boolean;
|
|
61
|
+
onSwrHit?: <T>(data: T) => unknown;
|
|
62
|
+
onSwrRefresh?: <T>(data: T) => unknown;
|
|
63
|
+
onSwrError?: (error: Error) => unknown;
|
|
50
64
|
}
|
|
51
65
|
}
|
|
@@ -17,7 +17,7 @@ export type Camera = {
|
|
|
17
17
|
storageDuration: string;
|
|
18
18
|
};
|
|
19
19
|
createdAt: DateTime_Z_micros;
|
|
20
|
-
description: null;
|
|
20
|
+
description: string | null;
|
|
21
21
|
discoverable: boolean;
|
|
22
22
|
external: {
|
|
23
23
|
host: string;
|
|
@@ -62,7 +62,7 @@ export type Camera = {
|
|
|
62
62
|
offlineReason: string;
|
|
63
63
|
owned: boolean;
|
|
64
64
|
owner: string;
|
|
65
|
-
pitch: null;
|
|
65
|
+
pitch: string | null;
|
|
66
66
|
project: {
|
|
67
67
|
id: string;
|
|
68
68
|
name: string;
|
|
@@ -73,7 +73,7 @@ export type Camera = {
|
|
|
73
73
|
};
|
|
74
74
|
ptz: boolean;
|
|
75
75
|
rights: string;
|
|
76
|
-
roll: null;
|
|
76
|
+
roll: string | null;
|
|
77
77
|
routerId: number;
|
|
78
78
|
status: CameraStatus;
|
|
79
79
|
streamingServer: string;
|
|
@@ -518,3 +518,7 @@ export type FetchCameraQueryParams = PaginationParams & {
|
|
|
518
518
|
externalRsptPort: string;
|
|
519
519
|
nvrHttpPort: string;
|
|
520
520
|
};
|
|
521
|
+
export declare enum BimType {
|
|
522
|
+
TwoD = "2D",
|
|
523
|
+
Forge = "Forge"
|
|
524
|
+
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { CameraExid, DateType, ProjectExid } from "@/types";
|
|
1
|
+
import { CameraExid, DateType, ProjectExid, PaginationParams } from "@/types";
|
|
2
2
|
export declare enum CommentsScope {
|
|
3
3
|
Recordings = "recordings",
|
|
4
|
-
ThreeSixty = "360"
|
|
4
|
+
ThreeSixty = "360",
|
|
5
|
+
Drone = "drone"
|
|
6
|
+
}
|
|
7
|
+
export declare enum CommentsLabel {
|
|
8
|
+
Info = "Info",
|
|
9
|
+
Danger = "Danger",
|
|
10
|
+
Restricted = "Restricted"
|
|
5
11
|
}
|
|
6
12
|
export type CommentsRequestPayload = {
|
|
7
13
|
cameraExid: CameraExid;
|
|
@@ -11,6 +17,16 @@ export type CommentsRequestPayload = {
|
|
|
11
17
|
page?: number;
|
|
12
18
|
limit?: number;
|
|
13
19
|
};
|
|
20
|
+
export type CommentsListRequestPayload = PaginationParams & {
|
|
21
|
+
projectExid?: ProjectExid;
|
|
22
|
+
cameraExid?: CameraExid;
|
|
23
|
+
fromDate?: string;
|
|
24
|
+
toDate?: string;
|
|
25
|
+
scope?: CommentsScope;
|
|
26
|
+
creatorEmail?: string;
|
|
27
|
+
content?: string;
|
|
28
|
+
includeArchived?: boolean;
|
|
29
|
+
};
|
|
14
30
|
export type Comment = {
|
|
15
31
|
fromDate?: string;
|
|
16
32
|
toDate?: string;
|
|
@@ -490,13 +490,6 @@ export declare enum CountryCode {
|
|
|
490
490
|
Zambia = "zm",
|
|
491
491
|
Zimbabwe = "zw"
|
|
492
492
|
}
|
|
493
|
-
export declare enum Region {
|
|
494
|
-
Apac = "apac",
|
|
495
|
-
Emea = "emea",
|
|
496
|
-
Us = "us",
|
|
497
|
-
Latam = "latam",
|
|
498
|
-
Na = "na"
|
|
499
|
-
}
|
|
500
493
|
export declare enum CameraRegion {
|
|
501
494
|
APAC = "apac",
|
|
502
495
|
AU = "au",
|
|
@@ -113,7 +113,6 @@ export declare enum PpeLabel {
|
|
|
113
113
|
Helmet = "helmet",
|
|
114
114
|
HighVisibilityVest = "high-visibility-vest",
|
|
115
115
|
SafetyGlasses = "safety-glasses",
|
|
116
|
-
Gloves = "gloves",
|
|
117
116
|
Person = "person",
|
|
118
117
|
Man = "man",
|
|
119
118
|
Woman = "woman"
|
|
@@ -121,7 +120,7 @@ export declare enum PpeLabel {
|
|
|
121
120
|
export declare enum DetectionModel {
|
|
122
121
|
Yolov10 = 1,
|
|
123
122
|
Yolov11 = 2,
|
|
124
|
-
|
|
123
|
+
Yolov112 = 3,
|
|
125
124
|
GroundingDino = 4,
|
|
126
125
|
Owlv2 = 5
|
|
127
126
|
}
|
package/dist/api/types/kit.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CountryCode, CountryId, DateTime, DateType, Nvr, PaginationParams, PowerType, Project,
|
|
1
|
+
import { CameraExid, CountryCode, CountryId, DateTime, DateType, Nvr, PaginationParams, PowerType, Project, Router, Schedule, Tag } from "@/types";
|
|
2
2
|
export type Kit = {
|
|
3
3
|
alarms: KitAlarm[];
|
|
4
4
|
countryCode: CountryCode;
|
|
5
5
|
countryId: CountryId;
|
|
6
6
|
countryName: string;
|
|
7
|
-
countryRegion:
|
|
7
|
+
countryRegion: KitRegion;
|
|
8
8
|
id?: number;
|
|
9
9
|
jobId: number;
|
|
10
10
|
name: string;
|
|
@@ -17,6 +17,8 @@ export type Kit = {
|
|
|
17
17
|
status: KitStatus;
|
|
18
18
|
powerSchedule: Schedule;
|
|
19
19
|
tags: Tag[];
|
|
20
|
+
storages: KitStorage[];
|
|
21
|
+
createdAt: string;
|
|
20
22
|
};
|
|
21
23
|
export declare enum KitStatus {
|
|
22
24
|
New = "new",
|
|
@@ -24,18 +26,24 @@ export declare enum KitStatus {
|
|
|
24
26
|
Deployed = "deployed",
|
|
25
27
|
Decommissioned = "decommissioned"
|
|
26
28
|
}
|
|
29
|
+
export declare enum KitRegion {
|
|
30
|
+
APAC = "apac",
|
|
31
|
+
EMEA = "emea",
|
|
32
|
+
LATAM = "latam",
|
|
33
|
+
US = "na"
|
|
34
|
+
}
|
|
27
35
|
export declare enum KitAlarm {
|
|
28
36
|
NvrOffline = "nvr_offline",
|
|
37
|
+
OfflineScheduled = "offline_scheduled",
|
|
29
38
|
UnknownCamera = "unknown_camera",
|
|
30
39
|
NotRecordingCamera = "not_recording_camera",
|
|
31
|
-
OfflineScheduled = "offline_scheduled",
|
|
32
40
|
FullSD = "full_sd",
|
|
33
41
|
FullStorage = "full_storage",
|
|
34
42
|
HddUnmounted = "hdd_unmounted",
|
|
35
43
|
NoHdd = "no_hdd",
|
|
36
44
|
MissingRouterInfo = "missing_router_info",
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
AcFailure = "ac_failure",
|
|
46
|
+
LowBattery = "low_battery"
|
|
39
47
|
}
|
|
40
48
|
export declare enum KitMetricId {
|
|
41
49
|
SolarCharger = "solar_charger",
|
|
@@ -292,7 +300,7 @@ export type KitCreatePayload = {
|
|
|
292
300
|
status: KitStatus;
|
|
293
301
|
powerType: PowerType;
|
|
294
302
|
config: {
|
|
295
|
-
region:
|
|
303
|
+
region: KitRegion;
|
|
296
304
|
};
|
|
297
305
|
};
|
|
298
306
|
export type KitUpdatePayload = {
|
|
@@ -310,7 +318,7 @@ export declare enum KitStorageTransport {
|
|
|
310
318
|
export type KitStorageRequestPayload = {
|
|
311
319
|
kitId: number;
|
|
312
320
|
};
|
|
313
|
-
export type
|
|
321
|
+
export type KitStorage = {
|
|
314
322
|
id: number;
|
|
315
323
|
serial: string;
|
|
316
324
|
status: string;
|
|
@@ -324,5 +332,24 @@ export type KitStorageResponsePayload = {
|
|
|
324
332
|
vendor: string;
|
|
325
333
|
kitId: number;
|
|
326
334
|
capacity: number;
|
|
335
|
+
freeSpace: number;
|
|
327
336
|
tran: KitStorageTransport;
|
|
328
337
|
};
|
|
338
|
+
export type KitFootageRequestPayload = {
|
|
339
|
+
cameraId: CameraExid;
|
|
340
|
+
storageId: number;
|
|
341
|
+
};
|
|
342
|
+
export type KitFootage = {
|
|
343
|
+
id: number;
|
|
344
|
+
startDate: string;
|
|
345
|
+
endDate: string;
|
|
346
|
+
cameraId: number;
|
|
347
|
+
storageId: number;
|
|
348
|
+
};
|
|
349
|
+
export type KitAlarmItem = {
|
|
350
|
+
id: number;
|
|
351
|
+
kitId: number;
|
|
352
|
+
alarm: KitAlarm;
|
|
353
|
+
startDate: DateTime;
|
|
354
|
+
endDate: DateTime | null;
|
|
355
|
+
};
|
|
@@ -1,31 +1,43 @@
|
|
|
1
|
-
import { DateTime, DateType, PaginationParams } from "@/types";
|
|
2
|
-
export type
|
|
1
|
+
import { AutomationType, DateTime, DateType, PaginationParams } from "@/types";
|
|
2
|
+
export type Automation = {
|
|
3
|
+
name?: string;
|
|
3
4
|
cameraIds: string;
|
|
4
5
|
cameraNames: number;
|
|
6
|
+
cameraExids?: string[];
|
|
5
7
|
createdAt: string;
|
|
6
8
|
id: number;
|
|
7
9
|
provider: string;
|
|
8
|
-
type:
|
|
10
|
+
type: AutomationType;
|
|
9
11
|
config: Partial<{
|
|
10
|
-
recipients: string;
|
|
11
|
-
projectId: number;
|
|
12
|
+
recipients: string | Record<string, string>[];
|
|
12
13
|
companyId: number;
|
|
14
|
+
compareDelay: number;
|
|
15
|
+
categoryId: string;
|
|
16
|
+
hubId: string;
|
|
17
|
+
folderId: string;
|
|
18
|
+
projectId: number;
|
|
13
19
|
}>;
|
|
14
20
|
isPaused: boolean;
|
|
15
|
-
notifyDays: string;
|
|
21
|
+
notifyDays: string | string[];
|
|
16
22
|
notifyTime: string;
|
|
17
23
|
requesterEmail: string;
|
|
18
24
|
requesterName: string;
|
|
19
25
|
timezone: string;
|
|
20
26
|
title: string;
|
|
27
|
+
compareDelay?: number;
|
|
28
|
+
selectedProvider?: string;
|
|
29
|
+
restrictedCameraExids?: string[];
|
|
30
|
+
recipients?: string | string[];
|
|
21
31
|
};
|
|
22
32
|
export type ProgressPhotosCreateUpdateRequestPayload = {
|
|
23
33
|
cameraExids?: string;
|
|
24
34
|
notifyDays?: string;
|
|
35
|
+
compareDelay?: AutomationType;
|
|
25
36
|
notifyTime?: string;
|
|
26
37
|
provider?: string;
|
|
27
38
|
type?: string;
|
|
28
39
|
config?: {
|
|
40
|
+
compareDelay?: AutomationType;
|
|
29
41
|
recipients?: string;
|
|
30
42
|
projectId?: number;
|
|
31
43
|
companyId?: number;
|
|
@@ -40,9 +52,9 @@ export type ProgressPhotosUnSubscribeParams = {
|
|
|
40
52
|
token?: string;
|
|
41
53
|
};
|
|
42
54
|
export type ProgressPhotosResponsePayload = {
|
|
43
|
-
progressPhotos:
|
|
55
|
+
progressPhotos: Automation[];
|
|
44
56
|
};
|
|
45
|
-
export declare enum
|
|
57
|
+
export declare enum AutomationDialogType {
|
|
46
58
|
Create = "create",
|
|
47
59
|
Edit = "edit",
|
|
48
60
|
Pause = "pause"
|
|
@@ -90,11 +90,6 @@ export declare enum _3dViewer {
|
|
|
90
90
|
Itwin = "itwin",
|
|
91
91
|
Cesium = "cesium"
|
|
92
92
|
}
|
|
93
|
-
export declare enum SsoProvider {
|
|
94
|
-
Microsoft = "microsoft",
|
|
95
|
-
Google = "google",
|
|
96
|
-
Evercam = "evercam"
|
|
97
|
-
}
|
|
98
93
|
export declare enum InfoPage {
|
|
99
94
|
ThreeSixtyView = "360",
|
|
100
95
|
BIMView = "bim",
|
|
@@ -105,7 +100,7 @@ export declare enum InfoPage {
|
|
|
105
100
|
Timeline = "timeline",
|
|
106
101
|
WeatherReport = "weather-report"
|
|
107
102
|
}
|
|
108
|
-
export declare enum
|
|
103
|
+
export declare enum DownloadFileType {
|
|
109
104
|
Jpeg = "jpeg",
|
|
110
105
|
Pdf = "pdf",
|
|
111
106
|
Csv = "csv"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BBox, BoundingBox, DateType, Schedule, CameraExid, DateTime, DetectionModel, PaginationParams, PpeLabel, ProjectExid } from "@evercam/api/types";
|
|
2
|
-
import { DetectionLabel,
|
|
2
|
+
import { DetectionLabel, DownloadFileType } from "@evercam/api/types";
|
|
3
3
|
export declare enum SiteAnalyticsMode {
|
|
4
4
|
Detections = "detections",
|
|
5
5
|
Segments = "segments"
|
|
@@ -132,10 +132,11 @@ export type DetectionsRequestParams = {
|
|
|
132
132
|
trackId?: number;
|
|
133
133
|
thresholds?: string[];
|
|
134
134
|
excludeLabels?: Array<DetectionLabel | PpeLabel>;
|
|
135
|
+
mergedClasses?: Array<string>;
|
|
135
136
|
confidenceThreshold?: number;
|
|
136
137
|
} & PaginationParams;
|
|
137
138
|
export type DetectionsExportRequestParams = DetectionsRequestParams & {
|
|
138
|
-
fileType:
|
|
139
|
+
fileType: DownloadFileType;
|
|
139
140
|
columns?: string[];
|
|
140
141
|
directDownload?: boolean;
|
|
141
142
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export type SsoProvider = {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
exid: string;
|
|
5
|
+
clientId: string;
|
|
6
|
+
clientSecret: string;
|
|
7
|
+
scope: string;
|
|
8
|
+
responseType: string;
|
|
9
|
+
loginUrl: string;
|
|
10
|
+
iconUrl: string;
|
|
11
|
+
options: {
|
|
12
|
+
showOnLogin: boolean;
|
|
13
|
+
showOnSignup: boolean;
|
|
14
|
+
};
|
|
15
|
+
tokenUri: string;
|
|
16
|
+
tokenIntrospectionUri: string;
|
|
17
|
+
userInfoUri: string;
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
};
|
|
20
|
+
export type SsoUpdatePayload = {
|
|
21
|
+
name: string;
|
|
22
|
+
exid: string;
|
|
23
|
+
clientId: string;
|
|
24
|
+
clientSecret: string;
|
|
25
|
+
scope: string;
|
|
26
|
+
responseType: string;
|
|
27
|
+
loginUrl: string;
|
|
28
|
+
iconUrl: string;
|
|
29
|
+
options: {
|
|
30
|
+
showOnLogin: boolean;
|
|
31
|
+
showOnSignup: boolean;
|
|
32
|
+
};
|
|
33
|
+
tokenUri: string;
|
|
34
|
+
tokenIntrospectionUri: string;
|
|
35
|
+
userInfoUri: string;
|
|
36
|
+
enabled: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type SsoCreatePayload = {
|
|
39
|
+
name: string;
|
|
40
|
+
exid: string;
|
|
41
|
+
clientId: string;
|
|
42
|
+
clientSecret: string;
|
|
43
|
+
scope: string;
|
|
44
|
+
responseType: string;
|
|
45
|
+
loginUrl: string;
|
|
46
|
+
iconUrl: string;
|
|
47
|
+
options: {
|
|
48
|
+
showOnLogin: boolean;
|
|
49
|
+
showOnSignup: boolean;
|
|
50
|
+
};
|
|
51
|
+
tokenUri: string;
|
|
52
|
+
tokenIntrospectionUri: string;
|
|
53
|
+
userInfoUri: string;
|
|
54
|
+
enabled: boolean;
|
|
55
|
+
};
|
|
@@ -39,8 +39,7 @@ export type ExNvrDeviceConfig = {
|
|
|
39
39
|
timezone: string;
|
|
40
40
|
};
|
|
41
41
|
export declare enum ExNvrFootageAvailableStatus {
|
|
42
|
-
|
|
43
|
-
NotActive = "Not Active",
|
|
42
|
+
Available = "Available",
|
|
44
43
|
NotAvailable = "Not Available"
|
|
45
44
|
}
|
|
46
45
|
export declare enum ExNvrDeviceState {
|