@evercam/api 1.0.0-624ff9012 → 1.0.0-63de3c1ae
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/adminApi.d.ts +23 -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 +25 -8
- package/dist/api/api/ingestApi.d.ts +1 -1
- package/dist/api/types/analytics.d.ts +12 -1
- package/dist/api/types/axios.d.ts +12 -0
- package/dist/api/types/camera.d.ts +3 -3
- package/dist/api/types/company.d.ts +28 -0
- package/dist/api/types/countries.d.ts +0 -7
- package/dist/api/types/kit.d.ts +9 -3
- package/dist/api/types/procore.d.ts +13 -10
- package/dist/api/types/progressPhoto.d.ts +19 -8
- package/dist/api/types/user.d.ts +1 -6
- package/dist/index.js +688 -492
- 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 +1 -1
- package/package.json +3 -2
|
@@ -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, 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, KitStorageRequestPayload, KitStorageResponsePayload, CompanyUser, CompanyProject, Automation } 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: {
|
|
@@ -64,6 +64,27 @@ export declare const AdminApi: {
|
|
|
64
64
|
update(cameraId: string, params: CameraUpdateRequestPayload): Promise<CamerasResponsePayload>;
|
|
65
65
|
};
|
|
66
66
|
companies: {
|
|
67
|
+
show(id: string): Promise<Company>;
|
|
68
|
+
getCompanyUsers(id: string, params: {
|
|
69
|
+
params: {
|
|
70
|
+
page: number;
|
|
71
|
+
limit: number;
|
|
72
|
+
};
|
|
73
|
+
}): Promise<PaginatedItems<CompanyUser>>;
|
|
74
|
+
getCompanyProjects(id: string, params: {
|
|
75
|
+
params: {
|
|
76
|
+
page: number;
|
|
77
|
+
limit: number;
|
|
78
|
+
};
|
|
79
|
+
}): Promise<PaginatedItems<CompanyProject>>;
|
|
80
|
+
getCompanyKits(id: string, params: {
|
|
81
|
+
params: {
|
|
82
|
+
page: number;
|
|
83
|
+
limit: number;
|
|
84
|
+
sort?: string;
|
|
85
|
+
};
|
|
86
|
+
}): Promise<PaginatedItems<Kit[]>>;
|
|
87
|
+
getCompanyCameras(id: string, params: Record<string, string>): Promise<import("axios").AxiosResponse<any, any>>;
|
|
67
88
|
getCompanies(params: {
|
|
68
89
|
params: Partial<CompanyQueryParams>;
|
|
69
90
|
}): Promise<PaginatedItems<Company[]>>;
|
|
@@ -264,7 +285,7 @@ export declare const AdminApi: {
|
|
|
264
285
|
}): Promise<{
|
|
265
286
|
progressPhoto: string;
|
|
266
287
|
}>;
|
|
267
|
-
update(id: string, payload: ProgressPhotosCreateUpdateRequestPayload): Promise<
|
|
288
|
+
update(id: string, payload: ProgressPhotosCreateUpdateRequestPayload): Promise<Automation>;
|
|
268
289
|
};
|
|
269
290
|
tags: {
|
|
270
291
|
index(): Promise<Tag[]>;
|
|
@@ -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
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AxiosRequestConfig } from "axios";
|
|
2
|
-
import type { AconexAuthCallbackParams, AconexEditedImageUploadRequestPayload, AconexUserProjectsResponsePayload, ApiCredentials, AutodeskFolderResponsePayload, AutodeskProjectsResponsePayload, AutodeskTokenResponsePayload, AutodeskUploadSnapshotPayload, AutodeskUserHubsResponsePayload, AvailableDaysRequestPayload, AvailableDaysResponsePayload, AvailableHoursRequestPayload, AvailableHoursResponsePayload, BatteryReading, BatteryVoltage, BimCompareExportRequestPayload, BimCreationPayload, BIMLayer, BIMLayerPostPayload, BimLayersQueryParams, BimModelRequestPayload, BimModelResponsePayload, BimPendingImage, BimSnapshotRequestPayload, BimSnapshotResponsePayload, BimUploadCameraParameters, CameraExid, CameraLogsResponsePayload, CamerasResponsePayload, CameraStatusLog, CameraUpdateRequestPayload, CheckCameraPortPayload, Comment, CommentCreationRequestPayload, CommentsRequestPayload, Company, CompanyProject, CompanyUser, Compare, CompareRequestPayload, ConnectorResponsePayload, Credentials, FetchCameraQueryParams, GoogleAuthRequestPayload, LoginRequestPayload, LoginResponsePayload, Logo, LogoutParams, Media, MediaCreateRequestPayload, MediaFilterQueryParams, MediaUpdateRequestPayload, MediaUsersResponsePayload, NearestSnapshotRequestPayload, NearestSnapshotResponsePayload, PaginatedItems, PendingBimImagesParams, ProcessPendingImagesBimParams, ProcoreEditedImageUploadRequestPayload, ProcoreObservationFormRequestPayload, ProcoreObservationTypesResponsePayload, ProcoreProjectsAlbumsPayload, ProcoreProjectRequestPayload, ProcoreUserCompaniesResponsePayload, ProcoreCompanyRequestPayload, ProcoreUserProjectsResponsePayload, ProcoreUserProjectPermissionsResponsePayload, ProcoreObservationAssignee, ProcoreObservationDistributionMember, ProcoreObservationTrades, ProcoreObservationLocation, ProcoreObservationSpecificationSection, ProcoreObservationForm, ProgressPhotosCreateUpdateRequestPayload, ProgressPhotosResponsePayload, ProgressPhotosUnSubscribeParams, ProjectBatteryReading, ProjectExid, ProjectLogoResponsePayload, ProjectResponsePayload, ProjectShareResponse, RemotePasswordUpdateRequestPayload, ResendShareRequestPayload, SessionsListRequestPayload, Share, ShareCreateRequestPayload, ShareCreateResponsePayload, ShareDeletionRequestPayload, SharedUsersResponsePayload, ShareProjectCamerasRequestPayload, UpdateUserRestrictionPayload, UpdateCameraRestrictionPayload, ShareRequestsResponsePayload, SharesResponsePayload, SignupUserRequestPayload, Snapshot, SnapshotRangeRequestPayload, SnapshotRangeResponsePayload, ThumbnailData, TimelapseCreationRequestPayload, TimelapseCreationResponsePayload, TimelapseSnapshotRequestPayload, TimelapseSnapshotResponsePayload, UpdatePasswordRequestPayload, UserDeleteRequestPayload, UserSession, UserUpdateRequestPayload, VoyageControlConnectorPayload, XWeatherCreatePayload, XWeatherResponse, Widget, WidgetFull, WidgetPayload, WidgetsListRequestPayload } from "@evercam/api/types";
|
|
2
|
+
import type { AconexAuthCallbackParams, AconexEditedImageUploadRequestPayload, AconexUserProjectsResponsePayload, ApiCredentials, AutodeskFolderResponsePayload, AutodeskProjectsResponsePayload, AutodeskTokenResponsePayload, AutodeskUploadSnapshotPayload, AutodeskUserHubsResponsePayload, AvailableDaysRequestPayload, AvailableDaysResponsePayload, AvailableHoursRequestPayload, AvailableHoursResponsePayload, BatteryReading, BatteryVoltage, BimCompareExportRequestPayload, BimCreationPayload, BIMLayer, BIMLayerPostPayload, BimLayersQueryParams, BimModelRequestPayload, BimModelResponsePayload, BimPendingImage, BimSnapshotRequestPayload, BimSnapshotResponsePayload, BimUploadCameraParameters, CameraExid, CameraLogsResponsePayload, CamerasResponsePayload, CameraStatusLog, CameraUpdateRequestPayload, CheckCameraPortPayload, Comment, CommentCreationRequestPayload, CommentsRequestPayload, Company, CompanyProject, CompanyKit, CompanyUser, Compare, CompareRequestPayload, ConnectorResponsePayload, Credentials, FetchCameraQueryParams, GoogleAuthRequestPayload, LoginRequestPayload, LoginResponsePayload, Logo, LogoutParams, Media, MediaCreateRequestPayload, MediaFilterQueryParams, MediaUpdateRequestPayload, MediaUsersResponsePayload, NearestSnapshotRequestPayload, NearestSnapshotResponsePayload, PaginatedItems, PendingBimImagesParams, ProcessPendingImagesBimParams, ProcoreEditedImageUploadRequestPayload, ProcoreObservationFormRequestPayload, ProcoreObservationTypesResponsePayload, ProcoreProjectsAlbumsPayload, ProcoreProjectRequestPayload, ProcoreUserCompaniesResponsePayload, ProcoreCompanyRequestPayload, ProcoreUserProjectsResponsePayload, ProcoreUserProjectPermissionsResponsePayload, ProcoreObservationAssignee, ProcoreObservationDistributionMember, ProcoreObservationTrades, ProcoreObservationLocation, ProcoreObservationSpecificationSection, ProcoreObservationForm, ProgressPhotosCreateUpdateRequestPayload, ProgressPhotosResponsePayload, ProgressPhotosUnSubscribeParams, ProjectBatteryReading, ProjectExid, ProjectLogoResponsePayload, ProjectResponsePayload, ProjectShareResponse, RemotePasswordUpdateRequestPayload, ResendShareRequestPayload, SessionsListRequestPayload, Share, ShareCreateRequestPayload, ShareCreateResponsePayload, ShareDeletionRequestPayload, SharedUsersResponsePayload, ShareProjectCamerasRequestPayload, UpdateUserRestrictionPayload, UpdateCameraRestrictionPayload, ShareRequestsResponsePayload, SharesResponsePayload, SignupUserRequestPayload, Snapshot, SnapshotRangeRequestPayload, SnapshotRangeResponsePayload, ThumbnailData, TimelapseCreationRequestPayload, TimelapseCreationResponsePayload, TimelapseSnapshotRequestPayload, TimelapseSnapshotResponsePayload, UpdatePasswordRequestPayload, UserDeleteRequestPayload, UserSession, UserUpdateRequestPayload, VoyageControlConnectorPayload, XWeatherCreatePayload, XWeatherResponse, Widget, WidgetFull, WidgetPayload, WidgetsListRequestPayload, Camera, ProcoreNextObservationAvailableNumber } from "@evercam/api/types";
|
|
3
3
|
export declare const EvercamApi: {
|
|
4
4
|
apiStatus: {
|
|
5
5
|
getApiStatus(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -56,7 +56,8 @@ export declare const EvercamApi: {
|
|
|
56
56
|
};
|
|
57
57
|
cameras: {
|
|
58
58
|
getCameras(params: {
|
|
59
|
-
params
|
|
59
|
+
params?: Partial<FetchCameraQueryParams>;
|
|
60
|
+
config?: AxiosRequestConfig;
|
|
60
61
|
}): Promise<CamerasResponsePayload>;
|
|
61
62
|
getCameraById(cameraId: string, params?: ApiCredentials): Promise<CamerasResponsePayload>;
|
|
62
63
|
getCameraLastPublicNote(cameraId: string): Promise<CameraLogsResponsePayload>;
|
|
@@ -78,7 +79,10 @@ export declare const EvercamApi: {
|
|
|
78
79
|
updateCamera(exid: string, params: CameraUpdateRequestPayload): Promise<CamerasResponsePayload>;
|
|
79
80
|
};
|
|
80
81
|
projects: {
|
|
81
|
-
index(params
|
|
82
|
+
index({ params, config, }: {
|
|
83
|
+
params?: ApiCredentials;
|
|
84
|
+
config: AxiosRequestConfig;
|
|
85
|
+
}): Promise<ProjectResponsePayload>;
|
|
82
86
|
getLogos(projectId: string): Promise<ProjectLogoResponsePayload>;
|
|
83
87
|
createLogo(projectId: string, formData: FormData): Promise<Logo & {
|
|
84
88
|
id: number;
|
|
@@ -103,6 +107,12 @@ export declare const EvercamApi: {
|
|
|
103
107
|
message: string;
|
|
104
108
|
}>;
|
|
105
109
|
getUsers(projectExid: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
110
|
+
getCameras(projectExid: string): Promise<{
|
|
111
|
+
cameras: Camera[];
|
|
112
|
+
}>;
|
|
113
|
+
getCameraRefs(projectExid: string): Promise<{
|
|
114
|
+
cameras: Camera[];
|
|
115
|
+
}>;
|
|
106
116
|
};
|
|
107
117
|
timelapse: {
|
|
108
118
|
getSnapshotRange(cameraId: string, payload: TimelapseSnapshotRequestPayload, extraParams?: AxiosRequestConfig): Promise<TimelapseSnapshotResponsePayload>;
|
|
@@ -138,6 +148,7 @@ export declare const EvercamApi: {
|
|
|
138
148
|
sendRevoke(): Promise<void>;
|
|
139
149
|
getObservationTypes(payload: ProcoreProjectRequestPayload): Promise<ProcoreObservationTypesResponsePayload>;
|
|
140
150
|
getObservationForm(payload: ProcoreObservationFormRequestPayload): Promise<ProcoreObservationForm>;
|
|
151
|
+
getNextAvailableObservationNumber(payload: ProcoreProjectRequestPayload): Promise<ProcoreNextObservationAvailableNumber>;
|
|
141
152
|
getAssignees(payload: ProcoreProjectRequestPayload): Promise<Array<ProcoreObservationAssignee>>;
|
|
142
153
|
getDistributionMembers(payload: ProcoreProjectRequestPayload): Promise<Array<ProcoreObservationDistributionMember>>;
|
|
143
154
|
createObservation(formData: FormData): Promise<void>;
|
|
@@ -229,21 +240,27 @@ export declare const EvercamApi: {
|
|
|
229
240
|
getProjectShares(exid: string): Promise<ProjectShareResponse>;
|
|
230
241
|
updateUserRestriction(projectExid: ProjectExid, payload: UpdateUserRestrictionPayload): Promise<import("axios").AxiosResponse<any, any>>;
|
|
231
242
|
};
|
|
232
|
-
|
|
233
|
-
|
|
243
|
+
company: {
|
|
244
|
+
show(companyId: string | undefined, params?: Record<string, string>): Promise<Company>;
|
|
245
|
+
getCompanyUsers(params: {
|
|
234
246
|
params: {
|
|
235
247
|
page: number;
|
|
236
248
|
limit: number;
|
|
237
249
|
};
|
|
238
250
|
}): Promise<PaginatedItems<CompanyUser>>;
|
|
239
|
-
getCompanyProjects(
|
|
251
|
+
getCompanyProjects(params: {
|
|
240
252
|
params: {
|
|
241
253
|
page: number;
|
|
242
254
|
limit: number;
|
|
243
255
|
};
|
|
244
256
|
}): Promise<PaginatedItems<CompanyProject>>;
|
|
245
|
-
|
|
246
|
-
|
|
257
|
+
getCompanyCameras(params: Record<string, string>): Promise<import("axios").AxiosResponse<any, any>>;
|
|
258
|
+
getCompanyKits(params: {
|
|
259
|
+
params: {
|
|
260
|
+
page: number;
|
|
261
|
+
limit: number;
|
|
262
|
+
};
|
|
263
|
+
}): Promise<PaginatedItems<CompanyKit>>;
|
|
247
264
|
};
|
|
248
265
|
batteries: {
|
|
249
266
|
ProjectBatteryReadings(projectExid: string): Promise<ProjectBatteryReading[]>;
|
|
@@ -34,7 +34,7 @@ export declare const IngestApi: {
|
|
|
34
34
|
assets360: {
|
|
35
35
|
get360Assets(params: {
|
|
36
36
|
params: Partial<_360AssetsQueryParams>;
|
|
37
|
-
}): Promise<import("axios").AxiosResponse<any, any>>;
|
|
37
|
+
}, version?: IngestVersions): Promise<import("axios").AxiosResponse<any, any>>;
|
|
38
38
|
get360AssetLink(projectId: string, date: string, floor: string, assetType: string, marker: string | null): Promise<import("axios").AxiosResponse<any, any>>;
|
|
39
39
|
deleteUpload(id: number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
40
40
|
getArchive(id: number, params: {
|
|
@@ -258,7 +258,8 @@ export declare enum AnalyticsEvent {
|
|
|
258
258
|
SharingTransferOwnership = "TransferOwnership",
|
|
259
259
|
SharingSortBy = "SortBy",
|
|
260
260
|
SharingChangeAccessRight = "ChangeAccessRight",
|
|
261
|
-
|
|
261
|
+
ThreeSixtyGallery = "Gallery",
|
|
262
|
+
ThreeSixtyGalleryToggleUploadDialog = "Gallery-ToggleUploadDialog",
|
|
262
263
|
ThreeSixtyChangeDate = "ChangeDate",
|
|
263
264
|
ThreeSixtyChangeFloor = "ChangeFloor",
|
|
264
265
|
ThreeSixtyCloseCompare = "CloseCompare",
|
|
@@ -296,6 +297,7 @@ export declare enum AnalyticsEvent {
|
|
|
296
297
|
ThreeSixtyUnlockCompare = "UnlockCompare",
|
|
297
298
|
ThreeSixtyUnlockForgeBIM = "UnlockForgeBIM",
|
|
298
299
|
ThreeSixtyUpdateFloorName = "UpdateFloorName",
|
|
300
|
+
ThreeSixtyUploadAssets = "UploadAssets",
|
|
299
301
|
DroneAreaToolClick = "AreaTool-Click",
|
|
300
302
|
DroneChangeDate = "ChangeDate",
|
|
301
303
|
DroneChooseTagType = "ChooseTagType",
|
|
@@ -384,12 +386,14 @@ export declare enum AnalyticsEvent {
|
|
|
384
386
|
ProgressPhotoPause = "ProgressPhoto-Pause",
|
|
385
387
|
ProgressPhotoResume = "ProgressPhoto-Resume",
|
|
386
388
|
ProgressPhotoResumeDelete = "ProgressPhoto-ResumeDelete",
|
|
389
|
+
ProgressPhotoSelectType = "ProgressPhoto-SelectType",
|
|
387
390
|
ProgressPhotoSelectCameras = "ProgressPhoto-SelectCameras",
|
|
388
391
|
ProgressPhotoSelectDays = "ProgressPhoto-SelectDays",
|
|
389
392
|
ProgressPhotoSelectMember = "ProgressPhoto-SelectMember",
|
|
390
393
|
ProgressPhotoSelectProvider = "ProgressPhoto-SelectProvider",
|
|
391
394
|
ProgressPhotoSelectTime = "ProgressPhoto-SelectTime",
|
|
392
395
|
ProgressPhotoSelectTimezone = "ProgressPhoto-SelectTimezone",
|
|
396
|
+
ProgressPhotoSelectDelay = "ProgressPhoto-SelectDelay",
|
|
393
397
|
ProgressPhotoToggleCreateDialog = "ProgressPhoto-ToggleCreateDialog",
|
|
394
398
|
ProgressPhotoToggleEditDialog = "ProgressPhoto-ToggleEditDialog",
|
|
395
399
|
ProgressPhotoUnsubscribeUser = "ProgressPhoto-UnsubscribeUser",
|
|
@@ -453,6 +457,13 @@ export declare enum AnalyticsEvent {
|
|
|
453
457
|
HelpMenuClickUserManuaLink = "HelpMenu-ClickUserManuaLink",
|
|
454
458
|
HelpMenuClickSupportTicketsLink = "HelpMenu-ClickSupportTicketsLink",
|
|
455
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",
|
|
456
467
|
ExportPdf = "ExportPdf",
|
|
457
468
|
ExportCsv = "ExportCsv",
|
|
458
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;
|
|
@@ -20,6 +21,7 @@ export type AxiosEnvironment = {
|
|
|
20
21
|
app?: string | null;
|
|
21
22
|
getAuthToken?: () => string | null;
|
|
22
23
|
errorLogger?: (error: AxiosError) => void;
|
|
24
|
+
swrKey?: string;
|
|
23
25
|
};
|
|
24
26
|
export type RequestInterceptor = (req: AxiosRequestConfig, env: AxiosEnvironment) => AxiosRequestConfig & any;
|
|
25
27
|
export type ResponseInterceptor = (res: AxiosResponse, env: AxiosEnvironment) => AxiosResponse & any;
|
|
@@ -38,7 +40,13 @@ export interface ExtendedAxiosInstance extends AxiosInstance {
|
|
|
38
40
|
addRequestInterceptor: (interceptor: RequestInterceptor, errorInterceptor?: ErrorInterceptor) => void;
|
|
39
41
|
addResponseInterceptor: (interceptor: ResponseInterceptor, errorInterceptor?: ErrorInterceptor) => void;
|
|
40
42
|
addErrorInterceptor: (interceptor: ErrorInterceptor) => void;
|
|
43
|
+
swr: Swr;
|
|
41
44
|
}
|
|
45
|
+
export type ResponseValue<T> = T | undefined;
|
|
46
|
+
export type SwrResponse<T> = {
|
|
47
|
+
cachedValue: ResponseValue<T>;
|
|
48
|
+
freshPromise: Promise<ResponseValue<T>>;
|
|
49
|
+
};
|
|
42
50
|
declare module "axios" {
|
|
43
51
|
interface AxiosRequestConfig {
|
|
44
52
|
raw?: boolean;
|
|
@@ -47,5 +55,9 @@ declare module "axios" {
|
|
|
47
55
|
_metadata?: {
|
|
48
56
|
startTime: number;
|
|
49
57
|
};
|
|
58
|
+
swr?: boolean;
|
|
59
|
+
onSwrHit?: <T>(data: T) => unknown;
|
|
60
|
+
onSwrRefresh?: <T>(data: T) => unknown;
|
|
61
|
+
onSwrError?: (error: Error) => unknown;
|
|
50
62
|
}
|
|
51
63
|
}
|
|
@@ -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;
|
|
@@ -13,6 +13,34 @@ export type CompanyProject = {
|
|
|
13
13
|
status: string;
|
|
14
14
|
startedAt: DateType;
|
|
15
15
|
};
|
|
16
|
+
export type CompanyKit = {
|
|
17
|
+
id: number;
|
|
18
|
+
name: string;
|
|
19
|
+
serial: string;
|
|
20
|
+
status: string;
|
|
21
|
+
powerType: string;
|
|
22
|
+
countryName: string;
|
|
23
|
+
nvrId: string;
|
|
24
|
+
nvrSerial: string;
|
|
25
|
+
nvrVersion: string;
|
|
26
|
+
nvrNerves: boolean;
|
|
27
|
+
nvrModel: string;
|
|
28
|
+
nvrDeviceType: string;
|
|
29
|
+
routerId: string;
|
|
30
|
+
routerSerial: string;
|
|
31
|
+
projectExid: string;
|
|
32
|
+
projectName: string;
|
|
33
|
+
alarms: Array<string>;
|
|
34
|
+
sims: Array<{
|
|
35
|
+
id: number;
|
|
36
|
+
number: string;
|
|
37
|
+
}>;
|
|
38
|
+
cameras: Array<{
|
|
39
|
+
exid: string;
|
|
40
|
+
name: string;
|
|
41
|
+
status: string;
|
|
42
|
+
}>;
|
|
43
|
+
};
|
|
16
44
|
export type Company = {
|
|
17
45
|
id: number;
|
|
18
46
|
exid: 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",
|
package/dist/api/types/kit.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CountryCode, CountryId, DateTime, DateType, Nvr, PaginationParams, PowerType, Project,
|
|
1
|
+
import { 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;
|
|
@@ -24,6 +24,12 @@ export declare enum KitStatus {
|
|
|
24
24
|
Deployed = "deployed",
|
|
25
25
|
Decommissioned = "decommissioned"
|
|
26
26
|
}
|
|
27
|
+
export declare enum KitRegion {
|
|
28
|
+
APAC = "apac",
|
|
29
|
+
EMEA = "emea",
|
|
30
|
+
LATAM = "latam",
|
|
31
|
+
US = "na"
|
|
32
|
+
}
|
|
27
33
|
export declare enum KitAlarm {
|
|
28
34
|
NvrOffline = "nvr_offline",
|
|
29
35
|
UnknownCamera = "unknown_camera",
|
|
@@ -292,7 +298,7 @@ export type KitCreatePayload = {
|
|
|
292
298
|
status: KitStatus;
|
|
293
299
|
powerType: PowerType;
|
|
294
300
|
config: {
|
|
295
|
-
region:
|
|
301
|
+
region: KitRegion;
|
|
296
302
|
};
|
|
297
303
|
};
|
|
298
304
|
export type KitUpdatePayload = {
|
|
@@ -176,11 +176,14 @@ export type ProcoreObservationCustomField = {
|
|
|
176
176
|
optionsUrl: string | null;
|
|
177
177
|
defaultValue: string | null;
|
|
178
178
|
};
|
|
179
|
+
export type ProcoreNextObservationAvailableNumber = {
|
|
180
|
+
nextAvailableNumber: number;
|
|
181
|
+
};
|
|
179
182
|
export declare enum ProcoreObservationCustomFieldDataType {
|
|
180
183
|
RichText = "rich_text",
|
|
181
184
|
Date = "date",
|
|
182
185
|
DateTime = "datetime",
|
|
183
|
-
|
|
186
|
+
LovEntry = "lov_entry",
|
|
184
187
|
LovEntries = "lov_entries",
|
|
185
188
|
Boolean = "boolean",
|
|
186
189
|
Vendor = "vendor",
|
|
@@ -194,17 +197,17 @@ export declare enum ProcoreObservationDefaultFieldNames {
|
|
|
194
197
|
Number = "number",
|
|
195
198
|
Name = "name",
|
|
196
199
|
Status = "status",
|
|
197
|
-
Trade = "
|
|
198
|
-
Assignee = "
|
|
199
|
-
DueDate = "
|
|
200
|
-
SpecificationSection = "
|
|
200
|
+
Trade = "tradeId",
|
|
201
|
+
Assignee = "assigneeId",
|
|
202
|
+
DueDate = "dueDate",
|
|
203
|
+
SpecificationSection = "specificationSectionId",
|
|
201
204
|
Priority = "priority",
|
|
202
|
-
Location = "
|
|
203
|
-
DistributionMembers = "
|
|
205
|
+
Location = "locationId",
|
|
206
|
+
DistributionMembers = "distributionMemberIds",
|
|
204
207
|
Personal = "personal",
|
|
205
|
-
Hazard = "
|
|
206
|
-
ContributingBehavior = "
|
|
207
|
-
ContributingCondition = "
|
|
208
|
+
Hazard = "hazardId",
|
|
209
|
+
ContributingBehavior = "contributingBehaviorId",
|
|
210
|
+
ContributingCondition = "contributingConditionId",
|
|
208
211
|
Description = "description"
|
|
209
212
|
}
|
|
210
213
|
export declare enum ProcoreTools {
|
|
@@ -1,31 +1,42 @@
|
|
|
1
|
-
import { DateTime, DateType, PaginationParams } from "@/types";
|
|
2
|
-
export type
|
|
1
|
+
import { AutomationType, DateTime, DateType, PaginationParams } from "@/types";
|
|
2
|
+
export type Automation = {
|
|
3
3
|
cameraIds: string;
|
|
4
4
|
cameraNames: number;
|
|
5
|
+
cameraExids?: string[];
|
|
5
6
|
createdAt: string;
|
|
6
7
|
id: number;
|
|
7
8
|
provider: string;
|
|
8
|
-
type:
|
|
9
|
+
type: AutomationType;
|
|
9
10
|
config: Partial<{
|
|
10
|
-
recipients: string;
|
|
11
|
-
projectId: number;
|
|
11
|
+
recipients: string | Record<string, string>[];
|
|
12
12
|
companyId: number;
|
|
13
|
+
compareDelay: number;
|
|
14
|
+
categoryId: string;
|
|
15
|
+
hubId: string;
|
|
16
|
+
folderId: string;
|
|
17
|
+
projectId: number;
|
|
13
18
|
}>;
|
|
14
19
|
isPaused: boolean;
|
|
15
|
-
notifyDays: string;
|
|
20
|
+
notifyDays: string | string[];
|
|
16
21
|
notifyTime: string;
|
|
17
22
|
requesterEmail: string;
|
|
18
23
|
requesterName: string;
|
|
19
24
|
timezone: string;
|
|
20
25
|
title: string;
|
|
26
|
+
compareDelay?: number;
|
|
27
|
+
selectedProvider?: string;
|
|
28
|
+
restrictedCameraExids?: string[];
|
|
29
|
+
recipients?: string | string[];
|
|
21
30
|
};
|
|
22
31
|
export type ProgressPhotosCreateUpdateRequestPayload = {
|
|
23
32
|
cameraExids?: string;
|
|
24
33
|
notifyDays?: string;
|
|
34
|
+
compareDelay?: AutomationType;
|
|
25
35
|
notifyTime?: string;
|
|
26
36
|
provider?: string;
|
|
27
37
|
type?: string;
|
|
28
38
|
config?: {
|
|
39
|
+
compareDelay?: AutomationType;
|
|
29
40
|
recipients?: string;
|
|
30
41
|
projectId?: number;
|
|
31
42
|
companyId?: number;
|
|
@@ -40,9 +51,9 @@ export type ProgressPhotosUnSubscribeParams = {
|
|
|
40
51
|
token?: string;
|
|
41
52
|
};
|
|
42
53
|
export type ProgressPhotosResponsePayload = {
|
|
43
|
-
progressPhotos:
|
|
54
|
+
progressPhotos: Automation[];
|
|
44
55
|
};
|
|
45
|
-
export declare enum
|
|
56
|
+
export declare enum AutomationDialogType {
|
|
46
57
|
Create = "create",
|
|
47
58
|
Edit = "edit",
|
|
48
59
|
Pause = "pause"
|
package/dist/api/types/user.d.ts
CHANGED
|
@@ -34,12 +34,7 @@ export type AdminUser = {
|
|
|
34
34
|
countryName: string;
|
|
35
35
|
createdAt: DateTime;
|
|
36
36
|
integrations: string[];
|
|
37
|
-
|
|
38
|
-
lastEvenCreatedAt: DateTime;
|
|
39
|
-
lastEventId: number;
|
|
40
|
-
lastEventIpAddress: string;
|
|
41
|
-
lastEventName: string;
|
|
42
|
-
lastEventOs: string;
|
|
37
|
+
lastSeenAt: DateTime;
|
|
43
38
|
lastLoginAt: string;
|
|
44
39
|
lastname: string;
|
|
45
40
|
persona: string;
|