@evercam/api 1.0.0-c1a524a8d → 1.0.0-c526e2564

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 (102) hide show
  1. package/README.md +4 -0
  2. package/dist/api/api/3dFirebaseApi.d.ts +209 -5
  3. package/dist/api/api/adminApi.d.ts +148 -79
  4. package/dist/api/api/aiApi.d.ts +191 -83
  5. package/dist/api/api/authzApi.d.ts +34 -15
  6. package/dist/api/api/client/axios.d.ts +2 -1
  7. package/dist/api/api/client/swr/Swr.d.ts +14 -0
  8. package/dist/api/api/client/swr/SwrStore.d.ts +10 -0
  9. package/dist/api/api/evercamApi.d.ts +169 -104
  10. package/dist/api/api/evercamLabsApi.d.ts +8 -17
  11. package/dist/api/api/exNvrApi.d.ts +1 -1
  12. package/dist/api/api/index.d.ts +1 -0
  13. package/dist/api/api/ingestApi.d.ts +127 -34
  14. package/dist/api/api/ptzApi.d.ts +12 -3
  15. package/dist/api/api/videoWallApi.d.ts +7 -7
  16. package/dist/api/api/weatherApi.d.ts +2 -2
  17. package/dist/api/api/workflowsApi.d.ts +15 -0
  18. package/dist/api/types/360.d.ts +298 -23
  19. package/dist/api/types/aconex.d.ts +104 -6
  20. package/dist/api/types/admin.d.ts +51 -0
  21. package/dist/api/types/aiConfigs.d.ts +244 -0
  22. package/dist/api/types/analytics.d.ts +189 -57
  23. package/dist/api/types/anpr.d.ts +53 -13
  24. package/dist/api/types/auditLogs.d.ts +19 -2
  25. package/dist/api/types/authz.d.ts +132 -0
  26. package/dist/api/types/autodesk.d.ts +7 -7
  27. package/dist/api/types/automation.d.ts +114 -1
  28. package/dist/api/types/axios.d.ts +31 -11
  29. package/dist/api/types/bim.d.ts +38 -9
  30. package/dist/api/types/camera.d.ts +138 -116
  31. package/dist/api/types/comments.d.ts +32 -11
  32. package/dist/api/types/company.d.ts +72 -4
  33. package/dist/api/types/compare.d.ts +20 -5
  34. package/dist/api/types/connector.d.ts +5 -5
  35. package/dist/api/types/coolify.d.ts +20 -2
  36. package/dist/api/types/countries.d.ts +0 -7
  37. package/dist/api/types/credentials.d.ts +1 -0
  38. package/dist/api/types/detections.d.ts +23 -33
  39. package/dist/api/types/drone.d.ts +95 -6
  40. package/dist/api/types/errors.d.ts +14 -1
  41. package/dist/api/types/gateReport.d.ts +49 -168
  42. package/dist/api/types/gateReportManagement.d.ts +170 -0
  43. package/dist/api/types/hammertech.d.ts +98 -0
  44. package/dist/api/types/hdd.d.ts +26 -1
  45. package/dist/api/types/index.d.ts +18 -3
  46. package/dist/api/types/ingest.d.ts +191 -4
  47. package/dist/api/types/kit.d.ts +106 -59
  48. package/dist/api/types/map.d.ts +12 -0
  49. package/dist/api/types/media.d.ts +9 -3
  50. package/dist/api/types/notification.d.ts +83 -3
  51. package/dist/api/types/oauth.d.ts +62 -0
  52. package/dist/api/types/observationEvents.d.ts +141 -0
  53. package/dist/api/types/observations.d.ts +84 -0
  54. package/dist/api/types/planner.d.ts +102 -9
  55. package/dist/api/types/posthog.d.ts +35 -0
  56. package/dist/api/types/procore.d.ts +26 -16
  57. package/dist/api/types/progressPhoto.d.ts +10 -24
  58. package/dist/api/types/project.d.ts +150 -19
  59. package/dist/api/types/recording.d.ts +10 -15
  60. package/dist/api/types/recycleBin.d.ts +14 -0
  61. package/dist/api/types/ring.d.ts +53 -0
  62. package/dist/api/types/roi.d.ts +3 -11
  63. package/dist/api/types/routeParams.d.ts +3 -1
  64. package/dist/api/types/router.d.ts +20 -1
  65. package/dist/api/types/shared.d.ts +31 -31
  66. package/dist/api/types/shares.d.ts +6 -157
  67. package/dist/api/types/sim.d.ts +6 -6
  68. package/dist/api/types/siteAnalytics.d.ts +192 -48
  69. package/dist/api/types/siteAnalyticsManagement.d.ts +127 -0
  70. package/dist/api/types/siteView.d.ts +78 -0
  71. package/dist/api/types/smartSeach.d.ts +5 -0
  72. package/dist/api/types/snapshots.d.ts +55 -1
  73. package/dist/api/types/socket.d.ts +4 -0
  74. package/dist/api/types/sso.d.ts +55 -0
  75. package/dist/api/types/storageProvider.d.ts +19 -0
  76. package/dist/api/types/storyblok.d.ts +27 -0
  77. package/dist/api/types/streaming.d.ts +4 -5
  78. package/dist/api/types/tag.d.ts +1 -1
  79. package/dist/api/types/time.d.ts +4 -18
  80. package/dist/api/types/timelapse.d.ts +7 -11
  81. package/dist/api/types/user.d.ts +121 -35
  82. package/dist/api/types/videoWall.d.ts +47 -14
  83. package/dist/api/types/weather.d.ts +77 -11
  84. package/dist/api/types/widget.d.ts +96 -16
  85. package/dist/api/types/workflows.d.ts +108 -0
  86. package/dist/api/types/xweather.d.ts +4 -4
  87. package/dist/api/utils.d.ts +1 -0
  88. package/dist/index.js +2779 -1058
  89. package/dist/index.js.map +1 -1
  90. package/dist/index.umd.cjs +1 -1
  91. package/dist/index.umd.cjs.map +1 -1
  92. package/dist/shared/types/components.d.ts +364 -36
  93. package/dist/shared/types/customDataTableFilters.d.ts +10 -0
  94. package/dist/shared/types/imagePlayer.d.ts +10 -3
  95. package/dist/shared/types/index.d.ts +3 -0
  96. package/dist/shared/types/observations.d.ts +25 -0
  97. package/dist/shared/types/rbac.d.ts +67 -0
  98. package/dist/shared/types/timeline.d.ts +2 -1
  99. package/package.json +7 -4
  100. package/dist/api/types/copilot.d.ts +0 -157
  101. package/dist/api/types/storageServers.d.ts +0 -4
  102. package/dist/api/types/vendorModel.d.ts +0 -15
@@ -1,20 +1,20 @@
1
- export type AutodeskUserHubsResponsePayload = Array<{
1
+ export type AutodeskUserHub = {
2
2
  text: string;
3
3
  value: string;
4
- }>;
5
- export type AutodeskProjectsResponsePayload = Array<{
4
+ };
5
+ export type AutodeskProject = {
6
6
  text: string;
7
7
  value: string;
8
- }>;
9
- export type AutodeskFolderResponsePayload = {
8
+ };
9
+ export type AutodeskFolder = {
10
10
  text: string;
11
11
  value: string;
12
12
  allowedFileType: string;
13
13
  allowedFolderType: string;
14
- children: Array<AutodeskFolderResponsePayload>;
14
+ children: Array<AutodeskFolder>;
15
15
  parentName?: string;
16
16
  };
17
- export type AutodeskUploadSnapshotPayload = {
17
+ export type AutodeskSnapshot = {
18
18
  projectId: string;
19
19
  folderId: string;
20
20
  accFileType: string;
@@ -1,3 +1,4 @@
1
+ import { AconexIdentifiers, CameraExid } from "@evercam/api/types";
1
2
  export declare enum AutomationProvider {
2
3
  Aconex = "aconex",
3
4
  Procore = "procore",
@@ -6,5 +7,117 @@ export declare enum AutomationProvider {
6
7
  }
7
8
  export declare enum AutomationType {
8
9
  Photo = "photo",
9
- Compare = "compare"
10
+ Compare = "compare",
11
+ GateReport = "gate_report",
12
+ Weather = "weather"
10
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
+ };
33
+ export type AutomationCompareConfig = {
34
+ compareDelay: number;
35
+ };
36
+ export type AutomationEmailRecipient = string | {
37
+ email: string;
38
+ };
39
+ export type AutomationGateReportConfig = {
40
+ projectExid: string;
41
+ vehicleTypes: string[];
42
+ fileType: string;
43
+ period: number;
44
+ columns: string[];
45
+ };
46
+ export type AutomationEmailProviderConfig = {
47
+ cameraExids?: CameraExid[];
48
+ recipients: string | AutomationEmailRecipient[];
49
+ };
50
+ export type AutomationProcoreProviderConfig = {
51
+ companyId: number;
52
+ companyName: string;
53
+ projectId: number;
54
+ projectName: string;
55
+ categoryId: number;
56
+ categoryName: string;
57
+ };
58
+ export type AutomationAconexProviderConfig = {
59
+ projectId: number;
60
+ projectName: string;
61
+ } & Partial<Record<AconexIdentifiers, string | number | boolean>>;
62
+ export type AutomationAutodeskProviderConfig = {
63
+ hubId: number;
64
+ hubName: string;
65
+ projectId: number;
66
+ projectName: string;
67
+ folderId: number;
68
+ accFileType: string;
69
+ accFolderType: string;
70
+ folderName: string;
71
+ };
72
+ export type AutomationProviderConfig = AutomationEmailProviderConfig | AutomationProcoreProviderConfig | AutomationAconexProviderConfig | AutomationAutodeskProviderConfig;
73
+ export type AutomationOptionsConfig = AutomationCompareConfig | AutomationGateReportConfig | AutomationWeatherConfig | {};
74
+ export type AutomationConfig = AutomationProviderConfig & AutomationOptionsConfig;
75
+ export type Automation = {
76
+ id?: number;
77
+ cameraExids: CameraExid[];
78
+ name: string;
79
+ subject?: string;
80
+ provider: AutomationProvider;
81
+ type: AutomationType;
82
+ config: AutomationConfig;
83
+ notifyDays: string[];
84
+ notifyTime: string;
85
+ timezone: string;
86
+ isPaused: boolean;
87
+ restrictedCameraExids?: string[];
88
+ };
89
+ export declare enum AutomationConfigStep {
90
+ Type = "type",
91
+ Cameras = "cameras",
92
+ Settings = "settings",
93
+ Destination = "destination"
94
+ }
95
+ export type AutomationProviderOption = {
96
+ labelTranslationKey: string;
97
+ descriptionTranslationKey: string;
98
+ value: AutomationProvider;
99
+ icon: string;
100
+ iconSize?: string;
101
+ requiresConnection: boolean;
102
+ };
103
+ export type AutomationTypeOption = {
104
+ labelTranslationKey: string;
105
+ descriptionTranslationKey: string;
106
+ label?: string;
107
+ description?: string;
108
+ value: AutomationType;
109
+ icon: string;
110
+ iconType?: string;
111
+ };
112
+ export type FormattedAutomation = {
113
+ cameraExids?: string;
114
+ name: string;
115
+ subject: string;
116
+ provider: AutomationProvider;
117
+ type: AutomationType;
118
+ config: Partial<AutomationProviderConfig> & Partial<AutomationOptionsConfig>;
119
+ notifyDays: string;
120
+ notifyTime: string;
121
+ timezone: string;
122
+ isPaused: boolean;
123
+ };
@@ -1,44 +1,60 @@
1
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
- }>;
2
+ import { Swr } from "@evercam/api/api/client/swr/Swr";
6
3
  export type AxiosEnvironment = {
7
4
  baseUrl?: string | null;
8
5
  stagingAiApiUrl?: string | null;
9
6
  aiApiUrl?: string | null;
10
- ingestApiUrl?: string | null;
7
+ ingestDroneApi?: string | null;
8
+ ingest360Api?: string | null;
11
9
  ingestGpuApiUrl?: string | null;
12
10
  posthogApiUrl?: string | null;
13
11
  posthogProjectId?: string | null;
14
- posthogPrivateApiKey?: string | null;
15
12
  firebaseVideowallUrl?: string | null;
16
13
  weatherApiBaseUrl?: string | null;
17
14
  evercamLabsUrl?: string | null;
15
+ isLabsStaging?: boolean;
16
+ workflowsApiUrl?: string | null;
18
17
  firebaseDbLink?: string | null;
18
+ firebaseStorageUrl?: string | null;
19
+ firebaseStorageToken?: string | null;
20
+ forgeTokenServerUrl?: string | null;
19
21
  snapshotsURL?: string | null;
20
22
  app?: string | null;
21
23
  getAuthToken?: () => string | null;
22
24
  errorLogger?: (error: AxiosError) => void;
25
+ swrKey?: string;
23
26
  };
24
27
  export type RequestInterceptor = (req: AxiosRequestConfig, env: AxiosEnvironment) => AxiosRequestConfig & any;
25
28
  export type ResponseInterceptor = (res: AxiosResponse, env: AxiosEnvironment) => AxiosResponse & any;
26
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
+ };
27
35
  export interface ExtendedAxiosInstance extends AxiosInstance {
28
36
  CancelToken: CancelTokenStatic;
29
- isCancel: (value: AxiosResponse | AxiosError | never) => boolean;
37
+ isCancel: (value: AxiosResponse | AxiosError | unknown) => boolean;
30
38
  setToken: (token: string) => void;
31
39
  setHeader: (headerName: string, value: any) => void;
32
- generateCancelTokenSource: () => CancelTokenSource;
33
- addCancelToken: (token: CancelTokenSource) => void;
34
- resetCancelTokens: () => void;
35
- cancelRequests: () => void;
40
+ createRequestManager: () => RequestManager;
41
+ requestManager: RequestManager;
36
42
  env: AxiosEnvironment;
37
43
  addEnvironmentVariables: (vars: Record<string, any>) => void;
38
44
  addRequestInterceptor: (interceptor: RequestInterceptor, errorInterceptor?: ErrorInterceptor) => void;
39
45
  addResponseInterceptor: (interceptor: ResponseInterceptor, errorInterceptor?: ErrorInterceptor) => void;
40
46
  addErrorInterceptor: (interceptor: ErrorInterceptor) => void;
47
+ swr: Swr;
41
48
  }
49
+ export type ResponseValue<T> = T | undefined;
50
+ export type SwrResponse<T> = {
51
+ cachedValue: ResponseValue<T>;
52
+ freshPromise: Promise<ResponseValue<T>>;
53
+ };
54
+ export type SwrRequestConfig<T> = Omit<AxiosRequestConfig, "onSwrHit" | "onSwrRefresh"> & {
55
+ onSwrHit?: (data: T) => unknown;
56
+ onSwrRefresh?: (data: T) => unknown;
57
+ };
42
58
  declare module "axios" {
43
59
  interface AxiosRequestConfig {
44
60
  raw?: boolean;
@@ -47,5 +63,9 @@ declare module "axios" {
47
63
  _metadata?: {
48
64
  startTime: number;
49
65
  };
66
+ swr?: boolean;
67
+ onSwrHit?: (data: any) => unknown;
68
+ onSwrRefresh?: (data: any) => unknown;
69
+ onSwrError?: (error: Error) => unknown;
50
70
  }
51
71
  }
@@ -1,4 +1,4 @@
1
- import { DateTime, DateType } from "@/types";
1
+ import { CompareLogoPosition, DateType, PaginationParams } from "@evercam/api/types";
2
2
  export declare enum BimModelType {
3
3
  Architectural = "Architectural",
4
4
  Structural = "Structural",
@@ -48,14 +48,15 @@ export type BimCompareExportRequestPayload = {
48
48
  layerId?: number;
49
49
  maskId?: number;
50
50
  evercamWatermark?: boolean;
51
+ logo?: CompareLogoPosition;
51
52
  };
52
53
  export type BimLayerResponsePayload = {
53
54
  id: number;
54
55
  name: string;
55
- insertedAt: DateTime;
56
- updatedAt: DateTime;
56
+ insertedAt: string;
57
+ updatedAt: string;
57
58
  shapes: string;
58
- startAt: DateTime;
59
+ startAt: string;
59
60
  };
60
61
  export declare enum BimUploadStatus {
61
62
  Initial = 0,
@@ -78,13 +79,18 @@ export type BimCreationPayload = {
78
79
  };
79
80
  export declare enum BIMLayerTypes {
80
81
  Mask = "mask",
82
+ BimMask = "bim_mask",
81
83
  MeasuringGrid = "measuring_grid",
82
84
  BimArchitectural = "bim_architectural",
83
85
  BimStructural = "bim_structural",
84
86
  Bim4D = "bim_4d",
85
87
  BimMep = "bim_mep",
86
88
  RecordingsTag = "recordings_tag",
87
- Milestone = "milestone"
89
+ Milestone = "milestone",
90
+ ForgeBimArchitectural = "forge_bim_architectural",
91
+ ForgeBimStructural = "forge_bim_structural",
92
+ ForgeBim4D = "forge_bim_4d",
93
+ ForgeBimMep = "forge_bim_mep"
88
94
  }
89
95
  export type BimLayersQueryParams = {
90
96
  layerType: BIMLayerTypes;
@@ -95,7 +101,7 @@ export type BIMLayerPostPayload = {
95
101
  layerType: BIMLayerTypes;
96
102
  startAt: DateType;
97
103
  shapes: string;
98
- zIndex: number;
104
+ zIndex?: number;
99
105
  };
100
106
  export type BIMLayer = {
101
107
  id: number;
@@ -131,9 +137,7 @@ export type ProcessPendingImagesBimParams = {
131
137
  apiId: string;
132
138
  apiKey: string;
133
139
  };
134
- export type BimUploadsQueryParams = {
135
- page: number;
136
- limit: number;
140
+ export type BimUploadsQueryParams = PaginationParams & {
137
141
  projectId: string;
138
142
  id: string;
139
143
  uploadedBy: string;
@@ -145,3 +149,28 @@ export type BimUploadPayload = {
145
149
  fileExtension: string;
146
150
  }[];
147
151
  };
152
+ export declare enum ForgeBimUploadMethod {
153
+ FileUpload = "file_upload",
154
+ AutodeskAcc = "autodesk_acc"
155
+ }
156
+ export declare enum ForgeBimFileRejectionReason {
157
+ InvalidType = "invalid_type",
158
+ ExceedsSizeLimit = "exceeds_size_limit"
159
+ }
160
+ export declare enum ForgeBimUploadStage {
161
+ TusUpload = "tus_upload",
162
+ IngestUpload = "ingest_upload"
163
+ }
164
+ export declare enum ForgeBimDialogTrigger {
165
+ UpdateModel = "update_model",
166
+ AddModel = "add_model",
167
+ InitialSetup = "initial_setup"
168
+ }
169
+ export type BimUpdatedWebhookPayload = {
170
+ eventName: "bim.updated";
171
+ projectId: string;
172
+ data: {
173
+ updatedAt: string;
174
+ bimIdentifier: string;
175
+ };
176
+ };