@evercam/api 1.0.0-213bdb2b3

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.
Files changed (77) hide show
  1. package/README.md +1 -0
  2. package/dist/api/3dFirebaseApi.d.ts +9 -0
  3. package/dist/api/adminApi.d.ts +289 -0
  4. package/dist/api/aiApi.d.ts +79 -0
  5. package/dist/api/authzApi.d.ts +21 -0
  6. package/dist/api/client/axios.d.ts +13 -0
  7. package/dist/api/client/customErrors.d.ts +80 -0
  8. package/dist/api/client/index.d.ts +5 -0
  9. package/dist/api/client/interceptors.d.ts +9 -0
  10. package/dist/api/evercamApi.d.ts +266 -0
  11. package/dist/api/evercamLabsApi.d.ts +47 -0
  12. package/dist/api/exNvrApi.d.ts +43 -0
  13. package/dist/api/index.d.ts +13 -0
  14. package/dist/api/ingestApi.d.ts +65 -0
  15. package/dist/api/ptzApi.d.ts +36 -0
  16. package/dist/api/videoWallApi.d.ts +9 -0
  17. package/dist/api/weatherApi.d.ts +25 -0
  18. package/dist/api/webRtcApi.d.ts +22 -0
  19. package/dist/index.d.ts +3 -0
  20. package/dist/index.js +2385 -0
  21. package/dist/index.js.map +1 -0
  22. package/dist/index.umd.cjs +2 -0
  23. package/dist/index.umd.cjs.map +1 -0
  24. package/dist/types/360.d.ts +83 -0
  25. package/dist/types/aconex.d.ts +45 -0
  26. package/dist/types/analytics.d.ts +481 -0
  27. package/dist/types/anpr.d.ts +98 -0
  28. package/dist/types/auditLogs.d.ts +99 -0
  29. package/dist/types/autodesk.d.ts +29 -0
  30. package/dist/types/automation.d.ts +6 -0
  31. package/dist/types/axios.d.ts +51 -0
  32. package/dist/types/bim.d.ts +147 -0
  33. package/dist/types/camera.d.ts +563 -0
  34. package/dist/types/comments.d.ts +36 -0
  35. package/dist/types/company.d.ts +46 -0
  36. package/dist/types/compare.d.ts +57 -0
  37. package/dist/types/connector.d.ts +16 -0
  38. package/dist/types/copilot.d.ts +156 -0
  39. package/dist/types/countries.d.ts +507 -0
  40. package/dist/types/credentials.d.ts +5 -0
  41. package/dist/types/detections.d.ts +73 -0
  42. package/dist/types/devices.d.ts +228 -0
  43. package/dist/types/drone.d.ts +17 -0
  44. package/dist/types/errors.d.ts +36 -0
  45. package/dist/types/gateReport.d.ts +441 -0
  46. package/dist/types/index.d.ts +51 -0
  47. package/dist/types/ingest.d.ts +43 -0
  48. package/dist/types/kit.d.ts +295 -0
  49. package/dist/types/map.d.ts +4 -0
  50. package/dist/types/media.d.ts +114 -0
  51. package/dist/types/notification.d.ts +27 -0
  52. package/dist/types/nvr.d.ts +35 -0
  53. package/dist/types/procore.d.ts +76 -0
  54. package/dist/types/progressPhoto.d.ts +90 -0
  55. package/dist/types/project.d.ts +120 -0
  56. package/dist/types/recording.d.ts +124 -0
  57. package/dist/types/roi.d.ts +26 -0
  58. package/dist/types/routeParams.d.ts +50 -0
  59. package/dist/types/router.d.ts +67 -0
  60. package/dist/types/shared.d.ts +208 -0
  61. package/dist/types/shares.d.ts +192 -0
  62. package/dist/types/sim.d.ts +114 -0
  63. package/dist/types/siteAnalytics.d.ts +5 -0
  64. package/dist/types/sitePlanner.d.ts +26 -0
  65. package/dist/types/snapshots.d.ts +50 -0
  66. package/dist/types/storageServers.d.ts +4 -0
  67. package/dist/types/streaming.d.ts +119 -0
  68. package/dist/types/time.d.ts +19 -0
  69. package/dist/types/timelapse.d.ts +84 -0
  70. package/dist/types/user.d.ts +276 -0
  71. package/dist/types/vendorModel.d.ts +15 -0
  72. package/dist/types/videoWall.d.ts +33 -0
  73. package/dist/types/voyageControl.d.ts +6 -0
  74. package/dist/types/weather.d.ts +83 -0
  75. package/dist/types/widget.d.ts +169 -0
  76. package/dist/utils.d.ts +9 -0
  77. package/package.json +49 -0
@@ -0,0 +1,98 @@
1
+ import { BoundingBox, CameraExid, DateType, GateReportVehicleType, TimelinePrecision } from "@/types";
2
+ export type AnprQueryParams = {
3
+ page?: number;
4
+ limit?: number;
5
+ firstSeen?: {
6
+ gte: DateType;
7
+ };
8
+ lastSeen?: {
9
+ lte: DateType;
10
+ };
11
+ captureTime?: {
12
+ gte?: DateType;
13
+ lt?: DateType;
14
+ };
15
+ direction?: {
16
+ eq?: string;
17
+ } | string;
18
+ plateNumber?: {
19
+ eq?: string;
20
+ } | string;
21
+ sort?: string;
22
+ fromDate?: DateType;
23
+ toDate?: DateType;
24
+ tab?: string;
25
+ };
26
+ export type AnprCountsQueryParams = {
27
+ precision: TimelinePrecision;
28
+ fromDate?: string;
29
+ toDate?: string;
30
+ isPublic?: boolean;
31
+ cameras?: CameraExid[];
32
+ direction?: AnprDirection;
33
+ isPlate?: boolean;
34
+ isDuplicate?: boolean;
35
+ vehicleTypes?: GateReportVehicleType[];
36
+ camerasExid?: CameraExid[];
37
+ };
38
+ export declare enum AnprDirection {
39
+ Left = "reverse",
40
+ Arrived = "forward",
41
+ Unknown = "unknown"
42
+ }
43
+ export type AnprEvent = {
44
+ id: number;
45
+ plateNumber: string;
46
+ cameraex: CameraExid;
47
+ picName: string;
48
+ captureTime: string;
49
+ insertedAt: string;
50
+ isDuplicate: boolean;
51
+ direction: AnprDirection;
52
+ updatedAt: string;
53
+ isPlate: boolean;
54
+ isPostprocessed: boolean;
55
+ vehicleType?: GateReportVehicleType;
56
+ contextVehicleType?: GateReportVehicleType;
57
+ anprVehicleType: string;
58
+ anprVehicleModel: string;
59
+ anprVehicleMake: string;
60
+ anprVehicleColor: string;
61
+ anprVehicleSpeed: number | null;
62
+ anprSnapshotLink: string;
63
+ contextSnapshotLink: string;
64
+ contextCamera: string;
65
+ votedVehicleType: GateReportVehicleType | string;
66
+ metadata_: {
67
+ evercamMetadata?: {
68
+ anpr?: {
69
+ bbox: BoundingBox;
70
+ label: string;
71
+ score: number;
72
+ };
73
+ context?: {
74
+ bbox: BoundingBox;
75
+ label: string;
76
+ score: number;
77
+ };
78
+ };
79
+ plateRecognizerMetadata?: {
80
+ plateNumber?: string;
81
+ vehicleMake?: string;
82
+ vehicleType?: string;
83
+ vehicleColor?: string;
84
+ vehicleModel?: string;
85
+ vehicleOrientation?: string;
86
+ };
87
+ };
88
+ };
89
+ export type AnprCount = {
90
+ date: string;
91
+ counts: Record<AnprDirection, number>;
92
+ };
93
+ export declare enum AnprEventStatus {
94
+ IsPlate = "is_plate",
95
+ NotPlate = "not_plate",
96
+ IsDuplicate = "is_duplicate",
97
+ NotDuplicate = "not_duplicate"
98
+ }
@@ -0,0 +1,99 @@
1
+ import { CameraStatus, DateType, PaginationParams } from "@/types";
2
+ export declare enum AuditLogActionType {
3
+ VH_STATUS = "vh_status",
4
+ CR_UPDATED = "cr_updated",
5
+ CR_CREATED = "cr_created",
6
+ ONLINE = "online",
7
+ OFFLINE = "offline",
8
+ ON_HOLD = "on_hold",
9
+ WAITING = "waiting",
10
+ DECOMMISSIONED = "decommissioned",
11
+ UNDER_MAINTENANCE = "under_maintenance",
12
+ WAITING_FOR_SITE_VISIT = "waiting_for_site_visit",
13
+ SMS = "sms",
14
+ CUSTOM = "custom",
15
+ PUBLIC_NOTE = "public_note",
16
+ SIM = "sim",
17
+ LOGIN = "login",
18
+ LOGOUT = "logout",
19
+ CREATE = "create",
20
+ UPDATE = "update",
21
+ DELETE = "delete",
22
+ DEVICE_SETTINGS = "device_settings",
23
+ LINK_SIM_WITH_ROUTER = "link_sim_with_router",
24
+ UNLINK_SIM_FROM_ROUTER = "unlink_sim_from_router",
25
+ LINK_CAMERA_WITH_ROUTER = "link_camera_with_router",
26
+ UNLINK_CAMERA_FROM_ROUTER = "unlink_camera_from_router",
27
+ SHARE = "share",
28
+ UPDATE_SHARE = "update_share",
29
+ DELETE_SHARE = "delete_share",
30
+ SHARE_REQUEST = "share_request",
31
+ DELETE_SHARE_REQUEST = "delete_share_request",
32
+ TRANSFER_OWNERSHIP = "transfer_ownership",
33
+ BIM_NOTE = "bim_note",
34
+ GATE_REPORT_NOTE = "gate_report_note"
35
+ }
36
+ export type AuditLog = {
37
+ id: number;
38
+ action: AuditLogActionType;
39
+ details: Record<string, any>;
40
+ insertedAt: DateType;
41
+ entity: string;
42
+ user_details: {
43
+ browser: string;
44
+ country: string;
45
+ countryCode: string;
46
+ device: string | null;
47
+ ip: string;
48
+ os: string | null;
49
+ };
50
+ who: string;
51
+ };
52
+ export type AuditLogsParams = PaginationParams & {
53
+ routerId: number;
54
+ cameraId: number;
55
+ entity: string;
56
+ byRouter: boolean;
57
+ byCamera: boolean;
58
+ byProject: boolean;
59
+ action: string;
60
+ };
61
+ export type CameraLogsQueryParams = {
62
+ historyDays: number;
63
+ accountId?: string;
64
+ status: CameraStatus[];
65
+ };
66
+ export type CameraLogItem = {
67
+ start: DateType;
68
+ state: CameraStatus;
69
+ end: DateType;
70
+ };
71
+ export type CameraLog = {
72
+ data: CameraLogItem[];
73
+ measure: string;
74
+ };
75
+ export type CameraAuditLog = {
76
+ id: number;
77
+ action: AuditLogActionType;
78
+ details: {
79
+ error_body?: string;
80
+ exid: string;
81
+ id: number;
82
+ name: string;
83
+ reason?: string;
84
+ };
85
+ insertedAt: DateType;
86
+ entity: string;
87
+ user_details: {
88
+ ip: string;
89
+ country: string;
90
+ countryCode: string;
91
+ agent: string;
92
+ };
93
+ who: string;
94
+ };
95
+ export type CameraAuditLogsQueryParams = PaginationParams & {
96
+ from: string;
97
+ to: string;
98
+ action: AuditLogActionType[];
99
+ };
@@ -0,0 +1,29 @@
1
+ export type AutodeskUserHubsResponsePayload = Array<{
2
+ text: string;
3
+ value: string;
4
+ }>;
5
+ export type AutodeskProjectsResponsePayload = Array<{
6
+ text: string;
7
+ value: string;
8
+ }>;
9
+ export type AutodeskFolderResponsePayload = {
10
+ text: string;
11
+ value: string;
12
+ allowedFileType: string;
13
+ allowedFolderType: string;
14
+ children: Array<AutodeskFolderResponsePayload>;
15
+ parentName?: string;
16
+ };
17
+ export type AutodeskUploadSnapshotPayload = {
18
+ projectId: string;
19
+ folderId: string;
20
+ accFileType: string;
21
+ accFolderType: string;
22
+ projectExid: string;
23
+ snapshot: string;
24
+ };
25
+ export type AutodeskTokenResponsePayload = {
26
+ token: string;
27
+ expiresAt: string;
28
+ login: string;
29
+ };
@@ -0,0 +1,6 @@
1
+ export declare enum AutomationProvider {
2
+ Aconex = "aconex",
3
+ Procore = "procore",
4
+ Autodesk = "autodesk",
5
+ Email = "email"
6
+ }
@@ -0,0 +1,51 @@
1
+ import type { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, CancelTokenSource, CancelTokenStatic } from "axios";
2
+ export type TimedRequest<T> = Promise<AxiosResponse<T> & {
3
+ duration: number;
4
+ error?: AxiosError;
5
+ }>;
6
+ export type AxiosEnvironment = {
7
+ isStaging?: boolean;
8
+ baseUrl?: string | null;
9
+ stagingAiApiUrl?: string | null;
10
+ aiApiUrl?: string | null;
11
+ ingestApiUrl?: string | null;
12
+ posthogApiUrl?: string | null;
13
+ posthogProjectId?: string | null;
14
+ posthogPrivateApiKey?: string | null;
15
+ firebaseVideowallUrl?: string | null;
16
+ weatherApiBaseUrl?: string | null;
17
+ evercamLabsUrl?: string | null;
18
+ firebaseDbLink?: string | null;
19
+ snapshotsURL?: string | null;
20
+ app?: string | null;
21
+ getAuthToken?: () => string | null;
22
+ errorLogger?: (error: AxiosError) => void;
23
+ };
24
+ export type RequestInterceptor = (req: AxiosRequestConfig, env: AxiosEnvironment) => AxiosRequestConfig & any;
25
+ export type ResponseInterceptor = (res: AxiosResponse, env: AxiosEnvironment) => AxiosResponse & any;
26
+ export type ErrorInterceptor = (error: any, env: AxiosEnvironment) => any;
27
+ export interface ExtendedAxiosInstance extends AxiosInstance {
28
+ CancelToken: CancelTokenStatic;
29
+ isCancel: (value: AxiosResponse | AxiosError | never) => boolean;
30
+ setToken: (token: string) => void;
31
+ setHeader: (headerName: string, value: any) => void;
32
+ generateCancelTokenSource: () => CancelTokenSource;
33
+ addCancelToken: (token: CancelTokenSource) => void;
34
+ resetCancelTokens: () => void;
35
+ cancelRequests: () => void;
36
+ env: AxiosEnvironment;
37
+ addEnvironmentVariables: (vars: Record<string, any>) => void;
38
+ addRequestInterceptor: (interceptor: RequestInterceptor, errorInterceptor?: ErrorInterceptor) => void;
39
+ addResponseInterceptor: (interceptor: ResponseInterceptor, errorInterceptor?: ErrorInterceptor) => void;
40
+ addErrorInterceptor: (interceptor: ErrorInterceptor) => void;
41
+ }
42
+ declare module "axios" {
43
+ interface AxiosRequestConfig {
44
+ raw?: boolean;
45
+ preserveCasing?: boolean;
46
+ timing?: boolean;
47
+ _metadata?: {
48
+ startTime: number;
49
+ };
50
+ }
51
+ }
@@ -0,0 +1,147 @@
1
+ import { DateTime, DateType } from "@/types";
2
+ export declare enum BimModelType {
3
+ Architectural = "Architectural",
4
+ Structural = "Structural",
5
+ FourD = "4D",
6
+ Mep = "Mep"
7
+ }
8
+ export type BimSnapshotRequestPayload = {
9
+ model: string;
10
+ layerTimestamp: string;
11
+ apiKey: string;
12
+ apiId: string;
13
+ };
14
+ export type BimSnapshotResponsePayload = {
15
+ imageUrl?: string;
16
+ };
17
+ export type BimModelRequestPayload = {
18
+ model?: string;
19
+ timestamp?: string;
20
+ apiKey?: string;
21
+ apiId?: string;
22
+ };
23
+ export type BimModelResponsePayload = {
24
+ dates?: [string];
25
+ height?: number;
26
+ imageUrl?: string;
27
+ model?: string;
28
+ models?: [string];
29
+ rotation?: number;
30
+ scaleX?: number;
31
+ scaleY?: number;
32
+ viewerHeight?: number;
33
+ viewerWidth?: number;
34
+ width?: number;
35
+ x?: number;
36
+ y?: number;
37
+ };
38
+ export type BimCompareExportRequestPayload = {
39
+ name: string;
40
+ cameraExid: string;
41
+ snapshotDate: string;
42
+ bimDate: string;
43
+ embed: string;
44
+ compareExid: string;
45
+ createAnimation: boolean;
46
+ bimTransparency?: number;
47
+ model?: string;
48
+ layerId?: number;
49
+ maskId?: number;
50
+ evercamWatermark?: boolean;
51
+ };
52
+ export type BimLayerResponsePayload = {
53
+ id: number;
54
+ name: string;
55
+ insertedAt: DateTime;
56
+ updatedAt: DateTime;
57
+ shapes: string;
58
+ startAt: DateTime;
59
+ };
60
+ export declare enum BimUploadStatus {
61
+ Initial = 0,
62
+ Saving = 1,
63
+ Success = 2,
64
+ Failed = 3
65
+ }
66
+ export type BimCreationPayload = {
67
+ title: string;
68
+ software: "synchro" | "navisworks" | "revit" | "tekla" | "archicad" | "solibri" | "bim360" | "other";
69
+ model: string;
70
+ apiKey: string;
71
+ apiId: string;
72
+ displayName: string;
73
+ fileUrl: string;
74
+ requestor: string;
75
+ finalView: boolean;
76
+ enableDistortion: boolean;
77
+ startAt: string;
78
+ };
79
+ export declare enum BIMLayerTypes {
80
+ Mask = "mask",
81
+ MeasuringGrid = "measuring_grid",
82
+ BimArchitectural = "bim_architectural",
83
+ BimStructural = "bim_structural",
84
+ Bim4D = "bim_4d",
85
+ BimMep = "bim_mep",
86
+ RecordingsTag = "recordings_tag",
87
+ Milestone = "milestone"
88
+ }
89
+ export type BimLayersQueryParams = {
90
+ layerType: BIMLayerTypes;
91
+ timestamp: DateType;
92
+ };
93
+ export type BIMLayerPostPayload = {
94
+ name: string;
95
+ layerType: BIMLayerTypes;
96
+ startAt: DateType;
97
+ shapes: string;
98
+ zIndex: number;
99
+ };
100
+ export type BIMLayer = {
101
+ id: number;
102
+ name: string;
103
+ layerType: BIMLayerTypes;
104
+ startAt: DateType;
105
+ insertedAt: DateType;
106
+ updatedAt: DateType;
107
+ shapes: string;
108
+ };
109
+ export type BimPendingImage = {
110
+ url: string;
111
+ s3Url: string;
112
+ };
113
+ export type BimUploadCameraParameters = {
114
+ distortionFov: [number];
115
+ horizontalFov: number;
116
+ verticalFov: number;
117
+ focalLength1: number;
118
+ focalLength2: number;
119
+ centerX: number;
120
+ centerY: number;
121
+ };
122
+ export type PendingBimImagesParams = {
123
+ model: string;
124
+ apiKey: string;
125
+ apiId: string;
126
+ };
127
+ export type ProcessPendingImagesBimParams = {
128
+ model: string;
129
+ names: string[];
130
+ enableDistortion: boolean;
131
+ apiId: string;
132
+ apiKey: string;
133
+ };
134
+ export type BimUploadsQueryParams = {
135
+ page: number;
136
+ limit: number;
137
+ projectId: string;
138
+ id: string;
139
+ uploadedBy: string;
140
+ };
141
+ export type BimUploadPayload = {
142
+ upload: {
143
+ url: string;
144
+ title: string;
145
+ fileExtension: string;
146
+ }[];
147
+ };